/**
 * JL96 PH - Main Stylesheet
 * Mobile-first design with color palette:
 * - Primary: #A0522D (Sienna)
 * - Secondary: #E0FFFF (Light Cyan)
 * - Background: #212F3D (Dark Blue)
 * - Text: #CED4DA (Light Gray)
 */

/* ===== CSS Reset & Base Styles ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --g9b5-primary: #A0522D;
  --g9b5-secondary: #E0FFFF;
  --g9b5-background: #212F3D;
  --g9b5-text: #CED4DA;
  --g9b5-accent: #D4A574;
  --g9b5-success: #4CAF50;
  --g9b5-border: #34495E;
  --g9b5-dark-overlay: rgba(33, 47, 61, 0.95);
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--g9b5-text);
  background-color: var(--g9b5-background);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Container & Layout ===== */
.g9b5-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.g9b5-wrapper {
  padding: 1rem 0;
}

/* ===== Header & Navigation ===== */
.g9b5-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--g9b5-primary) 0%, #8B4513 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  padding: 0.8rem 0;
}

.g9b5-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.g9b5-logo-section {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
  min-width: 0;
}

.g9b5-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.g9b5-site-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g9b5-secondary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g9b5-header-buttons {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.g9b5-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
}

.g9b5-btn-register {
  background-color: var(--g9b5-secondary);
  color: var(--g9b5-primary);
}

.g9b5-btn-register:hover {
  background-color: #B0FFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(224, 255, 255, 0.3);
}

.g9b5-btn-login {
  background-color: transparent;
  color: var(--g9b5-secondary);
  border: 2px solid var(--g9b5-secondary);
}

.g9b5-btn-login:hover {
  background-color: var(--g9b5-secondary);
  color: var(--g9b5-primary);
  transform: translateY(-2px);
}

.g9b5-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.g9b5-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--g9b5-secondary);
  position: relative;
  transition: all 0.3s ease;
}

.g9b5-menu-toggle span::before,
.g9b5-menu-toggle span::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--g9b5-secondary);
  transition: all 0.3s ease;
}

.g9b5-menu-toggle span::before {
  top: -8px;
}

.g9b5-menu-toggle span::after {
  bottom: -8px;
}

/* ===== Mobile Menu ===== */
.g9b5-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background-color: var(--g9b5-dark-overlay);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
  transition: right 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: 2rem 0;
}

.g9b5-mobile-menu.g9b5-menu-active {
  right: 0;
}

.g9b5-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  margin-bottom: 2rem;
}

.g9b5-menu-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g9b5-secondary);
}

.g9b5-menu-close {
  background: transparent;
  border: none;
  color: var(--g9b5-secondary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g9b5-menu-nav {
  list-style: none;
  padding: 0 1rem;
}

.g9b5-menu-nav li {
  margin-bottom: 0.5rem;
}

.g9b5-menu-nav a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--g9b5-text);
  text-decoration: none;
  font-size: 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.g9b5-menu-nav a:hover {
  background-color: rgba(160, 82, 45, 0.2);
  color: var(--g9b5-secondary);
  transform: translateX(5px);
}

/* ===== Main Content ===== */
.g9b5-main {
  margin-top: 80px;
  padding-bottom: 80px;
}

.g9b5-section {
  padding: 2rem 0;
  margin-bottom: 1rem;
}

.g9b5-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--g9b5-secondary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.g9b5-section-subtitle {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--g9b5-accent);
  margin-bottom: 1rem;
}

/* ===== Carousel ===== */
.g9b5-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.g9b5-carousel-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.g9b5-carousel-slide {
  min-width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.g9b5-carousel-slide.g9b5-slide-active {
  opacity: 1;
  position: relative;
}

.g9b5-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.g9b5-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.g9b5-carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.g9b5-carousel-indicator.g9b5-indicator-active,
.g9b5-carousel-indicator:hover {
  background-color: var(--g9b5-secondary);
  transform: scale(1.2);
}

/* ===== Game Grid ===== */
.g9b5-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.g9b5-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.g9b5-game-item:hover {
  transform: translateY(-5px);
}

.g9b5-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.g9b5-game-item:hover .g9b5-game-icon {
  box-shadow: 0 4px 15px rgba(160, 82, 45, 0.5);
}

.g9b5-game-name {
  font-size: 1rem;
  color: var(--g9b5-text);
  text-align: center;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Category Section ===== */
.g9b5-category {
  margin-bottom: 3rem;
}

.g9b5-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

.g9b5-category-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g9b5-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.g9b5-category-icon {
  font-size: 2rem;
}

/* ===== Content Cards ===== */
.g9b5-card {
  background-color: rgba(52, 73, 94, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--g9b5-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.g9b5-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--g9b5-accent);
  margin-bottom: 1rem;
}

.g9b5-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--g9b5-text);
}

.g9b5-card-content p {
  margin-bottom: 1rem;
}

.g9b5-card-content p:last-child {
  margin-bottom: 0;
}

.g9b5-list {
  list-style: none;
  padding: 0;
}

.g9b5-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--g9b5-border);
  position: relative;
  padding-left: 2rem;
}

.g9b5-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--g9b5-primary);
  font-weight: bold;
}

.g9b5-list li:last-child {
  border-bottom: none;
}

/* ===== Footer ===== */
.g9b5-footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 2rem 0 1rem;
  margin-top: 3rem;
}

.g9b5-footer-section {
  margin-bottom: 2rem;
}

.g9b5-footer-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--g9b5-secondary);
  margin-bottom: 1rem;
  text-align: center;
}

.g9b5-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.g9b5-footer-links a {
  color: var(--g9b5-accent);
  text-decoration: none;
  font-size: 1.3rem;
  transition: color 0.3s ease;
}

.g9b5-footer-links a:hover {
  color: var(--g9b5-secondary);
}

.g9b5-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.g9b5-partner-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.g9b5-partner-logo:hover {
  opacity: 1;
}

.g9b5-copyright {
  text-align: center;
  color: var(--g9b5-text);
  font-size: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--g9b5-border);
}

/* ===== Mobile Bottom Navigation ===== */
.g9b5-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--g9b5-background) 0%, #1a2733 100%);
  border-top: 2px solid var(--g9b5-primary);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0;
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
}

.g9b5-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--g9b5-text);
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
}

.g9b5-nav-item:hover {
  background-color: rgba(160, 82, 45, 0.2);
  color: var(--g9b5-secondary);
  transform: scale(1.05);
}

.g9b5-nav-item.g9b5-active {
  color: var(--g9b5-secondary);
}

.g9b5-nav-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g9b5-nav-label {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .g9b5-bottom-nav {
    display: none;
  }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 380px) {
  .g9b5-site-name {
    font-size: 1.5rem;
  }

  .g9b5-btn {
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
  }

  .g9b5-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Utility Classes ===== */
.g9b5-text-center {
  text-align: center;
}

.g9b5-mt-1 { margin-top: 1rem; }
.g9b5-mt-2 { margin-top: 2rem; }
.g9b5-mb-1 { margin-bottom: 1rem; }
.g9b5-mb-2 { margin-bottom: 2rem; }

.g9b5-primary-color {
  color: var(--g9b5-primary);
}

.g9b5-secondary-color {
  color: var(--g9b5-secondary);
}
