/* =============================================================
 * Tables game - style.css
 * Site: tables-game.cyou
 * All classes use the dynamic prefix: s51a-
 * All CSS variables use the prefix: --s51a-
 * Color palette: #C71585 | #8A2BE2 | #9932CC | #CC99FF | #1C2833
 * Mobile-first (max-width 430px primary target)
 * =========================================================== */

:root {
  --s51a-primary: #C71585;
  --s51a-secondary: #8A2BE2;
  --s51a-accent: #9932CC;
  --s51a-soft: #CC99FF;
  --s51a-bg: #1C2833;
  --s51a-bg-deep: #141c25;
  --s51a-bg-card: #22303d;
  --s51a-text: #f4ecff;
  --s51a-text-dim: #b9a9d8;
  --s51a-gold: #ffd86b;
  --s51a-success: #4ade80;
  --s51a-danger: #ff6b6b;
  --s51a-radius: 1.2rem;
  --s51a-radius-sm: 0.8rem;
  --s51a-shadow: 0 0.4rem 1.6rem rgba(199, 21, 133, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at 20% 0%, #2a1a3a 0%, var(--s51a-bg) 55%, var(--s51a-bg-deep) 100%);
  color: var(--s51a-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--s51a-soft); text-decoration: none; }

/* ----------------- Layout helpers ----------------- */
.s51a-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }
.s51a-wrapper { padding-bottom: 8rem; }
.s51a-section { padding: 2rem 0; }
.s51a-section-alt { background: linear-gradient(180deg, rgba(138, 43, 226, 0.08), rgba(28, 40, 51, 0)); }

