:root {
  /* Color palette */
  --w6ff9-dark: #0C0C0C;
  --w6ff9-accent: #FF8A80;
  --w6ff9-secondary: #FFB3FF;
  --w6ff9-gray: #A9A9A9;
  --w6ff9-light: #FDF5E6;
  --w6ff9-warning: #FF5722;

  /* Functional colors */
  --w6ff9-primary: var(--w6ff9-accent);
  --w6ff9-bg: var(--w6ff9-dark);
  --w6ff9-text: var(--w6ff9-light);
  --w6ff9-text-secondary: var(--w6ff9-gray);
  --w6ff9-border: rgba(169, 169, 169, 0.2);
  --w6ff9-shadow: rgba(255, 138, 128, 0.1);

  /* Typography */
  --w6ff9-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --w6ff9-font-mono: 'Fira Code', 'Courier New', monospace;

  /* Spacing */
  --w6ff9-space-xs: 0.5rem;
  --w6ff9-space-sm: 1rem;
  --w6ff9-space-md: 1.5rem;
  --w6ff9-space-lg: 2rem;
  --w6ff9-space-xl: 3rem;

  /* Border radius */
  --w6ff9-radius-sm: 0.25rem;
  --w6ff9-radius-md: 0.5rem;
  --w6ff9-radius-lg: 1rem;

  /* Transitions */
  --w6ff9-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --w6ff9-transition-fast: all 0.15s ease;
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--w6ff9-font-primary);
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--w6ff9-text);
  background-color: var(--w6ff9-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container and layout */
.w6ff9-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 var(--w6ff9-space-sm);
}

.w6ff9-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.w6ff9-main {
  flex: 1;
  padding-top: 70px; /* Account for fixed header */
  padding-bottom: 80px; /* Account for fixed bottom nav on mobile */
}

@media (min-width: 769px) {
  .w6ff9-main {
    padding-bottom: 0;
  }
}

/* Header */
.w6ff9-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--w6ff9-dark) 0%, #1a1a1a 100%);
  border-bottom: 1px solid var(--w6ff9-border);
  backdrop-filter: blur(10px);
}

.w6ff9-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--w6ff9-space-sm);
  max-width: 430px;
  margin: 0 auto;
}

.w6ff9-logo {
  display: flex;
  align-items: center;
  gap: var(--w6ff9-space-xs);
  text-decoration: none;
  color: var(--w6ff9-text);
  font-weight: 700;
  font-size: 1.8rem;
}

.w6ff9-logo img {
  width: 28px;
  height: 28px;
  border-radius: var(--w6ff9-radius-sm);
}

.w6ff9-header-actions {
  display: flex;
  align-items: center;
  gap: var(--w6ff9-space-xs);
}

.w6ff9-btn {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: var(--w6ff9-radius-md);
  font-weight: 600;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--w6ff9-transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.w6ff9-btn-primary {
  background: linear-gradient(135deg, var(--w6ff9-primary) 0%, var(--w6ff9-warning) 100%);
  color: white;
  box-shadow: 0 2px 8px var(--w6ff9-shadow);
}

.w6ff9-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--w6ff9-shadow);
}

.w6ff9-btn-secondary {
  background: transparent;
  color: var(--w6ff9-text);
  border: 2px solid var(--w6ff9-primary);
}

.w6ff9-btn-secondary:hover {
  background: var(--w6ff9-primary);
  color: white;
}

.w6ff9-menu-toggle {
  background: none;
  border: none;
  color: var(--w6ff9-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile menu */
.w6ff9-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: linear-gradient(135deg, var(--w6ff9-dark) 0%, #1a1a1a 100%);
  z-index: 9999;
  transition: var(--w6ff9-transition);
  padding: var(--w6ff9-space-lg);
  overflow-y: auto;
}

.w6ff9-mobile-menu.active {
  right: 0;
}

.w6ff9-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--w6ff9-transition);
}

.w6ff9-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.w6ff9-menu-nav {
  list-style: none;
  margin-top: var(--w6ff9-space-lg);
}

.w6ff9-menu-nav li {
  margin-bottom: var(--w6ff9-space-sm);
}

