/* King JL Gaming Platform - Core Design System */
/* Version: 1.0.0 */
/* Mobile-First Responsive Design */

/* CSS Custom Properties (Variables) */
:root {
  --v4e0-bg: #F5F5F5;
  --v4e0-primary: #1E1E1E;
  --v4e0-secondary: #90EE90;
  --v4e0-tertiary: #8FBC8F;
  --v4e0-accent: #008000;
  --v4e0-surface: #FFFFFF;
  --v4e0-text: #1E1E1E;
  --v4e0-text-secondary: #666666;
  --v4e0-border: #E0E0E0;
  --v4e0-shadow: rgba(30, 30, 30, 0.1);
  --v4e0-gradient: linear-gradient(135deg, var(--v4e0-accent), var(--v4e0-secondary));
  --v4e0-radius: 8px;
  --v4e0-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --v4e0-header-height: 60px;
  --v4e0-bottom-nav-height: 64px;
}

/* Dark theme support */
[data-theme="dark"] {
  --v4e0-bg: #1E1E1E;
  --v4e0-surface: #2A2A2A;
  --v4e0-text: #F5F5F5;
  --v4e0-text-secondary: #B0B0B0;
  --v4e0-border: #404040;
  --v4e0-shadow: rgba(0, 0, 0, 0.3);
}

/* Global Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--v4e0-text);
  background: var(--v4e0-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container and Layout */
.v4e0-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 430px;
  margin: 0 auto;
  background: var(--v4e0-bg);
  position: relative;
  overflow-x: hidden;
}

.v4e0-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.v4e0-main {
  flex: 1;
  padding-top: var(--v4e0-header-height);
  padding-bottom: calc(var(--v4e0-bottom-nav-height) + 2rem);
}

/* Grid System */
.v4e0-grid {
  display: grid;
  gap: 1.2rem;
}

.v4e0-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.v4e0-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.v4e0-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.v4e0-flex {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.v4e0-flex-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.v4e0-flex-wrap {
  flex-wrap: wrap;
}

.v4e0-justify-between {
  justify-content: space-between;
}

.v4e0-justify-center {
  justify-content: center;
}

.v4e0-text-center {
  text-align: center;
}

/* Header Styles */
.v4e0-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--v4e0-header-height);
  background: var(--v4e0-surface);
  border-bottom: 1px solid var(--v4e0-border);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.v4e0-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.5rem;
}

.v4e0-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--v4e0-text);
  font-weight: bold;
  font-size: 1.6rem;
}

.v4e0-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.v4e0-header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Hamburger Menu */
.v4e0-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.v4e0-hamburger-line {
  width: 100%;
  height: 2px;
  background: var(--v4e0-accent);
  margin: 2px 0;
  transition: var(--v4e0-transition);
}

.v4e0-hamburger.v4e0-active .v4e0-hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.v4e0-hamburger.v4e0-active .v4e0-hamburger-line:nth-child(2) {
  opacity: 0;
}

.v4e0-hamburger.v4e0-active .v4e0-hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.v4e0-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--v4e0-transition);
}

.v4e0-menu-overlay.v4e0-active {
  opacity: 1;
  visibility: visible;
}

.v4e0-mobile-menu {
  position: fixed;
  top: var(--v4e0-header-height);
  right: -100%;
  width: 280px;
  height: calc(100vh - var(--v4e0-header-height));
  background: var(--v4e0-surface);
  border-left: 1px solid var(--v4e0-border);
  z-index: 1001;
  transition: var(--v4e0-transition);
  overflow-y: auto;
}

.v4e0-mobile-menu.v4e0-active {
  right: 0;
}

.v4e0-nav-list {
  list-style: none;
  padding: 1.5rem 0;
}

.v4e0-nav-item {
  border-bottom: 1px solid var(--v4e0-border);
}

.v4e0-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  color: var(--v4e0-text);
  text-decoration: none;
  transition: var(--v4e0-transition);
}

.v4e0-nav-link:hover {
  background: var(--v4e0-secondary);
  color: var(--v4e0-primary);
}

.v4e0-nav-icon {
  font-size: 1.8rem;
  width: 20px;
  text-align: center;
}

/* Button Styles */
.v4e0-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: var(--v4e0-radius);
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--v4e0-transition);
  min-height: 44px;
  user-select: none;
}

.v4e0-btn-primary {
  background: var(--v4e0-accent);
  color: white;
}

.v4e0-btn-primary:hover {
  background: #006600;
  transform: translateY(-1px);
}

.v4e0-btn-secondary {
  background: var(--v4e0-secondary);
  color: var(--v4e0-primary);
}

.v4e0-btn-secondary:hover {
  background: #7FDD7F;
  transform: translateY(-1px);
}

.v4e0-btn-tertiary {
  background: var(--v4e0-tertiary);
  color: var(--v4e0-primary);
}

.v4e0-btn-tertiary:hover {
  background: #7DAB7D;
  transform: translateY(-1px);
}

.v4e0-btn-outline {
  background: transparent;
  color: var(--v4e0-accent);
  border: 2px solid var(--v4e0-accent);
}

.v4e0-btn-outline:hover {
  background: var(--v4e0-accent);
  color: white;
}

.v4e0-btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 1.1rem;
}

.v4e0-btn-lg {
  padding: 1.2rem 2.4rem;
  font-size: 1.4rem;
}

.v4e0-btn-promo {
  background: var(--v4e0-gradient);
  color: white;
  font-weight: bold;
  animation: v4e0-pulse 2s infinite;
}

