/* Dream Jili Login Theme CSS */
/* All classes use prefix w4899- for namespace isolation */

/* CSS Variables with w4899 prefix */
:root {
  --w4899-primary: #34495E;
  --w4899-secondary: #F5DEB3;
  --w4899-accent: #FFE4B5;
  --w4899-highlight: #FFDEAD;
  --w4899-light: #F8F8FF;
  --w4899-dark: #2C3E50;
  --w4899-success: #27AE60;
  --w4899-warning: #F39C12;
  --w4899-error: #E74C3C;
  --w4899-text: #333333;
  --w4899-text-light: #666666;
  --w4899-border: #E0E0E0;
  --w4899-shadow: rgba(0, 0, 0, 0.1);
  --w4899-shadow-hover: rgba(0, 0, 0, 0.15);
  --w4899-radius: 8px;
  --w4899-radius-lg: 12px;
  --w4899-transition: all 0.3s ease;
  --w4899-font-size-base: 1.6rem;
  --w4899-line-height: 1.5;
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: var(--w4899-font-size-base);
  line-height: var(--w4899-line-height);
  color: var(--w4899-text);
  background-color: var(--w4899-primary);
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  position: relative;
}

body.loaded {
  animation: w4899-fadeIn 0.3s ease-in-out;
}

@keyframes w4899-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Container and layout */
.w4899-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.w4899-wrapper {
  min-height: 100vh;
  padding-bottom: 8rem;
}

.w4899-grid {
  display: grid;
  gap: 1.5rem;
}

.w4899-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.w4899-flex-col {
  display: flex;
  flex-direction: column;
}

.w4899-text-center {
  text-align: center;
}

/* Header */
.w4899-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--w4899-primary) 0%, var(--w4899-dark) 100%);
  padding: 1rem 1.5rem;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--w4899-shadow);
  transition: var(--w4899-transition);
}

.w4899-header.scrolled {
  transform: translateY(-100%);
}

.w4899-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 430px;
  margin: 0 auto;
}

.w4899-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--w4899-light);
  font-weight: 600;
  font-size: 1.8rem;
}

.w4899-logo-icon {
  width: 2.4rem;
  height: 2.4rem;
  background: var(--w4899-accent);
  border-radius: var(--w4899-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--w4899-primary);
}

.w4899-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.w4899-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: var(--w4899-radius);
  font-size: 1.4rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--w4899-transition);
  min-height: 4.4rem;
  min-width: 4.4rem;
  touch-action: manipulation;
}

.w4899-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--w4899-shadow-hover);
}

.w4899-btn:active {
  transform: translateY(0);
}

.w4899-btn-primary {
  background: linear-gradient(135deg, var(--w4899-accent) 0%, var(--w4899-highlight) 100%);
  color: var(--w4899-primary);
}

.w4899-btn-secondary {
  background: transparent;
  color: var(--w4899-light);
  border: 2px solid var(--w4899-accent);
}

.w4899-btn-secondary:hover {
  background: var(--w4899-accent);
  color: var(--w4899-primary);
}

/* Navigation */
.w4899-nav-toggle {
  background: none;
  border: none;
  color: var(--w4899-light);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--w4899-radius);
  transition: var(--w4899-transition);
}

.w4899-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.w4899-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--w4899-primary);
  z-index: 9999;
  transition: right 0.3s ease;
  box-shadow: -5px 0 15px var(--w4899-shadow);
}

.w4899-mobile-menu.active {
  right: 0;
}

.w4899-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--w4899-transition);
}

.w4899-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.w4899-menu-header {
  padding: 2rem 1.5rem;
  background: var(--w4899-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.w4899-menu-close {
  background: none;
  border: none;
  color: var(--w4899-light);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--w4899-radius);
  transition: var(--w4899-transition);
}

.w4899-menu-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.w4899-menu-nav {
  padding: 2rem 1.5rem;
}

.w4899-menu-item {
  display: block;
  padding: 1.2rem 0;
  color: var(--w4899-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--w4899-transition);
  font-size: 1.6rem;
}

.w4899-menu-item:hover {
  color: var(--w4899-accent);
  padding-left: 1rem;
}

.w4899-menu-item:last-child {
  border-bottom: none;
}

/* Main content */
.w4899-main {
  padding-top: 7rem;
  min-height: 100vh;
}

/* Carousel */
.w4899-carousel {
  position: relative;
  margin-bottom: 2rem;
  border-radius: var(--w4899-radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 25px var(--w4899-shadow);
}

.w4899-carousel-inner {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.w4899-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.w4899-slide.active {
  opacity: 1;
}

.w4899-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.w4899-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.w4899-indicator {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--w4899-transition);
}

.w4899-indicator.active {
  background: var(--w4899-accent);
  transform: scale(1.2);
}

/* Sections */
.w4899-section {
  margin-bottom: 3rem;
}

.w4899-section-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--w4899-light);
  margin-bottom: 1.5rem;
  text-align: center;
}