.w6ff9-menu-nav a {
  color: var(--w6ff9-text);
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 500;
  padding: var(--w6ff9-space-xs) 0;
  display: block;
  transition: var(--w6ff9-transition-fast);
}

.w6ff9-menu-nav a:hover {
  color: var(--w6ff9-primary);
}

/* Carousel */
.w6ff9-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--w6ff9-radius-lg);
  margin-bottom: var(--w6ff9-space-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.w6ff9-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  cursor: pointer;
}

.w6ff9-carousel-slide.active {
  opacity: 1;
}

.w6ff9-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.w6ff9-carousel-indicators {
  position: absolute;
  bottom: var(--w6ff9-space-sm);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--w6ff9-space-xs);
}

.w6ff9-carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--w6ff9-transition-fast);
}

.w6ff9-carousel-indicator.active {
  background: var(--w6ff9-primary);
  transform: scale(1.2);
}

/* Game grid */
.w6ff9-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--w6ff9-space-xs);
  margin-bottom: var(--w6ff9-space-lg);
}

.w6ff9-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: var(--w6ff9-transition);
  text-decoration: none;
  color: var(--w6ff9-text);
}

.w6ff9-game-item:hover {
  transform: translateY(-4px);
}

.w6ff9-game-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--w6ff9-radius-md);
  object-fit: cover;
  margin-bottom: var(--w6ff9-space-xs);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: var(--w6ff9-transition);
}

.w6ff9-game-item:hover .w6ff9-game-icon {
  box-shadow: 0 4px 16px var(--w6ff9-shadow);
}

.w6ff9-game-name {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.3;
  max-width: 100%;
  word-break: break-word;
}

/* Sections */
.w6ff9-section {
  margin-bottom: var(--w6ff9-space-xl);
}

.w6ff9-section-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: var(--w6ff9-space-md);
  color: var(--w6ff9-primary);
  text-align: center;
}

.w6ff9-section-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: var(--w6ff9-space-sm);
  color: var(--w6ff9-secondary);
}

.w6ff9-text {
  font-size: 1.6rem;
  line-height: 1.6;
  margin-bottom: var(--w6ff9-space-sm);
  color: var(--w6ff9-text);
}

.w6ff9-text-center {
  text-align: center;
}

/* Cards */
.w6ff9-card {
  background: linear-gradient(135deg, rgba(255, 138, 128, 0.1) 0%, rgba(255, 179, 255, 0.1) 100%);
  border: 1px solid var(--w6ff9-border);
  border-radius: var(--w6ff9-radius-lg);
  padding: var(--w6ff9-space-md);
  margin-bottom: var(--w6ff9-space-md);
  backdrop-filter: blur(10px);
}

.w6ff9-card-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: var(--w6ff9-space-sm);
  color: var(--w6ff9-primary);
}

/* Bottom navigation */
.w6ff9-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--w6ff9-dark) 0%, #1a1a1a 100%);
  border-top: 1px solid var(--w6ff9-border);
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 var(--w6ff9-space-sm);
}

@media (min-width: 769px) {
  .w6ff9-bottom-nav {
    display: none;
  }
}

.w6ff9-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  transition: var(--w6ff9-transition-fast);
  text-decoration: none;
  color: var(--w6ff9-text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.w6ff9-bottom-nav-item:hover,
.w6ff9-bottom-nav-item.active {
  color: var(--w6ff9-primary);
  transform: translateY(-2px);
}

.w6ff9-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.2rem;
}

/* Footer */
.w6ff9-footer {
  background: linear-gradient(135deg, var(--w6ff9-dark) 0%, #1a1a1a 100%);
  border-top: 1px solid var(--w6ff9-border);
  padding: var(--w6ff9-space-lg) var(--w6ff9-space-sm);
  text-align: center;
}

.w6ff9-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--w6ff9-space-sm);
  margin-bottom: var(--w6ff9-space-lg);
}

.w6ff9-partner-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--w6ff9-transition);
}

.w6ff9-partner-icon:hover {
  opacity: 1;
}