/* ----------------- Top header ----------------- */
.s51a-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(90deg, rgba(28, 40, 51, 0.96), rgba(60, 20, 70, 0.96));
  backdrop-filter: blur(0.8rem);
  border-bottom: 0.1rem solid rgba(204, 153, 255, 0.25);
  transition: box-shadow 0.3s ease, padding 0.3s ease;
}
.s51a-header-scrolled { box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.45); }
.s51a-header-inner {
  max-width: 430px; margin: 0 auto; padding: 0.6rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
}
.s51a-brand { display: flex; align-items: center; gap: 0.6rem; }
.s51a-brand-logo { width: 3rem; height: 3rem; border-radius: 0.6rem; }
.s51a-brand-name { font-size: 1.6rem; font-weight: 800; color: var(--s51a-soft); letter-spacing: 0.05rem; }
.s51a-brand-name span { color: var(--s51a-gold); }
.s51a-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.s51a-btn {
  border: none; cursor: pointer; font-weight: 700; border-radius: 2rem;
  padding: 0.7rem 1.2rem; font-size: 1.25rem; transition: transform 0.15s ease, box-shadow 0.2s ease;
  min-height: 3.4rem; display: inline-flex; align-items: center; gap: 0.4rem;
}
.s51a-btn:active { transform: scale(0.96); }
.s51a-btn-register {
  background: linear-gradient(135deg, var(--s51a-primary), var(--s51a-accent));
  color: #fff; box-shadow: 0 0.4rem 1rem rgba(199, 21, 133, 0.5);
}
.s51a-btn-login {
  background: transparent; color: var(--s51a-soft);
  border: 0.15rem solid var(--s51a-soft);
}
.s51a-menu-toggle {
  background: transparent; border: 0.15rem solid var(--s51a-soft);
  color: var(--s51a-soft); width: 3.2rem; height: 3.2rem; border-radius: 0.8rem;
  font-size: 1.6rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.s51a-menu-toggle.s51a-active { background: var(--s51a-primary); color: #fff; }

/* ----------------- Mobile dropdown menu ----------------- */
.s51a-mobile-menu {
  position: fixed; top: 0; right: -100%; width: 78%; max-width: 320px; height: 100vh;
  background: linear-gradient(180deg, #2a1738, #1a1426);
  z-index: 9999; padding: 6rem 1.5rem 2rem; transition: right 0.3s ease;
  border-left: 0.15rem solid rgba(204, 153, 255, 0.25);
  overflow-y: auto;
}
.s51a-mobile-menu.s51a-menu-open { right: 0; }
.s51a-mobile-menu h3 { font-size: 1.4rem; color: var(--s51a-soft); margin: 1.2rem 0 0.6rem; text-transform: uppercase; letter-spacing: 0.1rem; }
.s51a-mobile-menu a {
  display: block; padding: 0.9rem 0.8rem; color: var(--s51a-text);
  border-bottom: 0.05rem solid rgba(204, 153, 255, 0.12); font-size: 1.35rem;
}
.s51a-mobile-menu a:hover, .s51a-mobile-menu a:focus { background: rgba(199, 21, 133, 0.18); color: var(--s51a-gold); }
.s51a-menu-close { position: absolute; top: 1.2rem; right: 1.2rem; background: transparent; border: none; color: var(--s51a-soft); font-size: 2rem; cursor: pointer; }

/* ----------------- Hero / carousel ----------------- */
.s51a-hero { margin-top: 6rem; }
.s51a-slider { position: relative; border-radius: var(--s51a-radius); overflow: hidden; box-shadow: var(--s51a-shadow); }
.s51a-slide {
  position: relative; display: none; cursor: pointer; min-height: 18rem;
}
.s51a-slide.s51a-slide-active { display: block; }
.s51a-slide img { width: 100%; height: 18rem; object-fit: cover; }
.s51a-slide-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem 1.2rem;
  background: linear-gradient(0deg, rgba(28, 40, 51, 0.92), rgba(28, 40, 51, 0));
}
.s51a-slide-overlay h2 { font-size: 1.7rem; color: var(--s51a-gold); margin-bottom: 0.3rem; }
.s51a-slide-overlay p { font-size: 1.2rem; color: var(--s51a-text); }
.s51a-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.45);
  color: #fff; border: none; width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.4rem; cursor: pointer;
}
.s51a-slider-arrow.s51a-prev { left: 0.6rem; }
.s51a-slider-arrow.s51a-next { right: 0.6rem; }
.s51a-dots { display: flex; justify-content: center; gap: 0.5rem; padding: 0.8rem 0; }
.s51a-dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: rgba(204, 153, 255, 0.35); cursor: pointer; border: none; }
.s51a-dot.s51a-dot-active { background: var(--s51a-primary); width: 2rem; border-radius: 0.6rem; }

/* ----------------- Headings ----------------- */
.s51a-h1 { font-size: 2.1rem; line-height: 1.35; margin: 1.4rem 0 0.6rem; color: var(--s51a-soft); }
.s51a-h1 span { color: var(--s51a-gold); }
.s51a-section-title {
  font-size: 1.7rem; margin: 1.6rem 0 0.8rem; padding-left: 1rem;
  border-left: 0.4rem solid var(--s51a-primary); color: var(--s51a-soft);
}
.s51a-section-title small { display: block; font-size: 1.15rem; color: var(--s51a-text-dim); font-weight: 400; margin-top: 0.2rem; }
.s51a-lead { font-size: 1.3rem; color: var(--s51a-text-dim); margin-bottom: 1rem; }

