/**
 * JILIVS CSS Stylesheet
 * Class prefix: vddd-
 * Color scheme: Dark blue-black (#0F0F23) with coral accents (#FF8A80)
 */

/* ===== CSS Variables ===== */
:root {
  --vddd-primary: #FF8A80;
  --vddd-primary-dark: #FF6B63;
  --vddd-secondary: #ADB5BD;
  --vddd-bg: #0F0F23;
  --vddd-bg-light: #1A1A2E;
  --vddd-text: #ADB5BD;
  --vddd-text-dark: #0F0F23;
  --vddd-border: #2A2A3E;
  --vddd-shadow: rgba(0, 0, 0, 0.3);
  --vddd-transition: all 0.3s ease;
  --vddd-radius: 8px;
  --vddd-radius-lg: 12px;
  --vddd-spacing-xs: 4px;
  --vddd-spacing-sm: 8px;
  --vddd-spacing-md: 12px;
  --vddd-spacing-lg: 16px;
  --vddd-spacing-xl: 24px;
  --vddd-spacing-2xl: 32px;
}

/* ===== Root & Typography ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--vddd-text);
  background-color: var(--vddd-bg);
  overflow-x: hidden;
}

.vddd-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  margin: var(--vddd-spacing-lg) 0 var(--vddd-spacing-md) 0;
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
}

h1 {
  font-size: 2.8rem;
  margin-bottom: var(--vddd-spacing-xl);
}

h2 {
  font-size: 2.2rem;
  margin-top: var(--vddd-spacing-xl);
}

h3 {
  font-size: 1.8rem;
  margin-top: var(--vddd-spacing-lg);
}

p {
  margin-bottom: var(--vddd-spacing-lg);
  line-height: 1.6;
  color: var(--vddd-text);
}

a {
  color: var(--vddd-primary);
  text-decoration: none;
  transition: var(--vddd-transition);
}

a:hover {
  color: var(--vddd-primary-dark);
  text-decoration: underline;
}

/* ===== Layout Classes ===== */
.vddd-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 var(--vddd-spacing-lg);
}

.vddd-wrapper {
  width: 100%;
  background-color: var(--vddd-bg);
}

.vddd-flex {
  display: flex;
  align-items: center;
}

.vddd-grid {
  display: grid;
  gap: var(--vddd-spacing-lg);
}

/* ===== Header Navigation ===== */
.vddd-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: var(--vddd-bg-light);
  border-bottom: 1px solid var(--vddd-border);
  z-index: 1000;
  box-shadow: 0 2px 8px var(--vddd-shadow);
}

.vddd-header-content {
  max-width: 430px;
  margin: 0 auto;
  padding: var(--vddd-spacing-md) var(--vddd-spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
}

.vddd-logo {
  display: flex;
  align-items: center;
  gap: var(--vddd-spacing-md);
  font-weight: 700;
  color: #FFFFFF;
  font-size: 1.6rem;
  flex: 1;
}

.vddd-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--vddd-radius);
  background: linear-gradient(135deg, var(--vddd-primary), var(--vddd-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.8rem;
}

.vddd-header-btns {
  display: flex;
  gap: var(--vddd-spacing-sm);
}

.vddd-register-btn,
.vddd-login-btn {
  padding: 6px 12px;
  font-size: 1.2rem;
  border: none;
  border-radius: var(--vddd-radius);
  cursor: pointer;
  transition: var(--vddd-transition);
  white-space: nowrap;
}

.vddd-register-btn {
  background-color: var(--vddd-primary);
  color: var(--vddd-text-dark);
  font-weight: 600;
}

.vddd-register-btn:hover {
  background-color: var(--vddd-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--vddd-shadow);
}

.vddd-login-btn {
  background-color: transparent;
  color: var(--vddd-primary);
  border: 2px solid var(--vddd-primary);
  font-weight: 600;
}

.vddd-login-btn:hover {
  background-color: var(--vddd-primary);
  color: var(--vddd-text-dark);
}

.vddd-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--vddd-spacing-md);
  margin-right: -8px;
}