.w6ff9-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--w6ff9-space-md);
  margin-bottom: var(--w6ff9-space-lg);
}

.w6ff9-footer-links a {
  color: var(--w6ff9-text-secondary);
  text-decoration: none;
  font-size: 1.4rem;
  transition: var(--w6ff9-transition-fast);
}

.w6ff9-footer-links a:hover {
  color: var(--w6ff9-primary);
}

.w6ff9-copyright {
  font-size: 1.2rem;
  color: var(--w6ff9-text-secondary);
  text-align: center;
}

/* Promotional links */
.w6ff9-promo-link {
  color: var(--w6ff9-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--w6ff9-transition-fast);
}

.w6ff9-promo-link:hover {
  color: var(--w6ff9-warning);
  text-decoration: underline;
}

.w6ff9-promo-btn {
  background: linear-gradient(135deg, var(--w6ff9-primary) 0%, var(--w6ff9-warning) 100%);
  color: white;
  padding: 1.2rem 2.4rem;
  border-radius: var(--w6ff9-radius-lg);
  font-weight: 600;
  font-size: 1.6rem;
  text-decoration: none;
  display: inline-block;
  transition: var(--w6ff9-transition);
  box-shadow: 0 4px 12px var(--w6ff9-shadow);
  cursor: pointer;
  border: none;
}

.w6ff9-promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--w6ff9-shadow);
}

/* Utility classes */
.w6ff9-text-primary {
  color: var(--w6ff9-primary);
}

.w6ff9-text-secondary {
  color: var(--w6ff9-secondary);
}

.w6ff9-text-warning {
  color: var(--w6ff9-warning);
}

.w6ff9-bg-primary {
  background-color: var(--w6ff9-primary);
}

.w6ff9-bg-secondary {
  background-color: var(--w6ff9-secondary);
}

.w6ff9-mb-sm {
  margin-bottom: var(--w6ff9-space-sm);
}

.w6ff9-mb-md {
  margin-bottom: var(--w6ff9-space-md);
}

.w6ff9-mb-lg {
  margin-bottom: var(--w6ff9-space-lg);
}

.w6ff9-mt-sm {
  margin-top: var(--w6ff9-space-sm);
}

.w6ff9-mt-md {
  margin-top: var(--w6ff9-space-md);
}

.w6ff9-mt-lg {
  margin-top: var(--w6ff9-space-lg);
}

/* Responsive design */
@media (max-width: 768px) {
  .w6ff9-container {
    padding: 0 var(--w6ff9-space-xs);
  }

  .w6ff9-game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .w6ff9-game-icon {
    width: 56px;
    height: 56px;
  }

  .w6ff9-carousel {
    height: 160px;
  }

  .w6ff9-section-title {
    font-size: 2rem;
  }

  .w6ff9-section-subtitle {
    font-size: 1.6rem;
  }
}

@media (max-width: 430px) {
  .w6ff9-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .w6ff9-game-icon {
    width: 48px;
    height: 48px;
  }

  .w6ff9-carousel {
    height: 140px;
  }

  .w6ff9-btn {
    padding: 0.6rem 1.2rem;
    font-size: 1.3rem;
  }

  .w6ff9-promo-btn {
    padding: 1rem 2rem;
    font-size: 1.5rem;
  }
}

/* Animations */
@keyframes w6ff9-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.w6ff9-fade-in {
  animation: w6ff9-fadeIn 0.6s ease-out;
}

@keyframes w6ff9-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.w6ff9-pulse {
  animation: w6ff9-pulse 2s infinite;
}

/* Loading states */
.w6ff9-loading {
  opacity: 0.6;
  pointer-events: none;
}

.w6ff9-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--w6ff9-primary);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: w6ff9-spin 1s linear infinite;
}

@keyframes w6ff9-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accessibility */
.w6ff9-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 */
.w6ff9-btn:focus,
.w6ff9-promo-btn:focus,
.w6ff9-menu-toggle:focus,
.w6ff9-bottom-nav-item:focus {
  outline: 2px solid var(--w6ff9-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --w6ff9-border: rgba(255, 255, 255, 0.5);
    --w6ff9-text-secondary: #ffffff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}