/**
 * NuStar Game - Theme Stylesheet
 * CSS class prefix: v239-
 * Mobile-first design, max-width 430px
 */

/* ===== CSS Variables ===== */
:root {
  --v239-primary: #2E8B57;
  --v239-accent: #FFD700;
  --v239-danger: #E65100;
  --v239-bg-dark: #0F0F23;
  --v239-bg-card: #1A1A35;
  --v239-bg-section: #141428;
  --v239-text-light: #FFCCCB;
  --v239-text-white: #F5F5F5;
  --v239-text-gold: #FFD700;
  --v239-border: #2A2A4A;
  --v239-shadow: rgba(0, 0, 0, 0.3);
  --v239-radius: 8px;
  --v239-radius-lg: 12px;
  --v239-transition: 0.25s ease;
  font-size: 62.5%;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--v239-bg-dark);
  color: var(--v239-text-light);
  line-height: 1.5rem;
  max-width: 430px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--v239-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ===== Header ===== */
.v239-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: linear-gradient(135deg, var(--v239-bg-dark) 0%, #1C1C3A 100%);
  border-bottom: 1px solid var(--v239-border);
  z-index: 1000;
  padding: 0.8rem 1rem;
}

.v239-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.v239-logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.v239-logo-area img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.v239-site-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--v239-accent);
  white-space: nowrap;
}

.v239-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.v239-btn-register,
.v239-btn-login {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--v239-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
  min-width: 44px;
  transition: all var(--v239-transition);
}

.v239-btn-register {
  background: linear-gradient(135deg, var(--v239-primary), #3CB371);
  color: #fff;
}

.v239-btn-login {
  background: linear-gradient(135deg, var(--v239-danger), #FF6B35);
  color: #fff;
}

.v239-btn-register:hover,
.v239-btn-login:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px var(--v239-shadow);
}

.v239-menu-toggle {
  background: none;
  border: none;
  color: var(--v239-text-light);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Mobile Menu ===== */
.v239-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--v239-transition);
}

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

.v239-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--v239-bg-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  border-left: 1px solid var(--v239-border);
}

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

.v239-menu-close {
  background: none;
  border: none;
  color: var(--v239-text-light);
  font-size: 2.4rem;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
  min-width: 44px;
  min-height: 44px;
}

.v239-menu-nav {
  margin-top: 3rem;
  list-style: none;
}

.v239-menu-nav li {
  border-bottom: 1px solid var(--v239-border);
}

.v239-menu-nav a {
  display: block;
  padding: 1.2rem 0.5rem;
  color: var(--v239-text-light);
  font-size: 1.4rem;
  transition: color var(--v239-transition);
}

.v239-menu-nav a:hover {
  color: var(--v239-accent);
  text-decoration: none;
}

/* ===== Main Content ===== */
.v239-main {
  padding-top: 5.5rem;
  min-height: 100vh;
}

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

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

/* ===== Carousel ===== */
.v239-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--v239-radius);
  margin-bottom: 1.5rem;
}

.v239-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.v239-slide-active {
  opacity: 1;
}

.v239-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v239-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.v239-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  padding: 0;
}

.v239-dot-active {
  background: var(--v239-accent);
}

/* ===== Section Headings ===== */
.v239-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--v239-accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--v239-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.v239-section-title .material-icons {
  font-size: 2rem;
}

/* ===== Game Grid ===== */
.v239-game-section {
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.v239-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.v239-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform var(--v239-transition);
  text-align: center;
}

.v239-game-item:hover {
  transform: scale(1.08);
}

.v239-game-item img {
  width: 64px;
  height: 64px;
  border-radius: var(--v239-radius);
  margin-bottom: 0.3rem;
  border: 1px solid var(--v239-border);
}

.v239-game-name {
  font-size: 1rem;
  color: var(--v239-text-light);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 72px;
}

/* ===== Content Modules ===== */
.v239-content-section {
  background: var(--v239-bg-section);
  border-radius: var(--v239-radius-lg);
  padding: 1.5rem 1.2rem;
  margin: 1.5rem 1rem;
  border: 1px solid var(--v239-border);
}

.v239-content-section h2 {
  font-size: 1.7rem;
  color: var(--v239-accent);
  margin-bottom: 1rem;
}

.v239-content-section h3 {
  font-size: 1.4rem;
  color: var(--v239-primary);
  margin: 1rem 0 0.5rem;
}

.v239-content-section p {
  font-size: 1.3rem;
  color: var(--v239-text-light);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.v239-content-section ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.v239-content-section li {
  font-size: 1.3rem;
  color: var(--v239-text-light);
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

/* ===== Affiliate CTA Buttons ===== */
.v239-cta-btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--v239-primary), #3CB371);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  border: none;
  border-radius: var(--v239-radius);
  cursor: pointer;
  min-height: 44px;
  transition: all var(--v239-transition);
  text-align: center;
}

