/**
 * King PH App - Design Stylesheet
 * All classes use s4a8- prefix for namespace isolation
 * Color palette: #FF5722 (orange) | #FFCC02 (gold) | #2C3E50 (dark navy)
 */

/* CSS Variables */
:root {
  --s4a8-primary: #FF5722;
  --s4a8-accent: #FFCC02;
  --s4a8-dark: #2C3E50;
  --s4a8-bg: #1a1a2e;
  --s4a8-card-bg: #16213e;
  --s4a8-text: #f0f0f0;
  --s4a8-text-muted: #a0a8b8;
  --s4a8-border: #2a3a5c;
  --s4a8-gradient: linear-gradient(135deg, #FF5722 0%, #FFCC02 100%);
  --s4a8-shadow: 0 4px 15px rgba(0,0,0,0.3);
  --s4a8-radius: 10px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 62.5%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background-color: var(--s4a8-bg);
  color: var(--s4a8-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  overflow-x: hidden;
  max-width: 430px;
  margin: 0 auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--s4a8-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Container */
.s4a8-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 12px; }
.s4a8-wrapper { padding: 16px 12px; }
.s4a8-section { padding: 20px 0; }

/* Header */
.s4a8-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--s4a8-dark);
  border-bottom: 2px solid var(--s4a8-primary);
  max-width: 430px; margin: 0 auto;
}
.s4a8-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; height: 54px;
}
.s4a8-logo { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.s4a8-logo img { width: 28px; height: 28px; border-radius: 4px; }
.s4a8-logo-text { font-size: 1.5rem; font-weight: 700; color: var(--s4a8-accent); letter-spacing: 0.5px; }
.s4a8-header-btns { display: flex; gap: 8px; align-items: center; }
.s4a8-btn-login {
  background: transparent; border: 1px solid var(--s4a8-primary);
  color: var(--s4a8-primary); padding: 6px 14px; border-radius: 6px;
  font-size: 1.2rem; font-weight: 600; cursor: pointer; transition: all 0.3s;
}
.s4a8-btn-login:hover { background: var(--s4a8-primary); color: #fff; }
.s4a8-btn-register {
  background: var(--s4a8-gradient); border: none; color: var(--s4a8-dark);
  padding: 6px 14px; border-radius: 6px; font-size: 1.2rem; font-weight: 700;
  cursor: pointer; transition: all 0.3s; box-shadow: 0 2px 8px rgba(255,87,34,0.4);
}
.s4a8-btn-register:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(255,87,34,0.6); }
.s4a8-menu-toggle {
  background: none; border: none; color: var(--s4a8-text);
  font-size: 2rem; cursor: pointer; padding: 4px 8px;
  display: flex; align-items: center; justify-content: center;
}

/* Mobile Menu */
.s4a8-mobile-menu {
  position: fixed; top: 0; right: -280px; width: 280px; height: 100vh;
  background: var(--s4a8-dark); z-index: 9999; transition: right 0.3s ease;
  padding: 20px; overflow-y: auto;
}
.s4a8-menu-active { right: 0 !important; }
.s4a8-menu-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 9998; display: none;
}
.s4a8-overlay-active { display: block !important; }
.s4a8-menu-close {
  background: none; border: none; color: var(--s4a8-text);
  font-size: 2.4rem; cursor: pointer; position: absolute; top: 12px; right: 16px;
}
.s4a8-menu-title {
  font-size: 1.6rem; font-weight: 700; color: var(--s4a8-accent);
  padding-bottom: 16px; border-bottom: 1px solid var(--s4a8-border); margin-bottom: 12px;
}
.s4a8-menu-list { list-style: none; }
.s4a8-menu-list li { border-bottom: 1px solid var(--s4a8-border); }
.s4a8-menu-list a {
  display: block; padding: 14px 8px; color: var(--s4a8-text);
  font-size: 1.4rem; transition: color 0.2s;
}
.s4a8-menu-list a:hover { color: var(--s4a8-accent); text-decoration: none; }

/* Main Content */
.s4a8-main { margin-top: 54px; }
@media (max-width: 768px) {
  .s4a8-main { padding-bottom: 80px; }
}

/* Carousel */
.s4a8-carousel { position: relative; overflow: hidden; border-radius: 0 0 12px 12px; }
.s4a8-carousel-track { display: flex; transition: transform 0.5s ease; }
.s4a8-slide { min-width: 100%; cursor: pointer; position: relative; }
.s4a8-slide img { width: 100%; height: 180px; object-fit: cover; }
.s4a8-carousel-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.s4a8-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4);
  border: none; cursor: pointer; transition: all 0.3s;
}
.s4a8-dot-active { background: var(--s4a8-accent); transform: scale(1.3); }

