/**
 * bd99 - Main Stylesheet
 * Prefix: g239-
 * Color palette: #1B263B | #4B0082 | #CED4DA | #D8BFD8 | #87CEEB | #B0E0E6
 */

:root {
  --g239-primary: #4B0082;
  --g239-bg: #1B263B;
  --g239-bg2: #0f1729;
  --g239-text: #CED4DA;
  --g239-accent: #87CEEB;
  --g239-light: #B0E0E6;
  --g239-purple: #D8BFD8;
  --g239-gold: #FFD700;
  --g239-radius: 1rem;
  --g239-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--g239-bg);
  color: var(--g239-text);
  line-height: 1.5rem;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; height: auto; display: block; }

/* Header */
.g239-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--g239-bg2);
  z-index: 1000;
  border-bottom: 2px solid var(--g239-primary);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.g239-logo-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.g239-logo-area img {
  width: 28px;
  height: 28px;
}

.g239-logo-area span {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--g239-gold);
}

.g239-header-btns {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.g239-btn-register {
  background: var(--g239-primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.g239-btn-register:hover {
  background: #6a0dad;
  transform: scale(1.05);
}

.g239-btn-login {
  background: transparent;
  color: var(--g239-accent);
  border: 1px solid var(--g239-accent);
  padding: 0.5rem 1.2rem;
  border-radius: 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.g239-btn-login:hover {
  background: var(--g239-accent);
  color: var(--g239-bg);
}

.g239-menu-toggle {
  background: none;
  border: none;
  color: var(--g239-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
}

/* Mobile Menu */
.g239-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
}

.g239-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 75%;
  max-width: 300px;
  height: 100%;
  background: var(--g239-bg2);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.g239-mobile-menu a {
  display: block;
  padding: 1rem 0;
  color: var(--g239-text);
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(206,212,218,0.1);
  transition: color 0.2s;
}

.g239-mobile-menu a:hover {
  color: var(--g239-gold);
}

/* Main Content */
main {
  padding-top: 6rem;
  padding-bottom: 2rem;
}

@media (max-width: 768px) {
  main {
    padding-bottom: 80px;
  }
}

.g239-container {
  width: 100%;
  padding: 0 1rem;
}

/* Carousel */
.g239-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--g239-radius);
  margin-bottom: 1.5rem;
}

.g239-slide {
  display: none;
  width: 100%;
  cursor: pointer;
}

.g239-slide img {
  width: 100%;
  height: auto;
  border-radius: var(--g239-radius);
}

.g239-dots {
  text-align: center;
  padding: 0.8rem 0;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}

.g239-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--g239-text);
  opacity: 0.4;
  cursor: pointer;
  transition: all 0.3s;
}

.g239-dot-active {
  opacity: 1;
  background: var(--g239-gold);
  transform: scale(1.3);
}

/* Section */
.g239-section {
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.g239-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g239-gold);
  margin-bottom: 1rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--g239-accent);
}

.g239-section-title i {
  margin-right: 0.5rem;
}

/* Game Grid */
.g239-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.g239-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
  text-align: center;
}

.g239-game-item:hover {
  transform: scale(1.05);
}

.g239-game-item img {
  width: 7rem;
  height: 7rem;
  border-radius: 0.8rem;
  object-fit: cover;
  border: 2px solid var(--g239-primary);
  margin-bottom: 0.3rem;
}

.g239-game-item span {
  font-size: 1.05rem;
  color: var(--g239-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category label */
.g239-cat-label {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--g239-accent);
  margin: 1.5rem 0 0.8rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--g239-gold);
}

/* Promo Link Styles */
.g239-promo-text {
  color: var(--g239-accent);
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
}

.g239-promo-text:hover {
  color: var(--g239-gold);
}

.g239-promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--g239-primary), #6a0dad);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 2rem;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  text-align: center;
}

.g239-promo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(75,0,130,0.5);
}

/* Cards */
.g239-card {
  background: rgba(75,0,130,0.15);
  border: 1px solid rgba(75,0,130,0.3);
  border-radius: var(--g239-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.g239-card h3 {
  color: var(--g239-accent);
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.g239-card p {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--g239-text);
}

/* Bottom Navigation */
.g239-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--g239-bg2);
  border-top: 2px solid var(--g239-primary);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  padding: 0.3rem 0;
}

.g239-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 54px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--g239-text);
  transition: all 0.2s;
  gap: 0.2rem;
  border-radius: 0.5rem;
}

.g239-bottom-nav-btn i,
.g239-bottom-nav-btn .material-icons,
.g239-bottom-nav-btn ion-icon {
  font-size: 22px;
}

.g239-bottom-nav-btn span {
  font-size: 1rem;
  line-height: 1.2;
}

.g239-bottom-nav-btn:hover,
.g239-bottom-nav-btn.g239-active {
  color: var(--g239-gold);
  transform: scale(1.05);
}

.g239-bottom-nav-btn.g239-active {
  background: rgba(255,215,0,0.1);
}

@media (min-width: 769px) {
  .g239-bottom-nav {
    display: none;
  }
}

/* Footer */
.g239-footer {
  background: var(--g239-bg2);
  padding: 2rem 1rem;
  text-align: center;
  border-top: 2px solid var(--g239-primary);
}

.g239-footer p {
  font-size: 1.2rem;
  color: var(--g239-text);
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.g239-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 1rem 0;
}

.g239-footer-links a {
  font-size: 1.1rem;
  color: var(--g239-accent);
  transition: color 0.2s;
}

.g239-footer-links a:hover {
  color: var(--g239-gold);
}

.g239-copyright {
  font-size: 1.1rem;
  color: rgba(206,212,218,0.5);
  margin-top: 1rem;
}

/* Utilities */
.g239-text-center { text-align: center; }
.g239-mt-1 { margin-top: 1rem; }
.g239-mt-2 { margin-top: 2rem; }
.g239-mb-1 { margin-bottom: 1rem; }
.g239-mb-2 { margin-bottom: 2rem; }
.g239-fw-700 { font-weight: 700; }
.g239-text-gold { color: var(--g239-gold); }
.g239-text-accent { color: var(--g239-accent); }

/* Responsive */
@media (max-width: 320px) {
  .g239-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .g239-game-item img {
    width: 6rem;
    height: 6rem;
  }
}
