/* JL33.xyz Layout CSS - All classes use g2e0- prefix */
/* Mobile-first responsive design for JL33 gaming platform */

/* CSS Variables */
:root {
  --g2e0-primary: #1A1A2E;
  --g2e0-secondary: #F5DEB3;
  --g2e0-accent: #E9ECEF;
  --g2e0-bg: #FFFFFF;
  --g2e0-text: #333333;
  --g2e0-text-light: #666666;
  --g2e0-border: #E0E0E0;
  --g2e0-success: #28A745;
  --g2e0-warning: #FFC107;
  --g2e0-danger: #DC3545;
  --g2e0-shadow: 0 2px 12px rgba(26,26,46,0.1);
  --g2e0-radius: 0.5rem;
  --g2e0-transition: all 0.3s ease;
  font-size: 62.5%; /* 1rem = 10px for easier calculations */
}

/* Base reset and typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--g2e0-text);
  background: var(--g2e0-bg);
  overflow-x: hidden;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}

/* Container and layout */
.g2e0-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.g2e0-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.g2e0-main {
  flex: 1;
  padding-top: 7rem; /* Account for fixed header */
  padding-bottom: 7rem; /* Account for bottom nav */
}

/* Grid system */
.g2e0-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.g2e0-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.g2e0-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.g2e0-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Header styles */
.g2e0-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 6rem;
  background: var(--g2e0-primary);
  z-index: 1000;
  box-shadow: var(--g2e0-shadow);
}

.g2e0-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.5rem;
}

.g2e0-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--g2e0-secondary);
  font-weight: 700;
  font-size: 1.8rem;
}

.g2e0-logo-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.5rem;
}

.g2e0-header-buttons {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.g2e0-btn-header {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: var(--g2e0-radius);
  text-decoration: none;
  transition: var(--g2e0-transition);
  cursor: pointer;
  min-height: 44px; /* Touch-friendly */
}

.g2e0-btn-register {
  background: var(--g2e0-success);
  color: white;
}

.g2e0-btn-login {
  background: transparent;
  color: var(--g2e0-secondary);
  border: 1px solid var(--g2e0-secondary);
}

.g2e0-btn-header:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* Mobile menu burger */
.g2e0-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  padding: 0.4rem;
}

.g2e0-burger-line {
  width: 100%;
  height: 2px;
  background: var(--g2e0-secondary);
  margin: 2px 0;
  transition: var(--g2e0-transition);
}

.g2e0-burger.g2e0-active .g2e0-burger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.g2e0-burger.g2e0-active .g2e0-burger-line:nth-child(2) {
  opacity: 0;
}

.g2e0-burger.g2e0-active .g2e0-burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile navigation */
.g2e0-mobile-menu {
  position: fixed;
  top: 6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--g2e0-primary);
  z-index: 9999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.g2e0-mobile-menu.g2e0-active {
  max-height: 50rem;
}

.g2e0-nav-list {
  list-style: none;
  padding: 1rem 0;
}

.g2e0-nav-item {
  border-bottom: 1px solid rgba(245,222,179,0.1);
}

.g2e0-nav-link {
  display: block;
  padding: 1.2rem 2rem;
  color: var(--g2e0-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--g2e0-transition);
}

.g2e0-nav-link:hover,
.g2e0-nav-link.g2e0-active {
  background: rgba(245,222,179,0.1);
  color: white;
}

.g2e0-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--g2e0-transition);
}

.g2e0-menu-overlay.g2e0-active {
  opacity: 1;
  visibility: visible;
}

/* Buttons */
.g2e0-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.2rem 2rem;
  font-size: 1.4rem;
  font-weight: 600;
  border: none;
  border-radius: var(--g2e0-radius);
  text-decoration: none;
  transition: var(--g2e0-transition);
  cursor: pointer;
  min-height: 44px;
  line-height: 1.2;
}

.g2e0-btn-primary {
  background: var(--g2e0-primary);
  color: white;
}

.g2e0-btn-secondary {
  background: var(--g2e0-secondary);
  color: var(--g2e0-primary);
}

.g2e0-btn-outline {
  background: transparent;
  color: var(--g2e0-primary);
  border: 2px solid var(--g2e0-primary);
}

.g2e0-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--g2e0-shadow);
}

/* Cards */
.g2e0-card {
  background: white;
  border-radius: var(--g2e0-radius);
  box-shadow: var(--g2e0-shadow);
  overflow: hidden;
  margin-bottom: 2rem;
}

