/**
 * PH798 Core Stylesheet
 * Website: ph798.sbs
 * All class names use prefix: s58e-
 * Color Palette: #F4A460, #7B68EE, #1A1A2E, #B8860B, #808080
 */

/* CSS Variables */
:root {
  --s58e-primary: #F4A460;
  --s58e-secondary: #7B68EE;
  --s58e-bg: #1A1A2E;
  --s58e-gold: #B8860B;
  --s58e-gray: #808080;
  --s58e-bg-light: #16213E;
  --s58e-bg-card: #0F3460;
  --s58e-text: #FFFFFF;
  --s58e-text-muted: #B0B0C0;
  --s58e-accent: #E94560;
  --s58e-success: #4CAF50;
  --s58e-radius: 8px;
  --s58e-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* Reset & Base */
*, *::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: var(--s58e-bg);
  color: var(--s58e-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--s58e-primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.s58e-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  height: 52px;
  background: var(--s58e-bg);
  border-bottom: 1px solid rgba(244,164,96,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 1000;
}
.s58e-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--s58e-primary);
}
.s58e-logo img { width: 28px; height: 28px; border-radius: 4px; }
.s58e-header-actions { display: flex; align-items: center; gap: 6px; }
.s58e-btn-register, .s58e-btn-login {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.s58e-btn-register {
  background: var(--s58e-primary);
  color: var(--s58e-bg);
}
.s58e-btn-register:hover { background: #E8944F; transform: scale(1.03); }
.s58e-btn-login {
  background: transparent;
  color: var(--s58e-primary);
  border: 1.5px solid var(--s58e-primary);
}
.s58e-btn-login:hover { background: rgba(244,164,96,0.1); }
.s58e-menu-toggle {
  background: none;
  border: none;
  color: var(--s58e-primary);
  font-size: 2rem;
  cursor: pointer;
  padding: 4px;
}

/* Mobile Menu Overlay */
.s58e-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;
}
.s58e-overlay-active { opacity: 1; pointer-events: auto; }

/* Mobile Slide Menu */
.s58e-mobile-menu {
  position: fixed;
  top: 0;
  right: -260px;
  width: 260px;
  height: 100%;
  background: var(--s58e-bg-light);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 20px 0;
  overflow-y: auto;
}
.s58e-menu-active { right: 0; }
.s58e-mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 16px;
  border-bottom: 1px solid rgba(244,164,96,0.2);
}
.s58e-mobile-menu-header span { font-size: 1.6rem; color: var(--s58e-primary); font-weight: 700; }
.s58e-menu-close {
  background: none;
  border: none;
  color: var(--s58e-text);
  font-size: 2.2rem;
  cursor: pointer;
}
.s58e-mobile-menu nav a {
  display: block;
  padding: 12px 20px;
  color: var(--s58e-text);
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s, color 0.2s;
}
.s58e-mobile-menu nav a:hover {
  background: rgba(244,164,96,0.1);
  color: var(--s58e-primary);
}

/* Main Content */
.s58e-main {
  margin-top: 52px;
  padding-bottom: 0;
  min-height: calc(100vh - 52px);
}
@media (max-width: 768px) {
  .s58e-main { padding-bottom: 80px; }
}

/* Carousel */
.s58e-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}
.s58e-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.s58e-slide-active { opacity: 1; }
.s58e-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
}
.s58e-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.s58e-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  transition: background 0.3s;
}
.s58e-dot-active { background: var(--s58e-primary); }

/* Section Titles */
.s58e-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--s58e-primary);
  padding: 16px 12px 8px;
  border-left: 4px solid var(--s58e-secondary);
  margin: 12px 12px 0;
}

/* Game Grid */
.s58e-game-section { padding: 4px 0 8px; }
.s58e-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px 12px;
}
.s58e-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border-radius: var(--s58e-radius);
  overflow: hidden;
  background: var(--s58e-bg-light);
  transition: transform 0.2s;
}
.s58e-game-card:hover { transform: translateY(-2px); }
.s58e-game-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--s58e-radius) var(--s58e-radius) 0 0;
}
.s58e-game-name {
  font-size: 1rem;
  text-align: center;
  padding: 4px 2px;
  color: var(--s58e-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Content Sections */
.s58e-content-section {
  padding: 16px 12px;
  line-height: 1.5;
}
.s58e-content-section h2 {
  font-size: 1.7rem;
  color: var(--s58e-primary);
  margin-bottom: 10px;
}
.s58e-content-section h3 {
  font-size: 1.5rem;
  color: var(--s58e-secondary);
  margin: 10px 0 6px;
}
.s58e-content-section p {
  color: var(--s58e-text-muted);
  margin-bottom: 8px;
  font-size: 1.3rem;
}
.s58e-content-section ul {
  padding-left: 18px;
  margin-bottom: 10px;
}
.s58e-content-section li {
  color: var(--s58e-text-muted);
  font-size: 1.3rem;
  margin-bottom: 4px;
}

/* Promo Buttons */
.s58e-promo-btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--s58e-primary), var(--s58e-gold));
  color: var(--s58e-bg);
  font-weight: 700;
  font-size: 1.4rem;
  border-radius: 24px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}
.s58e-promo-btn:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(244,164,96,0.4); }

/* Text Link */
.s58e-text-link {
  color: var(--s58e-primary);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px dashed var(--s58e-primary);
}
.s58e-text-link:hover { color: var(--s58e-secondary); }