.v239-cta-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4);
  text-decoration: none;
  color: #fff;
}

.v239-cta-btn-danger {
  background: linear-gradient(135deg, var(--v239-danger), #FF6B35);
}

.v239-cta-btn-gold {
  background: linear-gradient(135deg, var(--v239-accent), #FFC107);
  color: #0F0F23;
}

/* ===== Affiliate Text Link ===== */
.v239-aff-link {
  color: var(--v239-accent);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px dashed var(--v239-accent);
}

.v239-aff-link:hover {
  color: var(--v239-primary);
  text-decoration: none;
}

/* ===== FAQ Accordion ===== */
.v239-faq-item {
  border: 1px solid var(--v239-border);
  border-radius: var(--v239-radius);
  margin-bottom: 0.8rem;
  overflow: hidden;
}

.v239-faq-q {
  padding: 1rem 1.2rem;
  background: var(--v239-bg-card);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--v239-text-white);
  cursor: pointer;
}

.v239-faq-a {
  padding: 0.8rem 1.2rem;
  font-size: 1.2rem;
  color: var(--v239-text-light);
  line-height: 1.5;
}

/* ===== Footer ===== */
.v239-footer {
  background: var(--v239-bg-dark);
  border-top: 1px solid var(--v239-border);
  padding: 2rem 1rem 3rem;
  margin-top: 2rem;
}

.v239-footer-brand {
  font-size: 1.3rem;
  color: var(--v239-text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.v239-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.v239-footer-links a {
  font-size: 1.1rem;
  color: var(--v239-text-light);
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--v239-border);
  border-radius: 4px;
  transition: all var(--v239-transition);
}

.v239-footer-links a:hover {
  color: var(--v239-accent);
  border-color: var(--v239-accent);
  text-decoration: none;
}

.v239-footer-aff-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.v239-footer-aff-btns button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--v239-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

.v239-copyright {
  text-align: center;
  font-size: 1.1rem;
  color: rgba(255, 204, 203, 0.5);
  padding-top: 1rem;
  border-top: 1px solid var(--v239-border);
}

/* ===== Bottom Navigation ===== */
.v239-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: linear-gradient(180deg, #1A1A3A 0%, var(--v239-bg-dark) 100%);
  border-top: 1px solid var(--v239-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 0.3rem;
}

.v239-bnav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--v239-text-light);
  cursor: pointer;
  min-width: 60px;
  min-height: 56px;
  transition: all var(--v239-transition);
  position: relative;
}

.v239-bnav-btn i,
.v239-bnav-btn .material-icons {
  font-size: 22px;
  margin-bottom: 2px;
}

.v239-bnav-btn ion-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.v239-bnav-label {
  font-size: 1rem;
  color: rgba(255, 204, 203, 0.7);
}

.v239-bnav-btn:hover,
.v239-bnav-active {
  color: var(--v239-accent);
}

.v239-bnav-active .v239-bnav-label {
  color: var(--v239-accent);
}

.v239-bnav-pressed {
  transform: scale(0.92);
}

/* ===== Utilities ===== */
.v239-text-center { text-align: center; }
.v239-text-gold { color: var(--v239-accent); }
.v239-text-green { color: var(--v239-primary); }
.v239-text-danger { color: var(--v239-danger); }
.v239-mt-1 { margin-top: 0.8rem; }
.v239-mt-2 { margin-top: 1.6rem; }
.v239-mb-1 { margin-bottom: 0.8rem; }
.v239-mb-2 { margin-bottom: 1.6rem; }

.v239-divider {
  border: none;
  border-top: 1px solid var(--v239-border);
  margin: 1.5rem 0;
}

/* ===== Card Style ===== */
.v239-card {
  background: var(--v239-bg-card);
  border: 1px solid var(--v239-border);
  border-radius: var(--v239-radius-lg);
  padding: 1.2rem;
}

/* ===== Winner Strip ===== */
.v239-winner-strip {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--v239-bg-card);
  border-radius: var(--v239-radius);
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--v239-accent);
}

.v239-winner-strip .v239-winner-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--v239-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.v239-winner-info {
  flex: 1;
  font-size: 1.2rem;
}

.v239-winner-amount {
  font-weight: 700;
  color: var(--v239-accent);
  font-size: 1.3rem;
}

/* ===== Responsive ===== */
@media (min-width: 769px) {
  .v239-bottom-nav {
    display: none;
  }
  .v239-menu-toggle {
    display: none;
  }
}

@media (max-width: 320px) {
  .v239-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .v239-game-item img {
    width: 56px;
    height: 56px;
  }
}