.vddd-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--vddd-text);
  border-radius: 2px;
  transition: var(--vddd-transition);
}

.vddd-menu-btn.vddd-btn-active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.vddd-menu-btn.vddd-btn-active span:nth-child(2) {
  opacity: 0;
}

.vddd-menu-btn.vddd-btn-active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== Mobile Menu ===== */
#vddd-mobile-menu {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background-color: var(--vddd-bg-light);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 999;
  border-bottom: 1px solid var(--vddd-border);
}

#vddd-mobile-menu.vddd-menu-active {
  max-height: 500px;
  overflow-y: auto;
}

.vddd-menu-item {
  display: block;
  padding: var(--vddd-spacing-lg);
  border-bottom: 1px solid var(--vddd-border);
  color: var(--vddd-text);
  text-decoration: none;
  cursor: pointer;
  transition: var(--vddd-transition);
  font-weight: 500;
}

.vddd-menu-item:hover {
  background-color: rgba(255, 138, 128, 0.1);
  color: var(--vddd-primary);
  padding-left: calc(var(--vddd-spacing-lg) + var(--vddd-spacing-md));
}

/* ===== Main Content ===== */
main {
  flex: 1;
  width: 100%;
  padding-top: 72px;
  padding-bottom: 80px;
  margin: 0 auto;
}

@media (min-width: 769px) {
  main {
    padding-bottom: 0;
  }
}

/* ===== Carousel ===== */
.vddd-carousel {
  width: 100%;
  overflow: hidden;
  background-color: var(--vddd-bg-light);
  border-radius: 0;
  margin-bottom: var(--vddd-spacing-xl);
}

.vddd-carousel-inner {
  position: relative;
  width: 100%;
  height: auto;
}

.vddd-carousel-item {
  display: none;
  width: 100%;
  cursor: pointer;
}

.vddd-carousel-item.vddd-carousel-active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.vddd-carousel-item img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: pointer;
}

.vddd-carousel-indicators {
  display: flex;
  justify-content: center;
  gap: var(--vddd-spacing-sm);
  padding: var(--vddd-spacing-lg);
  background-color: var(--vddd-bg-light);
}

.vddd-carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(173, 181, 189, 0.4);
  cursor: pointer;
  transition: var(--vddd-transition);
}

.vddd-carousel-indicator.vddd-indicator-active {
  background-color: var(--vddd-primary);
  width: 24px;
  border-radius: 5px;
}

/* ===== Page Title ===== */
.vddd-page-title {
  text-align: center;
  color: #FFFFFF;
  margin: var(--vddd-spacing-xl) auto;
  padding: 0 var(--vddd-spacing-lg);
  max-width: 430px;
}

/* ===== Game Categories Section ===== */
.vddd-games-section {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 var(--vddd-spacing-lg);
  margin-bottom: var(--vddd-spacing-2xl);
}

.vddd-game-category {
  margin-bottom: var(--vddd-spacing-2xl);
}

.vddd-game-category h2 {
  margin-bottom: var(--vddd-spacing-lg);
  color: #FFFFFF;
  font-size: 2rem;
  border-bottom: 2px solid var(--vddd-primary);
  padding-bottom: var(--vddd-spacing-md);
}

.vddd-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--vddd-spacing-md);
  margin-bottom: var(--vddd-spacing-lg);
}

