/* JL3 Main Stylesheet - Mobile Gaming Platform */
/* All classes use g09c- prefix to avoid conflicts */

/* CSS Custom Properties */
:root {
  --g09c-primary: #00FF00;      /* Bright green - primary brand color */
  --g09c-secondary: #ADD8E6;    /* Light blue - secondary accent */
  --g09c-accent: #48D1CC;       /* Medium turquoise - interactive elements */
  --g09c-neutral: #5F9EA0;      /* Cadet blue - borders and dividers */
  --g09c-dark: #1C2833;         /* Dark blue-gray - backgrounds */
  --g09c-text: var(--g09c-secondary);
  --g09c-bg: var(--g09c-dark);
  --g09c-border: var(--g09c-neutral);
  --g09c-hover: var(--g09c-accent);
}

/* Global Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%; /* 10px base for rem calculations */
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--g09c-text);
  background-color: var(--g09c-bg);
  overflow-x: hidden;
}

/* Container and Layout */
.g09c-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.g09c-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Header Styles */
.g09c-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: linear-gradient(135deg, var(--g09c-dark) 0%, #2C3E50 100%);
  border-bottom: 2px solid var(--g09c-primary);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 255, 0, 0.1);
}

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

.g09c-logo-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.g09c-logo {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.4rem;
}

.g09c-site-name {
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--g09c-primary);
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.g09c-header-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.g09c-register-btn,
.g09c-login-btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 2rem;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g09c-register-btn {
  background: linear-gradient(45deg, var(--g09c-primary), var(--g09c-accent));
  color: var(--g09c-dark);
}

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

.g09c-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  padding: 0.5rem;
}

.g09c-hamburger-line {
  width: 2rem;
  height: 2px;
  background: var(--g09c-primary);
  transition: 0.3s;
  transform-origin: center;
}

.g09c-hamburger-line:not(:last-child) {
  margin-bottom: 4px;
}

/* Hamburger Animation */
.g09c-hamburger-active .g09c-hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.g09c-hamburger-active .g09c-hamburger-line:nth-child(2) {
  opacity: 0;
}

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

/* Mobile Menu */
.g09c-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.g09c-mobile-menu {
  position: fixed;
  top: 6rem;
  right: -100%;
  width: 28rem;
  height: calc(100vh - 6rem);
  background: linear-gradient(180deg, var(--g09c-dark) 0%, #2C3E50 100%);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.g09c-menu-active {
  right: 0;
}

.g09c-nav-list {
  list-style: none;
  padding: 2rem 0;
}

.g09c-nav-item {
  border-bottom: 1px solid var(--g09c-border);
}

.g09c-nav-link {
  display: block;
  padding: 1.5rem 2rem;
  color: var(--g09c-text);
  text-decoration: none;
  font-size: 1.6rem;
  transition: all 0.3s ease;
}

.g09c-nav-link:hover {
  background: rgba(0, 255, 0, 0.1);
  color: var(--g09c-primary);
  transform: translateX(1rem);
}

/* Carousel Styles */
.g09c-carousel {
  position: relative;
  width: 100%;
  margin: 2rem 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 255, 0, 0.1);
}

.g09c-carousel-container {
  position: relative;
  width: 100%;
  height: 20rem;
}

.g09c-carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: none;
}

.g09c-carousel-slide.g09c-active {
  display: block;
}

.g09c-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.g09c-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
}

.g09c-carousel-indicator {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.g09c-carousel-indicator.g09c-active {
  background: var(--g09c-primary);
  transform: scale(1.2);
}

/* Game Grid */
.g09c-game-section {
  margin: 3rem 0;
}

.g09c-section-title {
  font-size: 2.4rem;
  font-weight: bold;
  color: var(--g09c-primary);
  margin-bottom: 2rem;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.g09c-game-category {
  margin-bottom: 3rem;
}

.g09c-category-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--g09c-accent);
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--g09c-primary);
}

.g09c-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1.2rem;
  padding: 0 0.5rem;
}

.g09c-game-card {
  background: linear-gradient(135deg, #2C3E50 0%, var(--g09c-dark) 100%);
  border: 1px solid var(--g09c-border);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.g09c-game-card:hover {
  transform: translateY(-2px);
  border-color: var(--g09c-primary);
  box-shadow: 0 8px 25px rgba(0, 255, 0, 0.15);
}

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

.g09c-game-name {
  font-size: 1.1rem;
  color: var(--g09c-text);
  font-weight: 500;
  line-height: 1.3;
}

/* Content Sections */
.g09c-content-section {
  margin: 4rem 0;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, rgba(0, 255, 0, 0.03) 0%, rgba(72, 209, 204, 0.03) 100%);
  border: 1px solid var(--g09c-border);
  border-radius: 1.5rem;
}

.g09c-content-title {
  font-size: 2.2rem;
  color: var(--g09c-primary);
  margin-bottom: 1.5rem;
  font-weight: bold;
}

.g09c-content-text {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--g09c-text);
  margin-bottom: 1.5rem;
}