/* ----------------- Promo chips / filter ----------------- */
.s51a-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0 1rem; }
.s51a-chip {
  padding: 0.5rem 1rem; border-radius: 2rem; font-size: 1.15rem; cursor: pointer;
  background: rgba(204, 153, 255, 0.12); color: var(--s51a-text-dim); border: 0.1rem solid transparent;
}
.s51a-chip.s51a-chip-active { background: linear-gradient(135deg, var(--s51a-primary), var(--s51a-accent)); color: #fff; }

/* ----------------- Game grid ----------------- */
.s51a-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.s51a-card {
  background: var(--s51a-bg-card); border-radius: var(--s51a-radius-sm); overflow: hidden;
  border: 0.1rem solid rgba(204, 153, 255, 0.15); transition: transform 0.18s ease, box-shadow 0.2s ease;
  cursor: pointer; display: flex; flex-direction: column;
}
.s51a-card:hover, .s51a-card:focus { transform: translateY(-0.3rem); box-shadow: 0 0.6rem 1.4rem rgba(199, 21, 133, 0.35); border-color: var(--s51a-primary); }
.s51a-card-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #0f1620; }
.s51a-card-name { font-size: 1.1rem; color: var(--s51a-text); padding: 0.4rem 0.5rem 0.6rem; text-align: center; line-height: 1.25; min-height: 2.6rem; }
.s51a-card-tag {
  position: relative; display: inline-block;
}
.s51a-card-tag::after {
  content: "HOT"; position: absolute; top: 0.3rem; left: 0.3rem; background: var(--s51a-primary); color: #fff;
  font-size: 0.9rem; padding: 0.1rem 0.4rem; border-radius: 0.4rem; font-weight: 800;
}

/* ----------------- Featured / highlights ----------------- */
.s51a-feature {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.22), rgba(199, 21, 133, 0.15));
  border: 0.12rem solid rgba(204, 153, 255, 0.25); border-radius: var(--s51a-radius);
  padding: 1.2rem; margin-bottom: 1rem;
}
.s51a-feature h3 { color: var(--s51a-gold); font-size: 1.35rem; margin-bottom: 0.4rem; }
.s51a-feature p { font-size: 1.2rem; color: var(--s51a-text-dim); }

.s51a-cta {
  display: block; text-align: center; margin: 1.4rem 0;
  background: linear-gradient(135deg, var(--s51a-primary), var(--s51a-secondary));
  color: #fff; padding: 1.2rem; border-radius: var(--s51a-radius); font-weight: 800; font-size: 1.4rem;
  box-shadow: var(--s51a-shadow); cursor: pointer;
}
.s51a-text-link { color: var(--s51a-gold); font-weight: 700; text-decoration: underline; }

/* ----------------- FAQ accordion ----------------- */
.s51a-faq-item { background: var(--s51a-bg-card); border-radius: var(--s51a-radius-sm); margin-bottom: 0.6rem; overflow: hidden; border: 0.1rem solid rgba(204, 153, 255, 0.12); }
.s51a-faq-q { padding: 0.9rem 1rem; font-weight: 700; color: var(--s51a-soft); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.25rem; }
.s51a-faq-a { max-height: 0; overflow: hidden; padding: 0 1rem; color: var(--s51a-text-dim); transition: max-height 0.3s ease, padding 0.3s ease; font-size: 1.18rem; }
.s51a-faq-item.s51a-faq-open .s51a-faq-a { max-height: 30rem; padding: 0 1rem 1rem; }

/* ----------------- Testimonials ----------------- */
.s51a-testimonial { background: var(--s51a-bg-card); padding: 1rem; border-radius: var(--s51a-radius-sm); margin-bottom: 0.7rem; border-left: 0.3rem solid var(--s51a-primary); }
.s51a-testimonial-stars { color: var(--s51a-gold); font-size: 1.1rem; margin-bottom: 0.3rem; }
.s51a-testimonial-text { font-size: 1.18rem; color: var(--s51a-text); margin-bottom: 0.4rem; }
.s51a-testimonial-author { font-size: 1.1rem; color: var(--s51a-text-dim); }

/* ----------------- Payment / winners ----------------- */
.s51a-pay-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.s51a-pay-badge { background: rgba(204, 153, 255, 0.12); border: 0.1rem solid rgba(204, 153, 255, 0.25); border-radius: 0.6rem; padding: 0.5rem 0.9rem; font-size: 1.1rem; color: var(--s51a-text); }
.s51a-winner-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 0.05rem solid rgba(204, 153, 255, 0.12); font-size: 1.15rem; }
.s51a-winner-name { color: var(--s51a-soft); }
.s51a-winner-amount { color: var(--s51a-gold); font-weight: 700; }

