/**
 * 8999but Layout CSS
 * All classes use prefix: s58a-
 * Color palette: #FAFAD2, #2E8B57, #F5F5F5, #66CDAA, #262626, #FFD700
 */

/* CSS Variables */
:root {
  --s58a-primary: #2E8B57;
  --s58a-secondary: #FFD700;
  --s58a-bg: #262626;
  --s58a-bg-light: #1a1a2e;
  --s58a-text: #F5F5F5;
  --s58a-text-dark: #FAFAD2;
  --s58a-accent: #66CDAA;
  --s58a-highlight: #FFD700;
  --s58a-card-bg: #2d2d44;
  --s58a-border: #3a3a5c;
  --s58a-font-size: 62.5%;
}

/* Base Reset */
html { font-size: var(--s58a-font-size); scroll-behavior: smooth; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--s58a-bg);
  color: var(--s58a-text);
  line-height: 1.5rem;
  max-width: 430px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

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

/* Header */
.s58a-header {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: 1000;
  background: linear-gradient(135deg, #1a472a 0%, #2E8B57 100%);
  padding: 0.8rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.s58a-header-left {
  display: flex; align-items: center; gap: 0.6rem;
}
.s58a-logo {
  width: 28px; height: 28px; border-radius: 6px;
}
.s58a-site-name {
  font-size: 1.6rem; font-weight: 700; color: var(--s58a-highlight);
  letter-spacing: 0.5px;
}
.s58a-header-right {
  display: flex; align-items: center; gap: 0.6rem;
}
.s58a-btn-reg {
  background: var(--s58a-highlight); color: #262626;
  padding: 0.5rem 1.2rem; border-radius: 20px;
  font-size: 1.2rem; font-weight: 700; border: none;
  cursor: pointer; transition: all 0.2s;
  min-height: 32px; min-width: 60px;
}
.s58a-btn-reg:hover { background: #ffe44d; transform: scale(1.05); }
.s58a-btn-login {
  background: transparent; color: var(--s58a-highlight);
  padding: 0.5rem 1rem; border-radius: 20px;
  font-size: 1.2rem; font-weight: 600;
  border: 1.5px solid var(--s58a-highlight); cursor: pointer;
  transition: all 0.2s; min-height: 32px;
}
.s58a-btn-login:hover { background: rgba(255,215,0,0.15); }
.s58a-menu-btn {
  background: none; border: none; color: var(--s58a-highlight);
  font-size: 2rem; cursor: pointer; padding: 0.4rem;
  display: flex; align-items: center;
}

/* Mobile Menu */
.s58a-mobile-menu {
  position: fixed; top: 0; right: -280px;
  width: 280px; height: 100vh; z-index: 9999;
  background: linear-gradient(180deg, #1a1a2e 0%, #262626 100%);
  transition: right 0.3s ease; padding: 2rem 1.5rem;
  overflow-y: auto;
}
.s58a-menu-active { right: 0 !important; }
.s58a-menu-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 9998;
  display: none; opacity: 0; transition: opacity 0.3s;
}
.s58a-overlay-active { display: block; opacity: 1; }
.s58a-menu-close {
  background: none; border: none; color: var(--s58a-text);
  font-size: 2.2rem; position: absolute; top: 1rem; right: 1rem;
  cursor: pointer;
}
.s58a-menu-list { list-style: none; margin-top: 3rem; }
.s58a-menu-list li {
  border-bottom: 1px solid var(--s58a-border);
}
.s58a-menu-list a {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 1.2rem 0.5rem; color: var(--s58a-text);
  font-size: 1.4rem; transition: color 0.2s;
}
.s58a-menu-list a:hover { color: var(--s58a-highlight); }
.s58a-menu-list i, .s58a-menu-list .material-icons {
  font-size: 2rem; color: var(--s58a-accent);
}

/* Main Content */
.s58a-main {
  padding-top: 56px; padding-bottom: 1rem;
  min-height: 100vh;
}
@media (max-width: 768px) {
  .s58a-main { padding-bottom: 80px; }
}

/* Carousel/Slider */
.s58a-carousel {
  position: relative; width: 100%;
  aspect-ratio: 16/8; overflow: hidden;
  margin-bottom: 1.5rem; border-radius: 0;
}
.s58a-slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 0.6s ease; cursor: pointer;
}
.s58a-slide-active { opacity: 1; }
.s58a-slide img { width: 100%; height: 100%; object-fit: cover; }
.s58a-dots {
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%); display: flex; gap: 6px;
}
.s58a-slide-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer;
  transition: all 0.3s;
}
.s58a-dot-active {
  background: var(--s58a-highlight); width: 20px; border-radius: 4px;
}

