/**
 * jili pg - Core Stylesheet
 * All classes use sb2d- prefix for namespace isolation
 * Color palette: #4A4A4A | #00FF00 | #0E1621 | #A9A9A9
 * Mobile-first design, max-width 430px
 */

:root {
  --sb2d-primary: #00FF00;
  --sb2d-bg: #0E1621;
  --sb2d-text: #A9A9A9;
  --sb2d-dark: #4A4A4A;
  --sb2d-white: #FFFFFF;
  --sb2d-accent: #00FF00;
  --sb2d-card-bg: #151f2e;
  --sb2d-border: #1e2d40;
  --sb2d-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --sb2d-radius: 8px;
}

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

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

body {
  font-family: var(--sb2d-font);
  background-color: var(--sb2d-bg);
  color: var(--sb2d-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  max-width: 430px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--sb2d-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Container */
.sb2d-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

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

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

.sb2d-logo-area span {
  color: var(--sb2d-primary);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sb2d-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sb2d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--sb2d-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  min-height: 32px;
}

.sb2d-btn-register {
  background: var(--sb2d-primary);
  color: var(--sb2d-bg);
}

.sb2d-btn-register:hover {
  background: #00cc00;
}

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

.sb2d-btn-login:hover {
  background: rgba(0, 255, 0, 0.1);
}

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

/* Mobile Menu */
.sb2d-mobile-menu {
  display: none;
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--sb2d-card-bg);
  z-index: 9999;
  border-bottom: 2px solid var(--sb2d-primary);
  padding: 0.5rem 0;
}

.sb2d-mobile-menu a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--sb2d-text);
  font-size: 1.4rem;
  border-bottom: 1px solid var(--sb2d-border);
  transition: all 0.2s;
}

.sb2d-mobile-menu a:hover {
  color: var(--sb2d-primary);
  background: rgba(0, 255, 0, 0.05);
  text-decoration: none;
}

.sb2d-menu-active {
  display: block !important;
}

/* Main Content */
.sb2d-main {
  padding-top: 56px;
}

/* Carousel */
.sb2d-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0 0 var(--sb2d-radius) var(--sb2d-radius);
}

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

.sb2d-carousel-slide img {
  width: 100%;
  height: auto;
  min-height: 160px;
  object-fit: cover;
}

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

.sb2d-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s;
}

.sb2d-dot-active {
  background: var(--sb2d-primary);
}

/* Section */
.sb2d-section {
  padding: 1.5rem 1rem;
}

.sb2d-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sb2d-white);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--sb2d-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sb2d-section-title i,
.sb2d-section-title .material-icons {
  color: var(--sb2d-primary);
  font-size: 1.8rem;
}

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

.sb2d-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--sb2d-radius);
  transition: transform 0.2s;
  background: var(--sb2d-card-bg);
  border: 1px solid var(--sb2d-border);
}

.sb2d-game-item:hover {
  transform: scale(1.04);
  border-color: var(--sb2d-primary);
}

.sb2d-game-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 0.3rem;
}

.sb2d-game-item span {
  font-size: 1rem;
  color: var(--sb2d-text);
  text-align: center;
  line-height: 1.2rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 2.4rem;
}

/* Category Tabs */
.sb2d-cat-label {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sb2d-primary);
  margin: 1.2rem 0 0.6rem 0;
  padding: 0.3rem 0.8rem;
  background: rgba(0, 255, 0, 0.08);
  border-radius: 4px;
  display: inline-block;
}

