/**
 * king jl Layout Stylesheet
 * Version: 1.0.0
 * All classes use w78d1- prefix for namespace isolation
 * Color palette: #228B22 | #FFEBCD | #2D2D2D | #00FF00
 */

/* CSS Variables */
:root {
  --w78d1-primary: #228B22;
  --w78d1-accent: #00FF00;
  --w78d1-bg: #2D2D2D;
  --w78d1-text: #FFEBCD;
  --w78d1-dark: #1a1a1a;
  --w78d1-card: #3a3a3a;
  --w78d1-border: #4a4a4a;
  --w78d1-gold: #FFD700;
  --w78d1-hover: #2ea62e;
  --w78d1-radius: 8px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--w78d1-bg);
  color: var(--w78d1-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--w78d1-accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--w78d1-gold); }

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

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

/* ====== HEADER ====== */
.w78d1-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 52px;
  background: linear-gradient(135deg, var(--w78d1-dark) 0%, var(--w78d1-bg) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1000;
  border-bottom: 2px solid var(--w78d1-primary);
}

.w78d1-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.w78d1-logo img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}
.w78d1-logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--w78d1-gold);
  letter-spacing: 0.5px;
}

.w78d1-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.w78d1-btn-register {
  background: linear-gradient(135deg, var(--w78d1-primary), #1a7a1a);
  color: #fff;
}
.w78d1-btn-register:hover {
  background: linear-gradient(135deg, var(--w78d1-hover), var(--w78d1-primary));
  transform: scale(1.05);
}

.w78d1-btn-login {
  background: linear-gradient(135deg, var(--w78d1-gold), #e6c200);
  color: var(--w78d1-dark);
}
.w78d1-btn-login:hover {
  transform: scale(1.05);
}

.w78d1-menu-toggle {
  background: transparent;
  border: 1px solid var(--w78d1-primary);
  color: var(--w78d1-accent);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.8rem;
}

/* ====== MOBILE MENU ====== */
.w78d1-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.w78d1-overlay-active {
  opacity: 1;
  visibility: visible;
}

.w78d1-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 260px;
  height: 100%;
  background: var(--w78d1-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}
.w78d1-menu-active {
  right: 0;
}

.w78d1-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.w78d1-menu-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--w78d1-gold);
}
.w78d1-menu-close {
  background: transparent;
  border: none;
  color: var(--w78d1-text);
  font-size: 2rem;
  cursor: pointer;
}

.w78d1-menu-links {
  list-style: none;
}
.w78d1-menu-links li {
  border-bottom: 1px solid var(--w78d1-border);
}
.w78d1-menu-links a {
  display: block;
  padding: 1.2rem 0;
  color: var(--w78d1-text);
  font-size: 1.4rem;
  transition: color 0.2s;
}
.w78d1-menu-links a:hover {
  color: var(--w78d1-accent);
}

/* ====== CAROUSEL ====== */
.w78d1-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--w78d1-radius);
  margin-top: 56px;
  aspect-ratio: 16/9;
}
.w78d1-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}
.w78d1-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.w78d1-slide-active {
  opacity: 1;
}

.w78d1-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}
.w78d1-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
}
.w78d1-dot-active {
  background: var(--w78d1-gold);
}

/* ====== MAIN CONTENT ====== */
.w78d1-main {
  padding: 1.2rem;
  padding-top: 0;
}

.w78d1-section {
  margin: 1.6rem 0;
}
.w78d1-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--w78d1-gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--w78d1-primary);
}

/* ====== GAME GRID ====== */
.w78d1-category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--w78d1-accent);
  margin: 1.4rem 0 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.w78d1-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
  text-align: center;
}
.w78d1-game-item:hover {
  transform: scale(1.05);
}
.w78d1-game-item img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--w78d1-border);
  margin-bottom: 0.3rem;
}
.w78d1-game-name {
  font-size: 1rem;
  color: var(--w78d1-text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80px;
}

/* ====== CONTENT CARDS ====== */
.w78d1-card {
  background: var(--w78d1-card);
  border-radius: var(--w78d1-radius);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--w78d1-border);
}

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

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

