/**
 * JL50 Main Stylesheet
 * All classes use g267- prefix for namespace isolation
 * Color Scheme: #0097A7 (Primary) | #333333 (Background)
 * @version 1.0.0
 */

/* CSS Custom Properties */
:root {
  --g267-primary: #0097A7;
  --g267-primary-dark: #007C91;
  --g267-primary-light: #4DB6AC;
  --g267-bg: #333333;
  --g267-bg-light: #424242;
  --g267-bg-dark: #212121;
  --g267-text: #FFFFFF;
  --g267-text-muted: #B0BEC5;
  --g267-border: #424242;
  --g267-shadow: rgba(0, 151, 167, 0.3);
  --g267-gradient: linear-gradient(135deg, #0097A7 0%, #007C91 100%);
  --g267-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & 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, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  background-color: var(--g267-bg);
  color: var(--g267-text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.g267-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.g267-wrapper {
  padding-top: 6rem;
  padding-bottom: 8rem;
}

/* Header */
.g267-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--g267-bg-dark);
  border-bottom: 1px solid var(--g267-border);
  z-index: 1000;
  box-shadow: 0 2px 8px var(--g267-shadow);
}

.g267-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}

.g267-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--g267-text);
  font-size: 1.8rem;
  font-weight: 700;
}

.g267-logo img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
}

.g267-header-buttons {
  display: flex;
  gap: 0.5rem;
}

.g267-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--g267-transition);
  text-decoration: none;
  display: inline-block;
}

.g267-btn-primary {
  background: var(--g267-gradient);
  color: var(--g267-text);
}

.g267-btn-secondary {
  background-color: transparent;
  color: var(--g267-primary-light);
  border: 1px solid var(--g267-primary-light);
}

.g267-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--g267-shadow);
}

.g267-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.g267-menu-toggle span {
  width: 2rem;
  height: 0.2rem;
  background-color: var(--g267-text);
  transition: var(--g267-transition);
}

/* Mobile Menu */
.g267-mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: var(--g267-bg-dark);
  z-index: 9999;
  transition: var(--g267-transition);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.5);
}

.g267-mobile-menu.g267-menu-open {
  left: 0;
}

.g267-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--g267-border);
}

.g267-menu-close {
  background: none;
  border: none;
  color: var(--g267-text);
  font-size: 2rem;
  cursor: pointer;
}

.g267-menu-items {
  padding: 1rem 0;
  overflow-y: auto;
  max-height: calc(100vh - 6rem);
}

.g267-menu-items a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--g267-text);
  text-decoration: none;
  font-size: 1.4rem;
  transition: var(--g267-transition);
  border-left: 3px solid transparent;
}

.g267-menu-items a:hover {
  background-color: var(--g267-bg-light);
  border-left-color: var(--g267-primary);
  padding-left: 2rem;
}

.g267-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--g267-transition);
}

.g267-mobile-menu.g267-menu-open + .g267-menu-overlay {
  opacity: 1;
  visibility: visible;
}

/* Carousel */
.g267-carousel {
  position: relative;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 1rem;
}

.g267-carousel-slide {
  display: none;
  width: 100%;
}

.g267-carousel-slide.g267-slide-active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

.g267-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hero Section */
.g267-hero {
  text-align: center;
  padding: 2rem 0;
}

.g267-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--g267-text);
  line-height: 1.3;
}

/* Game Grid */
.g267-game-section {
  margin-bottom: 2.5rem;
}

.g267-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--g267-primary-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.g267-section-title::before {
  content: '';
  width: 4px;
  height: 2rem;
  background: var(--g267-gradient);
  border-radius: 2px;
}

.g267-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.g267-game-item {
  background-color: var(--g267-bg-light);
  border-radius: 0.8rem;
  overflow: hidden;
  transition: var(--g267-transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--g267-text);
  display: block;
}

.g267-game-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--g267-shadow);
}

.g267-game-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.g267-game-item span {
  display: block;
  padding: 0.5rem;
  font-size: 1rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content Sections */
.g267-content-section {
  background-color: var(--g267-bg-light);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.g267-content-section h2 {
  font-size: 1.8rem;
  color: var(--g267-primary-light);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.g267-content-section p {
  margin-bottom: 1rem;
  color: var(--g267-text-muted);
  line-height: 1.6;
}

.g267-content-section ul {
  list-style: none;
  margin-bottom: 1rem;
}

.g267-content-section li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--g267-text-muted);
  line-height: 1.6;
}

.g267-content-section li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--g267-primary);
}

/* Internal Links */
.g267-internal-link {
  color: var(--g267-primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--g267-transition);
}

.g267-internal-link:hover {
  color: var(--g267-primary);
  text-decoration: underline;
}

/* CTA Button */
.g267-cta-button {
  display: inline-block;
  background: var(--g267-gradient);
  color: var(--g267-text);
  padding: 1rem 2rem;
  border-radius: 0.8rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.4rem;
  transition: var(--g267-transition);
  margin: 1rem 0;
  box-shadow: 0 4px 12px var(--g267-shadow);
}

.g267-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--g267-shadow);
}

/* Footer */
.g267-footer {
  background-color: var(--g267-bg-dark);
  border-top: 1px solid var(--g267-border);
  padding: 2rem 0 8rem;
}

.g267-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.g267-footer-links a {
  color: var(--g267-text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--g267-transition);
}

.g267-footer-links a:hover {
  color: var(--g267-primary-light);
}

.g267-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.g267-partners img {
  width: 4rem;
  height: 2.5rem;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--g267-transition);
}

.g267-partners img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.g267-footer-text {
  text-align: center;
  color: var(--g267-text-muted);
  font-size: 1.2rem;
  line-height: 1.6;
  padding: 0 1rem;
}

/* Bottom Navigation */
.g267-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--g267-bg-dark);
  border-top: 1px solid var(--g267-border);
  z-index: 1000;
  padding: 0.5rem 0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

.g267-bottom-nav-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.g267-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 60px;
  min-height: 60px;
  justify-content: center;
  text-decoration: none;
  color: var(--g267-text-muted);
  transition: var(--g267-transition);
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.g267-nav-item:hover {
  background-color: var(--g267-bg-light);
}

.g267-nav-item.g267-nav-active {
  color: var(--g267-primary-light);
}

.g267-nav-item i,
.g267-nav-item svg {
  font-size: 2.2rem;
  width: 28px;
  height: 28px;
}

.g267-nav-item span {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

.g267-nav-item.g267-nav-active span {
  color: var(--g267-primary-light);
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .g267-bottom-nav {
    display: none;
  }

  .g267-wrapper {
    padding-bottom: 2rem;
  }
}

/* Add padding for mobile */
@media (max-width: 768px) {
  main {
    padding-bottom: 80px;
  }
}

/* Animation Classes */
.g267-animate-on-scroll {
  opacity: 0;
  transform: translateY(2rem);
  transition: all 0.6s ease-out;
}

.g267-animate-on-scroll.g267-animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 380px) {
  .g267-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .g267-hero h1 {
    font-size: 1.8rem;
  }
}

/* Utility Classes */
.g267-text-center {
  text-align: center;
}

.g267-mb-1 { margin-bottom: 1rem; }
.g267-mb-2 { margin-bottom: 2rem; }
.g267-mt-1 { margin-top: 1rem; }
.g267-mt-2 { margin-top: 2rem; }

.g267-text-primary {
  color: var(--g267-primary-light);
}

.g267-text-bold {
  font-weight: 700;
}