.vddd-game-item {
  aspect-ratio: 1;
  border-radius: var(--vddd-radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--vddd-transition);
  background-color: var(--vddd-bg-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  border: 2px solid var(--vddd-border);
}

.vddd-game-item:hover {
  transform: translateY(-4px);
  border-color: var(--vddd-primary);
  box-shadow: 0 8px 16px var(--vddd-shadow);
}

.vddd-game-item img {
  width: 100%;
  height: 75%;
  object-fit: cover;
  border-radius: var(--vddd-radius-lg) var(--vddd-radius-lg) 0 0;
}

.vddd-game-item span {
  width: 100%;
  height: 25%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #FFFFFF;
  background-color: rgba(0, 0, 0, 0.4);
  padding: var(--vddd-spacing-xs);
  line-height: 1.3;
  word-break: break-word;
}

/* ===== Content Sections ===== */
.vddd-about-section,
.vddd-howto-section,
.vddd-features-section,
.vddd-security-section,
.vddd-faq-section,
.vddd-promotions-section,
.vddd-feature-detail {
  width: 100%;
  max-width: 430px;
  margin: 0 auto var(--vddd-spacing-2xl) auto;
  padding: var(--vddd-spacing-lg);
  background-color: var(--vddd-bg-light);
  border-radius: var(--vddd-radius-lg);
  border: 1px solid var(--vddd-border);
}

.vddd-about-section h2,
.vddd-howto-section h2,
.vddd-features-section h2,
.vddd-security-section h2,
.vddd-faq-section h2,
.vddd-promotions-section h2,
.vddd-feature-detail h2 {
  color: var(--vddd-primary);
  margin-bottom: var(--vddd-spacing-lg);
}

.vddd-about-section p,
.vddd-howto-section p,
.vddd-features-section p,
.vddd-security-section p,
.vddd-faq-section p,
.vddd-promotions-section p,
.vddd-feature-detail p {
  color: var(--vddd-text);
  line-height: 1.6;
}

.vddd-howto-section ol,
.vddd-howto-section ul {
  margin-left: var(--vddd-spacing-xl);
  margin-bottom: var(--vddd-spacing-lg);
}

.vddd-howto-section li {
  margin-bottom: var(--vddd-spacing-md);
  color: var(--vddd-text);
  line-height: 1.6;
}

.vddd-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vddd-spacing-lg);
  margin-bottom: var(--vddd-spacing-lg);
}

.vddd-feature-item {
  padding: var(--vddd-spacing-lg);
  background-color: rgba(255, 138, 128, 0.05);
  border-radius: var(--vddd-radius);
  border-left: 4px solid var(--vddd-primary);
  transition: var(--vddd-transition);
}

.vddd-feature-item:hover {
  background-color: rgba(255, 138, 128, 0.1);
  transform: translateX(4px);
}

.vddd-feature-item i {
  font-size: 2.4rem;
  color: var(--vddd-primary);
  margin-bottom: var(--vddd-spacing-md);
}

.vddd-feature-item h3 {
  color: #FFFFFF;
  margin-bottom: var(--vddd-spacing-md);
  font-size: 1.6rem;
}

.vddd-feature-item p {
  color: var(--vddd-text);
  font-size: 1.3rem;
}

.vddd-faq-item {
  padding: var(--vddd-spacing-lg);
  background-color: rgba(255, 138, 128, 0.03);
  border-radius: var(--vddd-radius);
  border: 1px solid var(--vddd-border);
  margin-bottom: var(--vddd-spacing-lg);
}

.vddd-faq-item h3 {
  color: var(--vddd-primary);
  margin-bottom: var(--vddd-spacing-md);
  font-size: 1.5rem;
}

.vddd-faq-item p {
  color: var(--vddd-text);
}

.vddd-faq-item a {
  display: inline-block;
  margin-top: var(--vddd-spacing-md);
  color: var(--vddd-primary);
  font-weight: 600;
}

/* ===== Buttons ===== */
.vddd-btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--vddd-primary);
  color: var(--vddd-text-dark);
  border: none;
  border-radius: var(--vddd-radius);
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--vddd-transition);
  text-align: center;
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vddd-btn:hover {
  background-color: var(--vddd-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--vddd-shadow);
}

.vddd-btn-block {
  width: 100%;
  display: block;
  margin-bottom: var(--vddd-spacing-lg);
}

.vddd-link {
  color: var(--vddd-primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--vddd-transition);
}