.g2e0-card-header {
  padding: 2rem;
  background: var(--g2e0-accent);
  border-bottom: 1px solid var(--g2e0-border);
}

.g2e0-card-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--g2e0-primary);
  margin: 0;
}

.g2e0-card-body {
  padding: 2rem;
}

/* Game grid */
.g2e0-games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.g2e0-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: var(--g2e0-transition);
  padding: 0.8rem;
  border-radius: var(--g2e0-radius);
}

.g2e0-game-item:hover {
  background: var(--g2e0-accent);
  transform: translateY(-2px);
}

.g2e0-game-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 0.8rem;
  object-fit: cover;
  margin-bottom: 0.8rem;
}

.g2e0-game-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--g2e0-text);
  line-height: 1.2;
}

/* Sections */
.g2e0-section {
  margin: 3rem 0;
}

.g2e0-section-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--g2e0-primary);
  margin-bottom: 2rem;
  text-align: center;
}

/* Carousel */
.g2e0-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--g2e0-radius);
  margin-bottom: 3rem;
}

.g2e0-carousel-item {
  width: 100%;
  height: 20rem;
  cursor: pointer;
  transition: var(--g2e0-transition);
}

.g2e0-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Footer */
.g2e0-footer {
  background: var(--g2e0-primary);
  color: var(--g2e0-secondary);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.g2e0-footer-content {
  padding: 0 1.5rem;
}

.g2e0-footer-section {
  margin-bottom: 2rem;
}

.g2e0-footer-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.g2e0-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin: 2rem 0;
}

.g2e0-footer-link {
  color: var(--g2e0-secondary);
  text-decoration: none;
  font-size: 1.3rem;
  transition: var(--g2e0-transition);
}

.g2e0-footer-link:hover {
  color: white;
}

.g2e0-partners {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 2rem 0;
  padding: 2rem 0;
  border-top: 1px solid rgba(245,222,179,0.2);
  border-bottom: 1px solid rgba(245,222,179,0.2);
}

.g2e0-partner-logo {
  width: 100%;
  height: 3rem;
  object-fit: contain;
  opacity: 0.6;
  transition: var(--g2e0-transition);
}

.g2e0-partner-logo:hover {
  opacity: 1;
}

.g2e0-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--g2e0-text-light);
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(245,222,179,0.2);
}

/* Bottom navigation */
.g2e0-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 6rem;
  background: white;
  border-top: 1px solid var(--g2e0-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.g2e0-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--g2e0-text-light);
  font-size: 1rem;
  font-weight: 500;
  min-width: 6rem;
  min-height: 44px;
  padding: 0.5rem;
  transition: var(--g2e0-transition);
}

.g2e0-bottom-nav-icon {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.g2e0-bottom-nav-item:hover,
.g2e0-bottom-nav-item.g2e0-active {
  color: var(--g2e0-primary);
  transform: translateY(-1px);
}

.g2e0-promo-btn {
  background: linear-gradient(135deg, var(--g2e0-success), #20c997);
  color: white !important;
  border-radius: 1rem;
  margin: 0 0.5rem;
}

/* Utility classes */
.g2e0-text-center { text-align: center; }
.g2e0-text-left { text-align: left; }
.g2e0-text-right { text-align: right; }

.g2e0-mt-1 { margin-top: 1rem; }
.g2e0-mt-2 { margin-top: 2rem; }
.g2e0-mt-3 { margin-top: 3rem; }

.g2e0-mb-1 { margin-bottom: 1rem; }
.g2e0-mb-2 { margin-bottom: 2rem; }
.g2e0-mb-3 { margin-bottom: 3rem; }

.g2e0-p-1 { padding: 1rem; }
.g2e0-p-2 { padding: 2rem; }
.g2e0-p-3 { padding: 3rem; }

.g2e0-hidden { display: none; }
.g2e0-visible { display: block; }

/* Typography */
.g2e0-h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--g2e0-primary);
}

.g2e0-h2 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: var(--g2e0-primary);
}

.g2e0-h3 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--g2e0-primary);
}

.g2e0-h4 {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--g2e0-primary);
}

.g2e0-h5 {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  color: var(--g2e0-primary);
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

.g2e0-lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.g2e0-lazy.loaded {
  opacity: 1;
}

/* Touch device optimizations */
.touch-device .g2e0-btn:hover {
  transform: none;
}

.touch-device .g2e0-game-item:hover {
  transform: none;
  background: transparent;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --g2e0-primary: #000000;
    --g2e0-secondary: #FFFFFF;
    --g2e0-text: #000000;
    --g2e0-bg: #FFFFFF;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}