/**
 * km77 Core Stylesheet
 * All classes use w8b38- prefix for namespace isolation
 * Color palette: #1E1E1E (bg) | #ECF0F1 (text) | #D3D3D3 (muted)
 * @version 1.0.0
 */

/* === CSS Variables === */
:root {
  --w8b38-primary: #C9A84C;
  --w8b38-primary-light: #E0C878;
  --w8b38-primary-dark: #A88A30;
  --w8b38-bg: #1E1E1E;
  --w8b38-bg-light: #2A2A2A;
  --w8b38-bg-card: #262626;
  --w8b38-bg-hover: #333333;
  --w8b38-text: #ECF0F1;
  --w8b38-text-muted: #D3D3D3;
  --w8b38-text-dim: #888888;
  --w8b38-border: #3A3A3A;
  --w8b38-accent: #E74C3C;
  --w8b38-success: #27AE60;
  --w8b38-header-h: 56px;
  --w8b38-bottom-h: 60px;
  --w8b38-radius: 8px;
  --w8b38-radius-sm: 4px;
  --w8b38-shadow: 0 2px 12px rgba(0,0,0,0.4);
  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: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--w8b38-bg);
  color: var(--w8b38-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--w8b38-primary-light);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--w8b38-primary);
}

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

/* === Main Container === */
.w8b38-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
  width: 100%;
}

.w8b38-main {
  padding-top: calc(var(--w8b38-header-h) + 8px);
  padding-bottom: 2rem;
}

@media (max-width: 768px) {
  .w8b38-main {
    padding-bottom: calc(var(--w8b38-bottom-h) + 16px);
  }
}

/* === Header === */
.w8b38-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--w8b38-header-h);
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-bottom: 1px solid var(--w8b38-primary-dark);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  max-width: 100%;
  box-shadow: var(--w8b38-shadow);
}

.w8b38-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.w8b38-logo img {
  width: 28px;
  height: 28px;
  border-radius: var(--w8b38-radius-sm);
}

.w8b38-logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--w8b38-primary);
  letter-spacing: 0.5px;
}

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

.w8b38-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: var(--w8b38-radius);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.w8b38-btn-register {
  background: linear-gradient(135deg, var(--w8b38-primary), var(--w8b38-primary-dark));
  color: #1a1a1a;
}
.w8b38-btn-register:hover {
  background: linear-gradient(135deg, var(--w8b38-primary-light), var(--w8b38-primary));
  transform: translateY(-1px);
}

.w8b38-btn-login {
  background: transparent;
  color: var(--w8b38-primary);
  border: 1.5px solid var(--w8b38-primary);
}
.w8b38-btn-login:hover {
  background: rgba(201,168,76,0.12);
}

.w8b38-menu-btn {
  background: none;
  border: none;
  color: var(--w8b38-text);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
  transition: color 0.2s;
}
.w8b38-menu-btn:hover {
  color: var(--w8b38-primary);
}

/* === Mobile Menu === */
.w8b38-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.w8b38-overlay-active {
  opacity: 1;
  pointer-events: auto;
}

.w8b38-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: #1a1a1a;
  z-index: 9999;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 2rem 0;
  border-left: 1px solid var(--w8b38-border);
}
.w8b38-menu-active {
  right: 0;
}

.w8b38-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--w8b38-text);
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
}
.w8b38-menu-close:hover {
  color: var(--w8b38-primary);
}

.w8b38-menu-list {
  list-style: none;
  padding: 1rem 0;
}

.w8b38-menu-item {
  border-bottom: 1px solid var(--w8b38-border);
}

.w8b38-menu-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 2rem;
  color: var(--w8b38-text);
  font-size: 1.4rem;
  transition: all 0.2s;
}
.w8b38-menu-link:hover {
  background: var(--w8b38-bg-hover);
  color: var(--w8b38-primary);
}
.w8b38-menu-link i,
.w8b38-menu-link .material-icons-outlined {
  font-size: 2rem;
  width: 24px;
  text-align: center;
}

/* === Carousel === */
.w8b38-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--w8b38-radius);
  margin: 1rem 0;
}

.w8b38-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
}

.w8b38-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  cursor: pointer;
}
.w8b38-slide-active {
  opacity: 1;
}

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

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

.w8b38-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s;
  border: none;
}
.w8b38-dot-active {
  background: var(--w8b38-primary);
}

/* === Section Headings === */
.w8b38-section {
  margin: 2rem 0;
}