.w4899-section-subtitle {
  font-size: 1.4rem;
  color: var(--w4899-text-light);
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Game grid */
.w4899-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.w4899-game-item {
  background: var(--w4899-light);
  border-radius: var(--w4899-radius);
  padding: 1rem;
  text-align: center;
  transition: var(--w4899-transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.w4899-game-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--w4899-shadow-hover);
  border-color: var(--w4899-accent);
}

.w4899-game-icon {
  width: 100%;
  height: 60px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  border-radius: var(--w4899-radius);
}

.w4899-game-name {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--w4899-text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cards */
.w4899-card {
  background: var(--w4899-light);
  border-radius: var(--w4899-radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px var(--w4899-shadow);
  transition: var(--w4899-transition);
}

.w4899-card:hover {
  box-shadow: 0 8px 25px var(--w4899-shadow-hover);
}

.w4899-card-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--w4899-primary);
  margin-bottom: 1rem;
}

.w4899-card-text {
  font-size: 1.4rem;
  color: var(--w4899-text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Bottom navigation */
.w4899-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--w4899-primary);
  border-top: 1px solid var(--w4899-border);
  z-index: 1000;
  padding: 0.5rem 0;
  box-shadow: 0 -2px 10px var(--w4899-shadow);
}

.w4899-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 430px;
  margin: 0 auto;
}

.w4899-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: 0.5rem;
  text-decoration: none;
  color: var(--w4899-text-light);
  transition: var(--w4899-transition);
  cursor: pointer;
  border-radius: var(--w4899-radius);
}

.w4899-bottom-nav-item:hover,
.w4899-bottom-nav-item.active {
  color: var(--w4899-accent);
  background: rgba(255, 228, 181, 0.1);
  transform: translateY(-2px);
}

.w4899-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.3rem;
  transition: var(--w4899-transition);
}

.w4899-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* Footer */
.w4899-footer {
  background: var(--w4899-dark);
  color: var(--w4899-light);
  padding: 3rem 1.5rem 2rem;
  margin-top: 3rem;
}

.w4899-footer-content {
  max-width: 430px;
  margin: 0 auto;
}

.w4899-footer-section {
  margin-bottom: 2rem;
}

.w4899-footer-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--w4899-accent);
}

.w4899-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.w4899-footer-link {
  color: var(--w4899-light);
  text-decoration: none;
  font-size: 1.3rem;
  transition: var(--w4899-transition);
}

.w4899-footer-link:hover {
  color: var(--w4899-accent);
}

.w4899-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.w4899-partner-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--w4899-transition);
}

.w4899-partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

.w4899-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--w4899-text-light);
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Promotional links */
.w4899-promo-link {
  color: var(--w4899-accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--w4899-transition);
}

.w4899-promo-link:hover {
  color: var(--w4899-highlight);
  text-decoration: underline;
}

.w4899-promo-btn {
  background: linear-gradient(135deg, var(--w4899-accent) 0%, var(--w4899-highlight) 100%);
  color: var(--w4899-primary);
  border: none;
  padding: 1.2rem 2rem;
  border-radius: var(--w4899-radius-lg);
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--w4899-transition);
  display: inline-block;
  text-align: center;
  min-height: 4.4rem;
}

.w4899-promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--w4899-shadow-hover);
}

/* Responsive design */
@media (max-width: 768px) {
  .w4899-bottom-nav {
    display: block;
  }

  .w4899-main {
    padding-bottom: 8rem;
  }
}

@media (min-width: 769px) {
  .w4899-bottom-nav {
    display: none;
  }
}

/* Utility classes */
.w4899-mb-1 { margin-bottom: 1rem; }
.w4899-mb-2 { margin-bottom: 2rem; }
.w4899-mb-3 { margin-bottom: 3rem; }
.w4899-mt-1 { margin-top: 1rem; }
.w4899-mt-2 { margin-top: 2rem; }
.w4899-mt-3 { margin-top: 3rem; }

.w4899-text-primary { color: var(--w4899-primary); }
.w4899-text-secondary { color: var(--w4899-secondary); }
.w4899-text-accent { color: var(--w4899-accent); }
.w4899-text-light { color: var(--w4899-light); }

.w4899-bg-primary { background-color: var(--w4899-primary); }
.w4899-bg-secondary { background-color: var(--w4899-secondary); }
.w4899-bg-accent { background-color: var(--w4899-accent); }

.w4899-hidden { display: none; }
.w4899-visible { display: block; }

/* Loading states */
.w4899-loading {
  opacity: 0.6;
  pointer-events: none;
}

.w4899-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: w4899-skeleton 1.5s infinite;
}

@keyframes w4899-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Accessibility */
.w4899-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.w4899-btn:focus,
.w4899-nav-toggle:focus,
.w4899-menu-close:focus,
.w4899-menu-item:focus,
.w4899-bottom-nav-item:focus,
.w4899-footer-link:focus,
.w4899-promo-link:focus {
  outline: 2px solid var(--w4899-accent);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --w4899-shadow: rgba(0, 0, 0, 0.3);
    --w4899-shadow-hover: rgba(0, 0, 0, 0.4);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}