/* Info Cards */
.s58e-info-card {
  background: var(--s58e-bg-light);
  border-radius: var(--s58e-radius);
  padding: 14px;
  margin: 8px 12px;
  border-left: 3px solid var(--s58e-secondary);
}
.s58e-info-card h3 { font-size: 1.4rem; color: var(--s58e-primary); margin-bottom: 6px; }
.s58e-info-card p { color: var(--s58e-text-muted); font-size: 1.2rem; }

/* Stats Grid */
.s58e-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px 12px;
}
.s58e-stat-item {
  background: var(--s58e-bg-light);
  border-radius: var(--s58e-radius);
  padding: 12px;
  text-align: center;
}
.s58e-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--s58e-primary);
}
.s58e-stat-label {
  font-size: 1.1rem;
  color: var(--s58e-gray);
  margin-top: 2px;
}

/* Winner Ticker */
.s58e-winner-ticker {
  background: var(--s58e-bg-light);
  padding: 8px 12px;
  overflow: hidden;
}
.s58e-winner-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 1.2rem;
}
.s58e-winner-name { color: var(--s58e-secondary); font-weight: 600; }
.s58e-winner-amount { color: var(--s58e-primary); font-weight: 700; }
.s58e-winner-game { color: var(--s58e-gray); font-size: 1.1rem; }

/* Payment Icons Row */
.s58e-payment-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  flex-wrap: wrap;
}
.s58e-payment-item {
  background: var(--s58e-bg-light);
  border-radius: var(--s58e-radius);
  padding: 8px 14px;
  font-size: 1.2rem;
  color: var(--s58e-text-muted);
  border: 1px solid rgba(244,164,96,0.15);
}

/* Testimonials */
.s58e-testimonial {
  background: var(--s58e-bg-light);
  border-radius: var(--s58e-radius);
  padding: 12px;
  margin: 6px 12px;
}
.s58e-testimonial-stars { color: var(--s58e-gold); font-size: 1.2rem; margin-bottom: 4px; }
.s58e-testimonial-text { font-size: 1.2rem; color: var(--s58e-text-muted); font-style: italic; }
.s58e-testimonial-author { font-size: 1.1rem; color: var(--s58e-gray); margin-top: 4px; }

/* CTA Section */
.s58e-cta-section {
  background: linear-gradient(135deg, var(--s58e-bg-card), var(--s58e-bg-light));
  padding: 24px 12px;
  text-align: center;
  margin: 12px;
  border-radius: var(--s58e-radius);
}
.s58e-cta-section h2 { color: var(--s58e-primary); margin-bottom: 8px; }
.s58e-cta-section p { color: var(--s58e-text-muted); margin-bottom: 14px; }

/* Footer */
.s58e-footer {
  background: var(--s58e-bg-light);
  padding: 20px 12px 30px;
  border-top: 1px solid rgba(244,164,96,0.15);
  text-align: center;
}
.s58e-footer-brand {
  font-size: 1.3rem;
  color: var(--s58e-primary);
  margin-bottom: 8px;
  font-weight: 600;
}
.s58e-footer-desc {
  font-size: 1.1rem;
  color: var(--s58e-gray);
  margin-bottom: 12px;
  line-height: 1.4;
}
.s58e-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.s58e-footer-links a {
  color: var(--s58e-text-muted);
  font-size: 1.1rem;
  padding: 4px 8px;
}
.s58e-footer-links a:hover { color: var(--s58e-primary); }
.s58e-footer-promo-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
}
.s58e-copyright {
  font-size: 1rem;
  color: var(--s58e-gray);
  margin-top: 12px;
}

/* Bottom Navigation */
.s58e-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  height: 60px;
  background: var(--s58e-bg);
  border-top: 1px solid rgba(244,164,96,0.25);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}
@media (min-width: 769px) {
  .s58e-bottom-nav { display: none; }
}
.s58e-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(--s58e-gray);
  cursor: pointer;
  transition: all 0.2s;
  padding: 4px;
}
.s58e-bottom-nav-btn:hover,
.s58e-nav-active {
  color: var(--s58e-primary);
  transform: scale(1.08);
}
.s58e-bottom-nav-btn i,
.s58e-bottom-nav-btn .material-icons {
  font-size: 24px;
}
.s58e-bottom-nav-btn span {
  font-size: 10px;
  margin-top: 2px;
  white-space: nowrap;
}

/* FAQ Accordion */
.s58e-faq-item { margin: 6px 12px; border-radius: var(--s58e-radius); overflow: hidden; background: var(--s58e-bg-light); }
.s58e-faq-q {
  padding: 10px 12px;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--s58e-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.s58e-faq-a {
  padding: 0 12px;
  max-height: 0;
  overflow: hidden;
  color: var(--s58e-text-muted);
  font-size: 1.2rem;
  transition: max-height 0.3s, padding 0.3s;
}
.s58e-faq-open .s58e-faq-a {
  max-height: 200px;
  padding: 0 12px 10px;
}

/* App Download CTA */
.s58e-app-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--s58e-bg-light);
  padding: 14px;
  margin: 8px 12px;
  border-radius: var(--s58e-radius);
  cursor: pointer;
}
.s58e-app-cta i { font-size: 3rem; color: var(--s58e-secondary); }
.s58e-app-cta-text h3 { font-size: 1.4rem; color: var(--s58e-text); }
.s58e-app-cta-text p { font-size: 1.1rem; color: var(--s58e-gray); }

/* Responsive Helpers */
@media (max-width: 768px) {
  body { max-width: 100%; }
  .s58e-header { max-width: 100%; }
  .s58e-bottom-nav { max-width: 100%; }
}