/* Section Titles */
.s4a8-section-title {
  font-size: 1.8rem; font-weight: 700; color: var(--s4a8-accent);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--s4a8-primary);
  display: flex; align-items: center; gap: 8px;
}
.s4a8-section-title i, .s4a8-section-title .material-icons { font-size: 2rem; color: var(--s4a8-primary); }

/* Game Grid */
.s4a8-game-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 8px 0;
}
.s4a8-game-card {
  background: var(--s4a8-card-bg); border-radius: var(--s4a8-radius);
  overflow: hidden; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--s4a8-border);
}
.s4a8-game-card:hover { transform: translateY(-3px); box-shadow: var(--s4a8-shadow); }
.s4a8-game-card img { width: 100%; height: 80px; object-fit: cover; }
.s4a8-game-name {
  padding: 6px 4px; font-size: 1.1rem; text-align: center;
  color: var(--s4a8-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}

/* Category Header */
.s4a8-cat-header {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 10px; padding: 8px 12px;
  background: linear-gradient(90deg, rgba(255,87,34,0.15) 0%, transparent 100%);
  border-left: 3px solid var(--s4a8-primary); border-radius: 0 8px 8px 0;
}
.s4a8-cat-header h2 {
  font-size: 1.5rem; font-weight: 700; color: var(--s4a8-text);
}

/* Content Cards */
.s4a8-card {
  background: var(--s4a8-card-bg); border-radius: var(--s4a8-radius);
  padding: 16px; margin-bottom: 12px;
  border: 1px solid var(--s4a8-border);
}
.s4a8-card h3 { font-size: 1.5rem; color: var(--s4a8-accent); margin-bottom: 8px; }
.s4a8-card p { color: var(--s4a8-text-muted); line-height: 1.6; margin-bottom: 8px; }

/* Promo Button */
.s4a8-promo-btn {
  display: inline-block; background: var(--s4a8-gradient);
  color: var(--s4a8-dark); padding: 10px 24px; border-radius: 25px;
  font-weight: 700; font-size: 1.3rem; cursor: pointer;
  border: none; transition: all 0.3s; text-decoration: none;
  box-shadow: 0 3px 10px rgba(255,87,34,0.4);
}
.s4a8-promo-btn:hover { transform: scale(1.05); text-decoration: none; box-shadow: 0 5px 15px rgba(255,87,34,0.6); }

/* Text link */
.s4a8-text-link { color: var(--s4a8-primary); font-weight: 600; cursor: pointer; }
.s4a8-text-link:hover { text-decoration: underline; }

/* Feature Grid */
.s4a8-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.s4a8-feature-item {
  background: var(--s4a8-card-bg); padding: 14px; border-radius: var(--s4a8-radius);
  text-align: center; border: 1px solid var(--s4a8-border);
}
.s4a8-feature-item i, .s4a8-feature-item .material-icons { font-size: 2.4rem; color: var(--s4a8-primary); margin-bottom: 6px; }
.s4a8-feature-item h4 { font-size: 1.2rem; color: var(--s4a8-accent); margin-bottom: 4px; }
.s4a8-feature-item p { font-size: 1.1rem; color: var(--s4a8-text-muted); }

/* Stats Row */
.s4a8-stats-row { display: flex; justify-content: space-around; text-align: center; padding: 16px 0; }
.s4a8-stat-item h4 { font-size: 2rem; color: var(--s4a8-accent); font-weight: 700; }
.s4a8-stat-item p { font-size: 1.1rem; color: var(--s4a8-text-muted); }

/* Footer */
.s4a8-footer {
  background: var(--s4a8-dark); padding: 24px 12px 16px;
  border-top: 2px solid var(--s4a8-primary); margin-top: 20px;
}
.s4a8-footer-brand { text-align: center; margin-bottom: 16px; }
.s4a8-footer-brand p { font-size: 1.2rem; color: var(--s4a8-text-muted); margin: 4px 0; line-height: 1.5; }
.s4a8-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.s4a8-footer-links a {
  background: rgba(255,87,34,0.1); border: 1px solid var(--s4a8-border);
  color: var(--s4a8-text); padding: 6px 12px; border-radius: 6px;
  font-size: 1.1rem; transition: all 0.2s;
}
.s4a8-footer-links a:hover { background: var(--s4a8-primary); color: #fff; text-decoration: none; }
.s4a8-footer-copy { text-align: center; font-size: 1.1rem; color: var(--s4a8-text-muted); padding-top: 12px; border-top: 1px solid var(--s4a8-border); }

/* Bottom Navigation */
.s4a8-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  background: var(--s4a8-dark); border-top: 2px solid var(--s4a8-primary);
  display: flex; justify-content: space-around; align-items: center;
  height: 60px; max-width: 430px; margin: 0 auto;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}
.s4a8-nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: none; border: none; color: var(--s4a8-text-muted);
  cursor: pointer; min-width: 60px; min-height: 56px;
  transition: all 0.2s; padding: 4px 0;
}
.s4a8-nav-btn i, .s4a8-nav-btn .material-icons, .s4a8-nav-btn ion-icon, .s4a8-nav-btn bi {
  font-size: 22px; margin-bottom: 2px; transition: all 0.2s;
}
.s4a8-nav-btn span { font-size: 1rem; font-weight: 500; }
.s4a8-nav-btn:hover, .s4a8-nav-btn-active {
  color: var(--s4a8-accent);
}
.s4a8-nav-btn:hover i, .s4a8-nav-btn:hover .material-icons,
.s4a8-nav-btn:hover ion-icon, .s4a8-nav-btn-active i,
.s4a8-nav-btn-active .material-icons, .s4a8-nav-btn-active ion-icon {
  transform: scale(1.15); color: var(--s4a8-accent);
}
@media (min-width: 769px) {
  .s4a8-bottom-nav { display: none; }
}