/* Buttons */
.g09c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  border: none;
  border-radius: 2.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 44px;
  min-height: 44px;
  gap: 0.8rem;
}

.g09c-btn-primary {
  background: linear-gradient(45deg, var(--g09c-primary), var(--g09c-accent));
  color: var(--g09c-dark);
  box-shadow: 0 4px 15px rgba(0, 255, 0, 0.2);
}

.g09c-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 0, 0.3);
}

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

.g09c-btn-secondary:hover {
  background: var(--g09c-primary);
  color: var(--g09c-dark);
}

/* Footer */
.g09c-footer {
  background: linear-gradient(180deg, #2C3E50 0%, var(--g09c-dark) 100%);
  border-top: 2px solid var(--g09c-primary);
  padding: 3rem 0 8rem; /* Extra bottom padding for mobile nav */
  margin-top: 4rem;
}

.g09c-footer-content {
  text-align: center;
}

.g09c-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.g09c-footer-link {
  color: var(--g09c-text);
  text-decoration: none;
  font-size: 1.3rem;
  transition: color 0.3s ease;
}

.g09c-footer-link:hover {
  color: var(--g09c-primary);
}

.g09c-partners {
  margin: 2.5rem 0;
}

.g09c-partners-title {
  font-size: 1.6rem;
  color: var(--g09c-accent);
  margin-bottom: 1.5rem;
}

.g09c-partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4rem, 1fr));
  gap: 1rem;
  max-width: 32rem;
  margin: 0 auto;
}

.g09c-partner-logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

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

.g09c-copyright {
  font-size: 1.2rem;
  color: var(--g09c-border);
  margin-top: 2rem;
}

/* Mobile Bottom Navigation */
.g09c-mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6.4rem;
  background: linear-gradient(180deg, var(--g09c-dark) 0%, #2C3E50 100%);
  border-top: 2px solid var(--g09c-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 255, 0, 0.1);
}

.g09c-mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--g09c-text);
  flex: 1;
  min-width: 44px;
  min-height: 44px;
}

.g09c-mobile-nav-item:hover,
.g09c-mobile-nav-item.g09c-active {
  color: var(--g09c-primary);
  transform: translateY(-2px);
}

.g09c-mobile-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.2rem;
}

.g09c-mobile-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Utility Classes */
.g09c-text-center { text-align: center; }
.g09c-text-primary { color: var(--g09c-primary); }
.g09c-text-secondary { color: var(--g09c-secondary); }
.g09c-bg-primary { background-color: var(--g09c-primary); }
.g09c-mb-1 { margin-bottom: 1rem; }
.g09c-mb-2 { margin-bottom: 2rem; }
.g09c-mt-1 { margin-top: 1rem; }
.g09c-mt-2 { margin-top: 2rem; }
.g09c-p-1 { padding: 1rem; }
.g09c-p-2 { padding: 2rem; }

/* Loading Styles */
.g09c-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--g09c-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.g09c-spinner {
  width: 4rem;
  height: 4rem;
  border: 3px solid var(--g09c-border);
  border-top: 3px solid var(--g09c-primary);
  border-radius: 50%;
  animation: g09c-spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes g09c-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Back to Top Button */
.g09c-back-to-top {
  position: fixed;
  bottom: 8rem;
  right: 2rem;
  width: 4.8rem;
  height: 4.8rem;
  background: linear-gradient(45deg, var(--g09c-primary), var(--g09c-accent));
  color: var(--g09c-dark);
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 255, 0, 0.2);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g09c-back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 255, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 375px) {
  .g09c-container { padding: 0 1rem; }
  .g09c-game-grid { grid-template-columns: repeat(3, 1fr); }
  .g09c-header-content { padding: 0 1rem; }
}

@media (min-width: 768px) {
  .g09c-mobile-nav { display: none; }
  .g09c-main { padding-bottom: 0; }
  .g09c-footer { padding-bottom: 3rem; }
  .g09c-hamburger { display: none; }
  
  .g09c-nav-desktop {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
  
  .g09c-nav-desktop .g09c-nav-link {
    padding: 0;
    font-size: 1.4rem;
  }
}

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

/* Focus Styles */
button:focus,
a:focus,
input:focus {
  outline: 2px solid var(--g09c-primary);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --g09c-primary: #00FF00;
    --g09c-text: #FFFFFF;
    --g09c-bg: #000000;
    --g09c-border: #FFFFFF;
  }
}