/* Section Title */
.s58a-section-title {
  font-size: 1.8rem; font-weight: 700; color: var(--s58a-highlight);
  margin: 2rem 0 1rem; padding: 0 1.2rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.s58a-section-title::before {
  content: ''; width: 4px; height: 1.8rem;
  background: var(--s58a-primary); border-radius: 2px;
}

/* Game Grid */
.s58a-game-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem; padding: 0 1rem;
}
.s58a-game-item {
  text-align: center; cursor: pointer;
  transition: transform 0.2s;
}
.s58a-game-item:hover { transform: translateY(-2px); }
.s58a-game-icon {
  width: 72px; height: 72px; border-radius: 12px;
  margin: 0 auto 0.4rem; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 2px solid var(--s58a-border);
}
.s58a-game-icon img { width: 100%; height: 100%; object-fit: cover; }
.s58a-game-name {
  font-size: 1rem; color: var(--s58a-text-dark);
  line-height: 1.2rem; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* Category Label */
.s58a-cat-label {
  font-size: 1.5rem; font-weight: 700; color: var(--s58a-accent);
  margin: 1.5rem 1.2rem 0.8rem; padding-left: 0.8rem;
  border-left: 3px solid var(--s58a-primary);
}

/* Content Card */
.s58a-card {
  background: var(--s58a-card-bg); border-radius: 12px;
  padding: 1.5rem; margin: 1rem 1.2rem;
  border: 1px solid var(--s58a-border);
}
.s58a-card h2 {
  font-size: 1.6rem; color: var(--s58a-highlight);
  margin-bottom: 0.8rem;
}
.s58a-card h3 {
  font-size: 1.4rem; color: var(--s58a-accent);
  margin-bottom: 0.6rem;
}
.s58a-card p {
  font-size: 1.2rem; line-height: 1.6rem;
  color: var(--s58a-text); margin-bottom: 0.6rem;
}

/* Promo Button */
.s58a-promo-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--s58a-primary), var(--s58a-accent));
  color: #fff; padding: 0.8rem 1.6rem; border-radius: 25px;
  font-size: 1.3rem; font-weight: 700; cursor: pointer;
  border: none; transition: all 0.3s; text-align: center;
  justify-content: center;
}
.s58a-promo-btn:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(46,139,87,0.4); }
.s58a-promo-btn-gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #262626;
}
.s58a-promo-btn-gold:hover { box-shadow: 0 4px 15px rgba(255,215,0,0.4); }

/* Promo Text Link */
.s58a-promo-link {
  color: var(--s58a-highlight); font-weight: 700;
  cursor: pointer; text-decoration: underline;
  transition: color 0.2s;
}
.s58a-promo-link:hover { color: var(--s58a-accent); }

/* Footer */
.s58a-footer {
  background: #1a1a2e; padding: 2rem 1.2rem 3rem;
  border-top: 2px solid var(--s58a-primary);
}
.s58a-footer-brand {
  text-align: center; margin-bottom: 1.5rem;
}
.s58a-footer-brand p {
  font-size: 1.1rem; color: #aaa; line-height: 1.5rem;
}
.s58a-footer-links {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  justify-content: center; margin: 1rem 0;
}
.s58a-footer-link {
  background: var(--s58a-card-bg); color: var(--s58a-accent);
  padding: 0.5rem 1rem; border-radius: 16px;
  font-size: 1.1rem; border: 1px solid var(--s58a-border);
  cursor: pointer; transition: all 0.2s;
}
.s58a-footer-link:hover { background: var(--s58a-primary); color: #fff; }
.s58a-footer-copy {
  text-align: center; font-size: 1rem; color: #666;
  margin-top: 1rem;
}
.s58a-footer-site-links {
  display: flex; flex-wrap: wrap; gap: 0.8rem;
  justify-content: center; margin: 1rem 0;
}
.s58a-footer-site-links a {
  color: var(--s58a-accent); font-size: 1.1rem;
  text-decoration: underline;
}

/* Bottom Navigation */
.s58a-bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: 1000;
  background: linear-gradient(180deg, #1a472a 0%, #0d2818 100%);
  display: flex; justify-content: space-around; align-items: center;
  height: 60px; padding: 0 0.3rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.5);
  border-top: 1px solid rgba(46,139,87,0.4);
}
.s58a-nav-item {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-width: 60px; min-height: 54px;
  cursor: pointer; transition: all 0.2s; border-radius: 8px;
  gap: 2px; padding: 0.3rem;
}
.s58a-nav-item:hover { background: rgba(255,215,0,0.1); }
.s58a-nav-item:active { transform: scale(0.92); }
.s58a-nav-item i, .s58a-nav-item .material-icons,
.s58a-nav-item ion-icon, .s58a-nav-item bi {
  font-size: 22px; color: var(--s58a-accent);
}
.s58a-nav-item span {
  font-size: 1rem; color: #aaa; white-space: nowrap;
}
.s58a-nav-item:hover i, .s58a-nav-item:hover .material-icons,
.s58a-nav-item:hover ion-icon, .s58a-nav-item:hover span {
  color: var(--s58a-highlight);
}
.s58a-nav-active i, .s58a-nav-active .material-icons,
.s58a-nav-active ion-icon {
  color: var(--s58a-highlight) !important;
}
.s58a-nav-active span { color: var(--s58a-highlight) !important; }

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

/* Back to top */
.s58a-back-top {
  position: fixed; bottom: 72px; right: 1rem;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--s58a-primary); color: #fff;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; z-index: 999; border: none;
  font-size: 2rem; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Utilities */