/* FAQ Accordion */
.s4a8-faq-item { background: var(--s4a8-card-bg); border-radius: var(--s4a8-radius); margin-bottom: 8px; border: 1px solid var(--s4a8-border); overflow: hidden; }
.s4a8-faq-q {
  padding: 12px 16px; font-weight: 600; font-size: 1.3rem; color: var(--s4a8-text);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.s4a8-faq-a { padding: 0 16px 12px; color: var(--s4a8-text-muted); line-height: 1.5; font-size: 1.2rem; }

/* Testimonial */
.s4a8-testimonial {
  background: var(--s4a8-card-bg); border-radius: var(--s4a8-radius);
  padding: 14px; margin-bottom: 10px; border-left: 3px solid var(--s4a8-accent);
}
.s4a8-testimonial p { font-size: 1.2rem; color: var(--s4a8-text-muted); font-style: italic; margin-bottom: 6px; }
.s4a8-testimonial span { font-size: 1.1rem; color: var(--s4a8-accent); font-weight: 600; }

/* Payment Icons */
.s4a8-payment-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; }
.s4a8-payment-item {
  background: var(--s4a8-card-bg); padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--s4a8-border); font-size: 1.2rem; color: var(--s4a8-text);
}

/* Winner Showcase */
.s4a8-winner-list { display: flex; flex-direction: column; gap: 8px; }
.s4a8-winner-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--s4a8-card-bg); padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--s4a8-border);
}
.s4a8-winner-name { font-weight: 600; color: var(--s4a8-accent); font-size: 1.2rem; }
.s4a8-winner-game { font-size: 1.1rem; color: var(--s4a8-text-muted); }
.s4a8-winner-amount { font-weight: 700; color: var(--s4a8-primary); font-size: 1.3rem; }

/* Tips List */
.s4a8-tips-list { list-style: none; counter-reset: tips-counter; }
.s4a8-tips-list li {
  counter-increment: tips-counter; padding: 10px 12px 10px 40px;
  position: relative; margin-bottom: 8px;
  background: var(--s4a8-card-bg); border-radius: var(--s4a8-radius);
  border: 1px solid var(--s4a8-border); font-size: 1.2rem; color: var(--s4a8-text-muted);
  line-height: 1.5;
}
.s4a8-tips-list li::before {
  content: counter(tips-counter);
  position: absolute; left: 10px; top: 10px;
  width: 22px; height: 22px; background: var(--s4a8-gradient);
  color: var(--s4a8-dark); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700;
}

/* Back to top */
.s4a8-back-top {
  position: fixed; bottom: 72px; right: 12px; z-index: 999;
  width: 38px; height: 38px; background: var(--s4a8-primary);
  color: #fff; border: none; border-radius: 50%;
  font-size: 1.8rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(255,87,34,0.4); transition: all 0.3s;
}
.s4a8-back-top:hover { transform: scale(1.1); }

/* Utility */
.s4a8-text-center { text-align: center; }
.s4a8-mt-10 { margin-top: 10px; }
.s4a8-mb-10 { margin-bottom: 10px; }
.s4a8-mb-20 { margin-bottom: 20px; }
.s4a8-hidden { display: none; }