@keyframes v4e0-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Card Styles */
.v4e0-card {
  background: var(--v4e0-surface);
  border: 1px solid var(--v4e0-border);
  border-radius: var(--v4e0-radius);
  padding: 1.5rem;
  transition: var(--v4e0-transition);
}

.v4e0-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--v4e0-shadow);
}

.v4e0-card-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--v4e0-border);
}

.v4e0-card-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--v4e0-accent);
  margin-bottom: 0.5rem;
}

.v4e0-card-text {
  color: var(--v4e0-text-secondary);
  line-height: 1.6;
}

/* Section Styles */
.v4e0-section {
  padding: 2rem 0;
}

.v4e0-section-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--v4e0-text);
  margin-bottom: 1rem;
  text-align: center;
}

.v4e0-section-subtitle {
  font-size: 1.6rem;
  color: var(--v4e0-accent);
  margin-bottom: 1.5rem;
  text-align: center;
}

.v4e0-section-text {
  color: var(--v4e0-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Carousel Styles */
.v4e0-carousel {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: var(--v4e0-radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.v4e0-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  cursor: pointer;
}

.v4e0-slide-active {
  opacity: 1;
}

.v4e0-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.v4e0-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--v4e0-border);
  cursor: pointer;
  transition: var(--v4e0-transition);
}

.v4e0-dot.v4e0-active {
  background: var(--v4e0-accent);
}

/* Game Grid Styles */
.v4e0-games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.v4e0-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem;
  background: var(--v4e0-surface);
  border: 1px solid var(--v4e0-border);
  border-radius: var(--v4e0-radius);
  cursor: pointer;
  transition: var(--v4e0-transition);
  min-height: 80px;
}

.v4e0-game-item:hover {
  transform: translateY(-2px);
  border-color: var(--v4e0-accent);
  box-shadow: 0 6px 15px var(--v4e0-shadow);
}

.v4e0-game-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

.v4e0-game-name {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  color: var(--v4e0-text);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Game Category Styles */
.v4e0-category {
  margin-bottom: 2.5rem;
}

.v4e0-category-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--v4e0-accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.v4e0-category-icon {
  font-size: 2rem;
}

/* Bottom Navigation */
.v4e0-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--v4e0-bottom-nav-height);
  background: var(--v4e0-surface);
  border-top: 1px solid var(--v4e0-border);
  z-index: 100;
}

.v4e0-bottom-nav-content {
  display: flex;
  height: 100%;
}

.v4e0-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: var(--v4e0-transition);
  min-height: 44px;
  color: var(--v4e0-text-secondary);
}

.v4e0-bottom-nav-item:hover,
.v4e0-bottom-nav-item.v4e0-active {
  background: rgba(0, 128, 0, 0.1);
  color: var(--v4e0-accent);
}

.v4e0-bottom-nav-icon {
  font-size: 2rem;
}

.v4e0-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer Styles */
.v4e0-footer {
  background: var(--v4e0-surface);
  border-top: 1px solid var(--v4e0-border);
  padding: 2.5rem 0 7rem;
  margin-top: 3rem;
}

.v4e0-footer-content {
  text-align: center;
}

.v4e0-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.v4e0-footer-link {
  color: var(--v4e0-text-secondary);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--v4e0-transition);
}

.v4e0-footer-link:hover {
  color: var(--v4e0-accent);
}

.v4e0-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  opacity: 0.7;
}

.v4e0-partner-img {
  height: 28px;
  width: auto;
  filter: grayscale(100%);
  transition: var(--v4e0-transition);
}

.v4e0-partner-img:hover {
  filter: grayscale(0%);
}

.v4e0-copyright {
  color: var(--v4e0-text-secondary);
  font-size: 1.1rem;
  line-height: 1.5;
}

/* Utility Classes */
.v4e0-mt-1 { margin-top: 1rem; }
.v4e0-mt-2 { margin-top: 2rem; }
.v4e0-mt-3 { margin-top: 3rem; }
.v4e0-mb-1 { margin-bottom: 1rem; }
.v4e0-mb-2 { margin-bottom: 2rem; }
.v4e0-mb-3 { margin-bottom: 3rem; }
.v4e0-p-1 { padding: 1rem; }
.v4e0-p-2 { padding: 2rem; }
.v4e0-p-3 { padding: 3rem; }

.v4e0-text-primary { color: var(--v4e0-primary); }
.v4e0-text-secondary { color: var(--v4e0-secondary); }
.v4e0-text-accent { color: var(--v4e0-accent); }

.v4e0-bg-primary { background: var(--v4e0-primary); }
.v4e0-bg-secondary { background: var(--v4e0-secondary); }
.v4e0-bg-accent { background: var(--v4e0-accent); }

.v4e0-border-primary { border-color: var(--v4e0-primary); }
.v4e0-border-secondary { border-color: var(--v4e0-secondary); }

.v4e0-hidden { display: none; }
.v4e0-visible { display: block; }

/* Responsive Design */
@media (max-width: 360px) {
  .v4e0-container {
    padding: 0 1rem;
  }

  .v4e0-games-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .v4e0-game-icon {
    width: 36px;
    height: 36px;
  }

  .v4e0-game-name {
    font-size: 0.9rem;
  }
}

@media (min-width: 431px) {
  .v4e0-wrapper {
    border-left: 1px solid var(--v4e0-border);
    border-right: 1px solid var(--v4e0-border);
  }
}

/* Loading States */
.v4e0-loading {
  position: relative;
  overflow: hidden;
}

.v4e0-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(144, 238, 144, 0.2), transparent);
  animation: v4e0-shimmer 1.5s infinite;
}

@keyframes v4e0-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.v4e0-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;
}