.s58a-text-center { text-align: center; }
.s58a-text-gold { color: var(--s58a-highlight); }
.s58a-text-accent { color: var(--s58a-accent); }
.s58a-mt-1 { margin-top: 0.5rem; }
.s58a-mt-2 { margin-top: 1rem; }
.s58a-mb-2 { margin-bottom: 1rem; }
.s58a-p-1 { padding: 0.5rem 1rem; }

/* Winner showcase */
.s58a-winner-list { padding: 0; list-style: none; }
.s58a-winner-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.8rem 1rem; margin: 0.4rem 1.2rem;
  background: var(--s58a-card-bg); border-radius: 10px;
  border: 1px solid var(--s58a-border);
}
.s58a-winner-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--s58a-primary); display: flex;
  align-items: center; justify-content: center;
  color: var(--s58a-highlight); font-size: 1.4rem; font-weight: 700;
}
.s58a-winner-info { flex: 1; }
.s58a-winner-name { font-size: 1.1rem; color: var(--s58a-text); }
.s58a-winner-amount { font-size: 1.2rem; color: var(--s58a-highlight); font-weight: 700; }

/* Payment Methods */
.s58a-payment-grid {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  justify-content: center; padding: 0.8rem 1rem;
}
.s58a-payment-item {
  background: var(--s58a-card-bg); border-radius: 8px;
  padding: 0.5rem 1rem; font-size: 1.1rem;
  color: var(--s58a-accent); border: 1px solid var(--s58a-border);
}

/* RTP Compact */
.s58a-rtp-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.6rem; padding: 0 1rem;
}
.s58a-rtp-item {
  background: var(--s58a-card-bg); border-radius: 8px;
  padding: 0.6rem 0.8rem; display: flex;
  align-items: center; justify-content: space-between;
}
.s58a-rtp-name { font-size: 1rem; color: var(--s58a-text); }
.s58a-rtp-val { font-size: 1.1rem; color: var(--s58a-highlight); font-weight: 700; }

/* Testimonial */
.s58a-testimonial {
  background: var(--s58a-card-bg); border-radius: 12px;
  padding: 1.2rem; margin: 0.5rem 1.2rem;
  border-left: 3px solid var(--s58a-primary);
}
.s58a-testimonial-text {
  font-size: 1.1rem; color: #ccc; font-style: italic;
  margin-bottom: 0.5rem;
}
.s58a-testimonial-author {
  font-size: 1rem; color: var(--s58a-accent); font-weight: 600;
}

/* App Download CTA */
.s58a-app-cta {
  background: linear-gradient(135deg, #1a472a 0%, #2E8B57 50%, #66CDAA 100%);
  border-radius: 16px; padding: 1.5rem; margin: 1rem 1.2rem;
  text-align: center;
}
.s58a-app-cta h3 {
  font-size: 1.6rem; color: var(--s58a-highlight); margin-bottom: 0.6rem;
}
.s58a-app-cta p {
  font-size: 1.2rem; color: var(--s58a-text); margin-bottom: 1rem;
}

/* H Tags */
h1.s58a-h1 {
  font-size: 2rem; color: var(--s58a-highlight);
  margin: 1.5rem 1.2rem 0.8rem; line-height: 2.4rem;
}
h2.s58a-h2 {
  font-size: 1.7rem; color: var(--s58a-highlight);
  margin: 1.2rem 1.2rem 0.6rem;
}
h3.s58a-h3 {
  font-size: 1.4rem; color: var(--s58a-accent);
  margin: 1rem 1.2rem 0.5rem;
}

/* Content Paragraphs */
.s58a-content p {
  font-size: 1.2rem; line-height: 1.8rem;
  color: var(--s58a-text); margin: 0.5rem 1.2rem;
}
.s58a-content ul, .s58a-content ol {
  padding-left: 2rem; margin: 0.5rem 1.2rem;
}
.s58a-content li {
  font-size: 1.2rem; line-height: 1.7rem;
  color: var(--s58a-text); margin-bottom: 0.3rem;
}

/* FAQ */
.s58a-faq-item {
  background: var(--s58a-card-bg); border-radius: 10px;
  padding: 1rem 1.2rem; margin: 0.5rem 1.2rem;
  border: 1px solid var(--s58a-border);
}
.s58a-faq-q {
  font-size: 1.3rem; color: var(--s58a-highlight); font-weight: 600;
  margin-bottom: 0.4rem;
}
.s58a-faq-a {
  font-size: 1.1rem; color: #ccc; line-height: 1.5rem;
}

/* Feature list */
.s58a-feature-list {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.6rem; padding: 0.5rem 1rem;
}
.s58a-feature-item {
  background: var(--s58a-card-bg); border-radius: 10px;
  padding: 1rem; text-align: center;
  border: 1px solid var(--s58a-border);
}
.s58a-feature-item i, .s58a-feature-item .material-icons {
  font-size: 2.4rem; color: var(--s58a-highlight); margin-bottom: 0.4rem;
}
.s58a-feature-item span {
  font-size: 1.1rem; color: var(--s58a-text); display: block;
}