.vddd-link:hover {
  text-decoration: underline;
  color: var(--vddd-primary-dark);
}

/* ===== Footer ===== */
.vddd-footer {
  width: 100%;
  background-color: var(--vddd-bg-light);
  border-top: 1px solid var(--vddd-border);
  padding: var(--vddd-spacing-2xl) var(--vddd-spacing-lg) var(--vddd-spacing-lg);
  margin-top: var(--vddd-spacing-2xl);
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
}

.vddd-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--vddd-spacing-lg);
  margin-bottom: var(--vddd-spacing-xl);
}

.vddd-footer-link {
  color: var(--vddd-primary);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 500;
  transition: var(--vddd-transition);
  word-break: break-word;
}

.vddd-footer-link:hover {
  color: var(--vddd-primary-dark);
  text-decoration: underline;
}

.vddd-partners {
  margin-bottom: var(--vddd-spacing-xl);
  text-align: center;
}

.vddd-partners h3 {
  color: #FFFFFF;
  margin-bottom: var(--vddd-spacing-lg);
  font-size: 1.4rem;
}

.vddd-partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--vddd-spacing-md);
  margin-bottom: var(--vddd-spacing-lg);
}

.vddd-partner-item {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 138, 128, 0.05);
  border-radius: var(--vddd-radius);
  border: 1px solid var(--vddd-border);
}

.vddd-partner-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 4px;
}

.vddd-footer-copyright {
  text-align: center;
  color: var(--vddd-text);
  font-size: 1.1rem;
  padding-top: var(--vddd-spacing-lg);
  border-top: 1px solid var(--vddd-border);
}

/* ===== Bottom Navigation ===== */
.vddd-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  height: 64px;
  background: linear-gradient(180deg, var(--vddd-bg-light), var(--vddd-bg));
  border-top: 2px solid var(--vddd-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 8px var(--vddd-shadow);
}

.vddd-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 52px;
  min-height: 60px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--vddd-text);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--vddd-transition);
  position: relative;
}

.vddd-nav-item i,
.vddd-nav-item .material-icons,
.vddd-nav-item svg {
  font-size: 24px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--vddd-transition);
}

.vddd-nav-item span:last-child {
  font-size: 1rem;
  font-weight: 500;
  max-width: 100%;
  text-align: center;
  line-height: 1.1;
}

.vddd-nav-item:hover {
  color: var(--vddd-primary);
  transform: scale(1.1);
}

.vddd-nav-item.vddd-nav-active {
  color: var(--vddd-primary);
}

.vddd-nav-item.vddd-nav-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 3px;
  background-color: var(--vddd-primary);
  border-radius: 2px;
}

@media (min-width: 769px) {
  .vddd-bottom-nav {
    display: none;
  }

  main {
    padding-bottom: 0 !important;
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 430px) {
  html {
    font-size: 62.5%;
  }

  .vddd-register-btn,
  .vddd-login-btn {
    padding: 5px 10px;
    font-size: 1.1rem;
  }

  .vddd-game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--vddd-spacing-sm);
  }

  .vddd-features-grid {
    grid-template-columns: 1fr;
  }

  .vddd-footer-links {
    grid-template-columns: 1fr;
    gap: var(--vddd-spacing-md);
  }

  .vddd-partners-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== Accessibility ===== */
.vddd-btn:focus,
.vddd-nav-item:focus,
.vddd-link:focus {
  outline: 2px solid var(--vddd-primary);
  outline-offset: 2px;
}

.vddd-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Utilities ===== */
.vddd-text-center {
  text-align: center;
}

.vddd-text-right {
  text-align: right;
}

.vddd-mb-lg {
  margin-bottom: var(--vddd-spacing-lg);
}

.vddd-mt-lg {
  margin-top: var(--vddd-spacing-lg);
}

.vddd-loaded {
  animation: fadeIn 0.3s ease-in-out;
}

.vddd-hidden {
  display: none !important;
}