.w78d1-promo-link {
  display: inline-block;
  color: var(--w78d1-accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: 1.3rem;
  margin-top: 0.5rem;
}
.w78d1-promo-link:hover {
  color: var(--w78d1-gold);
}

/* ====== CTA BUTTON ====== */
.w78d1-cta {
  display: block;
  width: 100%;
  padding: 1.2rem;
  background: linear-gradient(135deg, var(--w78d1-primary), #1a7a1a);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  border: none;
  border-radius: var(--w78d1-radius);
  cursor: pointer;
  transition: all 0.3s;
  margin: 1rem 0;
}
.w78d1-cta:hover {
  background: linear-gradient(135deg, var(--w78d1-hover), var(--w78d1-primary));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34,139,34,0.4);
}

/* ====== FOOTER ====== */
.w78d1-footer {
  background: var(--w78d1-dark);
  padding: 2rem 1.2rem 6rem;
  border-top: 2px solid var(--w78d1-primary);
}
.w78d1-footer-brand {
  font-size: 1.3rem;
  color: #aaa;
  line-height: 1.6rem;
  margin-bottom: 1.2rem;
}
.w78d1-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.w78d1-footer-links a {
  color: var(--w78d1-accent);
  font-size: 1.2rem;
  padding: 0.4rem 0.8rem;
  background: var(--w78d1-card);
  border-radius: 4px;
  transition: all 0.2s;
}
.w78d1-footer-links a:hover {
  background: var(--w78d1-primary);
  color: #fff;
}
.w78d1-footer-copy {
  font-size: 1.1rem;
  color: #777;
  text-align: center;
  margin-top: 1rem;
}

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

.w78d1-bottom-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 54px;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  gap: 2px;
}
.w78d1-bottom-btn:hover,
.w78d1-bottom-btn-active {
  color: var(--w78d1-accent);
  transform: scale(1.1);
}
.w78d1-bottom-btn .material-icons,
.w78d1-bottom-btn ion-icon {
  font-size: 24px;
}
.w78d1-bottom-btn span {
  font-size: 1rem;
  line-height: 1;
}

/* ====== HELPERS ====== */
.w78d1-text-center { text-align: center; }
.w78d1-mt-1 { margin-top: 0.8rem; }
.w78d1-mt-2 { margin-top: 1.6rem; }
.w78d1-mb-1 { margin-bottom: 0.8rem; }
.w78d1-mb-2 { margin-bottom: 1.6rem; }

.w78d1-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--w78d1-primary);
  color: #fff;
  font-size: 1rem;
  border-radius: 4px;
  font-weight: 600;
}

/* ====== RESPONSIVE ====== */
@media (min-width: 769px) {
  .w78d1-bottom-nav {
    display: none;
  }
}

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

/* FAQ styles for help pages */
.w78d1-faq-item {
  background: var(--w78d1-card);
  border-radius: var(--w78d1-radius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--w78d1-border);
}
.w78d1-faq-q {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--w78d1-gold);
  margin-bottom: 0.4rem;
}
.w78d1-faq-a {
  font-size: 1.2rem;
  color: var(--w78d1-text);
  line-height: 1.5rem;
}

/* Winner showcase */
.w78d1-winner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--w78d1-border);
}
.w78d1-winner-name {
  font-size: 1.2rem;
  color: var(--w78d1-text);
}
.w78d1-winner-amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--w78d1-accent);
}
.w78d1-winner-game {
  font-size: 1.1rem;
  color: #888;
}

/* Payment icons */
.w78d1-payment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  padding: 0.8rem 0;
}
.w78d1-payment-item {
  background: var(--w78d1-card);
  border: 1px solid var(--w78d1-border);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  color: var(--w78d1-text);
}

/* Testimonial */
.w78d1-testimonial {
  background: var(--w78d1-card);
  border-left: 3px solid var(--w78d1-primary);
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-radius: 0 var(--w78d1-radius) var(--w78d1-radius) 0;
}
.w78d1-testimonial-text {
  font-size: 1.2rem;
  color: var(--w78d1-text);
  line-height: 1.5rem;
  font-style: italic;
}
.w78d1-testimonial-author {
  font-size: 1.1rem;
  color: var(--w78d1-gold);
  margin-top: 0.4rem;
}