.w8b38-section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--w8b38-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--w8b38-primary-dark);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.w8b38-section-title i {
  font-size: 2rem;
}

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

.w8b38-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-align: center;
}
.w8b38-game-item:hover {
  transform: scale(1.05);
}

.w8b38-game-img {
  width: 72px;
  height: 72px;
  border-radius: var(--w8b38-radius);
  object-fit: cover;
  border: 2px solid var(--w8b38-border);
  margin-bottom: 0.4rem;
  transition: border-color 0.2s;
}
.w8b38-game-item:hover .w8b38-game-img {
  border-color: var(--w8b38-primary);
}

.w8b38-game-name {
  font-size: 1.1rem;
  color: var(--w8b38-text-muted);
  line-height: 1.3;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Category Tabs === */
.w8b38-cat-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--w8b38-primary-light);
  margin: 1.5rem 0 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.w8b38-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--w8b38-primary);
  margin-bottom: 0.8rem;
}

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

/* === Promo Link === */
.w8b38-promo-link {
  color: var(--w8b38-primary);
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: underline;
}
.w8b38-promo-link:hover {
  color: var(--w8b38-primary-light);
}

.w8b38-btn-promo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--w8b38-primary), var(--w8b38-primary-dark));
  color: #1a1a1a;
  padding: 0.8rem 1.8rem;
  border-radius: var(--w8b38-radius);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  margin: 0.5rem 0;
}
.w8b38-btn-promo:hover {
  background: linear-gradient(135deg, var(--w8b38-primary-light), var(--w8b38-primary));
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

/* === Footer === */
.w8b38-footer {
  background: #141414;
  border-top: 1px solid var(--w8b38-border);
  padding: 2rem 0;
  margin-top: 2rem;
}

.w8b38-footer-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.w8b38-footer-brand p {
  color: var(--w8b38-text-dim);
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 360px;
  margin: 0.4rem auto;
}

.w8b38-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.2rem 0;
}

.w8b38-footer-link {
  color: var(--w8b38-text-muted);
  font-size: 1.1rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--w8b38-radius-sm);
  transition: all 0.2s;
}
.w8b38-footer-link:hover {
  color: var(--w8b38-primary);
  background: rgba(201,168,76,0.1);
}

.w8b38-footer-promos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.2rem 0;
}

.w8b38-footer-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--w8b38-bg-light);
  color: var(--w8b38-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--w8b38-radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--w8b38-border);
  transition: all 0.2s;
}
.w8b38-footer-promo-btn:hover {
  background: var(--w8b38-primary);
  color: #1a1a1a;
}

.w8b38-copyright {
  text-align: center;
  color: var(--w8b38-text-dim);
  font-size: 1.1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--w8b38-border);
}

/* === Bottom Navigation (Mobile) === */
.w8b38-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--w8b38-bottom-h);
  background: linear-gradient(180deg, #222222 0%, #1a1a1a 100%);
  border-top: 2px solid var(--w8b38-primary-dark);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
}

.w8b38-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--w8b38-text-dim);
  cursor: pointer;
  padding: 0.4rem;
  min-width: 60px;
  min-height: 56px;
  transition: all 0.25s ease;
  position: relative;
}

.w8b38-nav-btn i,
.w8b38-nav-btn .material-icons-outlined,
.w8b38-nav-btn .material-icons {
  font-size: 22px;
  transition: transform 0.2s, color 0.2s;
}

.w8b38-nav-btn span {
  font-size: 1rem;
  margin-top: 2px;
  font-weight: 500;
}

.w8b38-nav-btn:hover,
.w8b38-nav-btn:focus {
  color: var(--w8b38-primary);
}

.w8b38-nav-btn:hover i,
.w8b38-nav-btn:hover .material-icons-outlined,
.w8b38-nav-btn:hover .material-icons {
  transform: scale(1.15);
}

.w8b38-nav-btn-active {
  color: var(--w8b38-primary);
}

.w8b38-nav-btn-active::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--w8b38-primary);
  border-radius: 2px;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .w8b38-bottom-nav {
    display: none;
  }
}

/* === Info Boxes === */
.w8b38-info-box {
  background: linear-gradient(135deg, var(--w8b38-bg-card), var(--w8b38-bg-light));
  border-radius: var(--w8b38-radius);
  padding: 1.2rem;
  margin-bottom: 0.8rem;
  border-left: 3px solid var(--w8b38-primary);
}