/* Cards */
.sb2d-card {
  background: var(--sb2d-card-bg);
  border: 1px solid var(--sb2d-border);
  border-radius: var(--sb2d-radius);
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.sb2d-card h3 {
  color: var(--sb2d-white);
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

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

/* CTA / Promo Links */
.sb2d-cta {
  display: inline-block;
  background: var(--sb2d-primary);
  color: var(--sb2d-bg);
  padding: 0.8rem 1.6rem;
  border-radius: var(--sb2d-radius);
  font-weight: 700;
  font-size: 1.3rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  border: none;
}

.sb2d-cta:hover {
  background: #00cc00;
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--sb2d-bg);
}

.sb2d-text-link {
  color: var(--sb2d-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

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

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

.sb2d-bottom-nav-btn:hover,
.sb2d-bottom-nav-btn.sb2d-nav-active {
  color: var(--sb2d-primary);
}

.sb2d-bottom-nav-btn .sb2d-nav-icon {
  font-size: 22px;
  line-height: 1;
}

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

/* Footer */
.sb2d-footer {
  background: var(--sb2d-card-bg);
  border-top: 1px solid var(--sb2d-border);
  padding: 1.5rem 1rem 8rem;
}

.sb2d-footer-brand {
  color: var(--sb2d-primary);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.sb2d-footer-desc {
  color: var(--sb2d-text);
  font-size: 1.2rem;
  line-height: 1.5rem;
  margin-bottom: 1rem;
}

.sb2d-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sb2d-footer-links a {
  color: var(--sb2d-primary);
  font-size: 1.1rem;
  padding: 0.3rem 0.6rem;
  background: rgba(0, 255, 0, 0.06);
  border-radius: 4px;
  transition: all 0.2s;
}

.sb2d-footer-links a:hover {
  background: rgba(0, 255, 0, 0.15);
  text-decoration: none;
}

.sb2d-footer-copy {
  color: var(--sb2d-dark);
  font-size: 1.1rem;
  border-top: 1px solid var(--sb2d-border);
  padding-top: 1rem;
  text-align: center;
}

/* Promo buttons in footer */
.sb2d-footer-promos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sb2d-footer-promos .sb2d-cta {
  padding: 0.5rem 1rem;
  font-size: 1.1rem;
}

/* Toast */
.sb2d-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sb2d-primary);
  color: var(--sb2d-bg);
  padding: 1rem 2rem;
  border-radius: var(--sb2d-radius);
  font-weight: 600;
  font-size: 1.3rem;
  z-index: 9999;
  transition: opacity 0.5s;
}

.sb2d-toast-fade {
  opacity: 0;
}

/* FAQ */
.sb2d-faq-item {
  background: var(--sb2d-card-bg);
  border: 1px solid var(--sb2d-border);
  border-radius: var(--sb2d-radius);
  padding: 1rem;
  margin-bottom: 0.8rem;
}

.sb2d-faq-item h4 {
  color: var(--sb2d-primary);
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.sb2d-faq-item p {
  color: var(--sb2d-text);
  font-size: 1.2rem;
  line-height: 1.5rem;
}

/* Feature list */
.sb2d-feature-list {
  list-style: none;
  padding: 0;
}

.sb2d-feature-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--sb2d-border);
  color: var(--sb2d-text);
  font-size: 1.3rem;
  line-height: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.sb2d-feature-list li i {
  color: var(--sb2d-primary);
  margin-top: 0.2rem;
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* Winner showcase */
.sb2d-winner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.sb2d-winner-item {
  background: var(--sb2d-card-bg);
  border: 1px solid var(--sb2d-border);
  border-radius: var(--sb2d-radius);
  padding: 0.8rem;
  text-align: center;
}

.sb2d-winner-item .sb2d-winner-name {
  color: var(--sb2d-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.sb2d-winner-item .sb2d-winner-amount {
  color: var(--sb2d-white);
  font-size: 1.4rem;
  font-weight: 700;
}

.sb2d-winner-item .sb2d-winner-game {
  color: var(--sb2d-text);
  font-size: 1rem;
}

/* Mobile bottom padding */
@media (max-width: 768px) {
  .sb2d-main {
    padding-bottom: 80px;
  }
}

/* Desktop: hide bottom nav */
@media (min-width: 769px) {
  .sb2d-bottom-nav {
    display: none;
  }

  body {
    max-width: 430px;
  }
}

/* H1 title */
.sb2d-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sb2d-white);
  text-align: center;
  padding: 1rem;
  margin: 0;
  line-height: 1.4;
}

/* Highlight text */
.sb2d-highlight {
  color: var(--sb2d-primary);
  font-weight: 600;
}

/* Steps */
.sb2d-steps {
  counter-reset: sb2d-step;
  list-style: none;
  padding: 0;
}

.sb2d-steps li {
  counter-increment: sb2d-step;
  padding: 0.8rem 0 0.8rem 3rem;
  position: relative;
  border-bottom: 1px solid var(--sb2d-border);
  color: var(--sb2d-text);
  font-size: 1.3rem;
  line-height: 1.5rem;
}

.sb2d-steps li::before {
  content: counter(sb2d-step);
  position: absolute;
  left: 0;
  top: 0.8rem;
  width: 2.2rem;
  height: 2.2rem;
  background: var(--sb2d-primary);
  color: var(--sb2d-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

/* Testimonial */
.sb2d-testimonial {
  background: var(--sb2d-card-bg);
  border-left: 3px solid var(--sb2d-primary);
  border-radius: var(--sb2d-radius);
  padding: 1rem;
  margin-bottom: 0.8rem;
}

.sb2d-testimonial p {
  color: var(--sb2d-text);
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 0.4rem;
}

.sb2d-testimonial .sb2d-testimonial-author {
  color: var(--sb2d-primary);
  font-size: 1.1rem;
  font-weight: 600;
}