/* ----------------- RTP table ----------------- */
.s51a-rtp-table { width: 100%; border-collapse: collapse; font-size: 1.15rem; margin-top: 0.6rem; }
.s51a-rtp-table th, .s51a-rtp-table td { padding: 0.6rem 0.5rem; text-align: left; border-bottom: 0.05rem solid rgba(204, 153, 255, 0.12); }
.s51a-rtp-table th { color: var(--s51a-gold); }
.s51a-rtp-table td.s51a-rtp-high { color: var(--s51a-success); font-weight: 700; }

/* ----------------- Footer ----------------- */
.s51a-footer { background: linear-gradient(180deg, #1a1426, #0f0c17); padding: 2rem 1.2rem 8.5rem; margin-top: 2rem; border-top: 0.1rem solid rgba(204, 153, 255, 0.2); }
.s51a-footer-brand { font-size: 1.3rem; color: var(--s51a-text-dim); margin-bottom: 1rem; line-height: 1.4; }
.s51a-footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.s51a-footer-links a { font-size: 1.15rem; color: var(--s51a-text); padding: 0.3rem 0; }
.s51a-footer-links a:hover { color: var(--s51a-gold); }
.s51a-footer-promos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0; }
.s51a-footer-promos button { flex: 1 1 45%; }
.s51a-footer-copy { font-size: 1.05rem; color: var(--s51a-text-dim); text-align: center; padding-top: 0.8rem; border-top: 0.05rem solid rgba(204, 153, 255, 0.1); }

/* ----------------- Mobile bottom nav ----------------- */
.s51a-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  height: 6rem; background: linear-gradient(180deg, rgba(28, 40, 51, 0.98), rgba(15, 12, 23, 0.99));
  border-top: 0.1rem solid rgba(204, 153, 255, 0.25);
  display: flex; justify-content: space-around; align-items: center;
  padding: 0.3rem 0.2rem;
}
.s51a-bottom-btn {
  flex: 1; min-width: 6rem; min-height: 5.6rem; background: transparent; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
  color: var(--s51a-text-dim); cursor: pointer; border-radius: 0.6rem; transition: color 0.2s ease, transform 0.15s ease;
}
.s51a-bottom-btn .s51a-bottom-icon { font-size: 2.1rem; line-height: 1; }
.s51a-bottom-btn .s51a-bottom-label { font-size: 1rem; line-height: 1.2; }
.s51a-bottom-btn.s51a-bottom-active { color: var(--s51a-gold); }
.s51a-bottom-btn.s51a-bottom-active .s51a-bottom-icon { transform: scale(1.12); }
.s51a-bottom-btn:active { transform: scale(0.92); }
.s51a-bottom-btn.s51a-bottom-promo { color: var(--s51a-soft); }

/* ----------------- Reveal animation ----------------- */
.s51a-reveal { opacity: 0; transform: translateY(1.6rem); transition: opacity 0.5s ease, transform 0.5s ease; }
.s51a-reveal.s51a-revealed { opacity: 1; transform: translateY(0); }

/* ----------------- Mobile bottom padding ----------------- */
@media (max-width: 768px) {
  .s51a-wrapper, main { padding-bottom: 8rem; }
}

/* ----------------- Desktop tweaks ----------------- */
@media (min-width: 769px) {
  .s51a-bottom-nav { display: none; }
  .s51a-container { max-width: 760px; }
  body { background-size: cover; }
  .s51a-grid { grid-template-columns: repeat(6, 1fr); }
  .s51a-footer-links { grid-template-columns: repeat(4, 1fr); }
  .s51a-footer { padding-bottom: 2rem; }
}