.w8b38-info-box h3 {
  font-size: 1.3rem;
  color: var(--w8b38-primary);
  margin-bottom: 0.4rem;
}

.w8b38-info-box p {
  font-size: 1.2rem;
  color: var(--w8b38-text-muted);
  line-height: 1.5;
}

/* === Winner List === */
.w8b38-winner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--w8b38-border);
}

.w8b38-winner-row:last-child {
  border-bottom: none;
}

.w8b38-winner-name {
  color: var(--w8b38-text);
  font-weight: 600;
  font-size: 1.2rem;
}

.w8b38-winner-game {
  color: var(--w8b38-text-dim);
  font-size: 1.1rem;
}

.w8b38-winner-amount {
  color: var(--w8b38-primary);
  font-weight: 700;
  font-size: 1.2rem;
}

/* === Testimonial === */
.w8b38-testimonial {
  background: var(--w8b38-bg-card);
  border-radius: var(--w8b38-radius);
  padding: 1.2rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--w8b38-border);
}

.w8b38-testimonial-text {
  font-size: 1.2rem;
  color: var(--w8b38-text-muted);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

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

/* === Utilities === */
.w8b38-text-center { text-align: center; }
.w8b38-mt-1 { margin-top: 0.5rem; }
.w8b38-mt-2 { margin-top: 1rem; }
.w8b38-mb-1 { margin-bottom: 0.5rem; }
.w8b38-mb-2 { margin-bottom: 1rem; }
.w8b38-hidden { display: none; }
.w8b38-flex { display: flex; }
.w8b38-flex-center { display: flex; align-items: center; justify-content: center; }
.w8b38-gap-1 { gap: 0.5rem; }
.w8b38-gap-2 { gap: 1rem; }

/* === Desktop Navigation (shown on wider screens) === */
.w8b38-desktop-nav {
  display: none;
}

@media (min-width: 769px) {
  .w8b38-container {
    max-width: 430px;
  }
  .w8b38-desktop-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
  }
  .w8b38-desktop-nav a {
    color: var(--w8b38-text-muted);
    font-size: 1.3rem;
    transition: color 0.2s;
  }
  .w8b38-desktop-nav a:hover {
    color: var(--w8b38-primary);
  }
}

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

.w8b38-faq-q {
  padding: 1rem 1.2rem;
  font-weight: 700;
  color: var(--w8b38-primary);
  font-size: 1.3rem;
  cursor: default;
}

.w8b38-faq-a {
  padding: 0 1.2rem 1rem;
  color: var(--w8b38-text-muted);
  font-size: 1.2rem;
  line-height: 1.6;
}

/* === How-to Steps === */
.w8b38-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
  align-items: flex-start;
}

.w8b38-step-num {
  min-width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--w8b38-primary), var(--w8b38-primary-dark));
  color: #1a1a1a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
}

.w8b38-step-content h3 {
  font-size: 1.3rem;
  color: var(--w8b38-primary);
  margin-bottom: 0.3rem;
}

.w8b38-step-content p {
  font-size: 1.2rem;
  color: var(--w8b38-text-muted);
  line-height: 1.5;
}

/* === Payment Icons === */
.w8b38-payment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin: 1rem 0;
}

.w8b38-payment-item {
  background: var(--w8b38-bg-light);
  padding: 0.5rem 1rem;
  border-radius: var(--w8b38-radius-sm);
  font-size: 1.2rem;
  color: var(--w8b38-text-muted);
  border: 1px solid var(--w8b38-border);
}

/* === Achievement Badges === */
.w8b38-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(201,168,76,0.1);
  color: var(--w8b38-primary);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
}

/* === CTA Section === */
.w8b38-cta-section {
  background: linear-gradient(135deg, var(--w8b38-primary-dark), var(--w8b38-primary));
  border-radius: var(--w8b38-radius);
  padding: 2rem;
  text-align: center;
  margin: 1.5rem 0;
}

.w8b38-cta-section h2 {
  color: #1a1a1a;
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.w8b38-cta-section p {
  color: #2a2a2a;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.w8b38-cta-btn {
  display: inline-block;
  background: #1a1a1a;
  color: var(--w8b38-primary);
  padding: 0.8rem 2rem;
  border-radius: var(--w8b38-radius);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
}
.w8b38-cta-btn:hover {
  background: #2a2a2a;
  transform: translateY(-2px);
}
