/* ==========================================================================
   tablegame2.homes - theme-21fe.css
   All custom classes use prefix: s21f-
   Palette: #2C3E50 / #4A4A4A (dark bg) | #FFDEAD / #F5DEB3 (light text)
   Mobile-first, max-width 430px on the main frame
   ========================================================================== */

:root {
  --s21f-bg: #2C3E50;
  --s21f-bg-2: #4A4A4A;
  --s21f-bg-3: #243342;
  --s21f-bg-4: #1d2935;
  --s21f-gold: #FFDEAD;
  --s21f-wheat: #F5DEB3;
  --s21f-grey: #808080;
  --s21f-text: #F5DEB3;
  --s21f-text-soft: #d8c79b;
  --s21f-text-dim: #9c8f70;
  --s21f-white: #fff;
  --s21f-border: rgba(255, 222, 173, 0.18);
  --s21f-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --s21f-radius: 14px;
  --s21f-radius-lg: 20px;
  --s21f-maxw: 430px;
  --s21f-header-h: 58px;
  --s21f-bnav-h: 62px;
  --s21f-grad: linear-gradient(135deg, #FFDEAD 0%, #F5DEB3 60%, #e7c98a 100%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
  font-size: 1.5rem;
  line-height: 1.55;
  color: var(--s21f-text);
  background: radial-gradient(circle at 20% -10%, #34536e 0%, var(--s21f-bg) 45%, var(--s21f-bg-4) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--s21f-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Page frame: mobile first, max-width 430px --------------------- */
.s21f-shell {
  max-width: var(--s21f-maxw);
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(44,62,80,0) 0%, rgba(29,41,53,0.55) 100%),
    repeating-linear-gradient(135deg, rgba(255,222,173,0.025) 0 2px, transparent 2px 14px);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 50px rgba(0,0,0,0.4);
}

/* ---------- Header -------------------------------------------------------- */
.s21f-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: var(--s21f-header-h);
  padding: 0 12px;
  background: linear-gradient(90deg, rgba(28,40,55,0.97), rgba(36,51,66,0.97));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--s21f-border);
  transition: box-shadow .25s ease;
}
.s21f-header-scrolled { box-shadow: 0 6px 18px rgba(0,0,0,0.45); }

.s21f-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.s21f-brand-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--s21f-grad);
  display: flex; align-items: center; justify-content: center;
  color: #2C3E50; font-weight: 800; font-size: 1.4rem;
  box-shadow: 0 3px 8px rgba(255,222,173,0.35);
}
.s21f-brand-name {
  font-weight: 800; font-size: 1.7rem; letter-spacing: .3px;
  color: var(--s21f-gold); text-transform: lowercase;
}
.s21f-brand-name b { color: var(--s21f-wheat); }

.s21f-header-actions { display: flex; align-items: center; gap: 7px; }
.s21f-icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--s21f-border);
  background: rgba(255,222,173,0.06); color: var(--s21f-wheat);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.s21f-icon-btn:hover { background: rgba(255,222,173,0.14); transform: translateY(-1px); }
.s21f-icon-btn .material-symbols-outlined { font-size: 22px; }
.s21f-icon-btn i { font-size: 18px; }

.s21f-btn {
  border: none; cursor: pointer; font-weight: 700; font-size: 1.35rem;
  padding: 9px 14px; border-radius: 10px; letter-spacing: .3px;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1;
}
.s21f-btn:active { transform: scale(0.97); }
.s21f-btn-login {
  background: transparent; color: var(--s21f-wheat);
  border: 1px solid var(--s21f-border);
}
.s21f-btn-login:hover { background: rgba(245,222,179,0.10); }
.s21f-btn-register {
  background: var(--s21f-grad); color: #2C3E50;
  box-shadow: 0 4px 12px rgba(255,222,173,0.35);
}
.s21f-btn-register:hover { filter: brightness(1.06); }
.s21f-btn-cta {
  background: var(--s21f-grad); color: #2C3E50; padding: 12px 22px;
  font-size: 1.5rem; border-radius: 12px; box-shadow: var(--s21f-shadow);
}

/* ---------- Mobile menu drawer ------------------------------------------- */
.s21f-menu-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden; transition: opacity .25s ease; z-index: 9998;
}
.s21f-menu-overlay.s21f-is-visible { opacity: 1; visibility: visible; }
.s21f-mobile-menu {
  position: fixed; top: 0; right: -86%; width: 82%; max-width: 340px;
  height: 100%; background: linear-gradient(180deg, #1f2c3a, #243342);
  z-index: 9999; transition: right .3s ease; padding: 18px 16px 30px;
  overflow-y: auto; box-shadow: -8px 0 30px rgba(0,0,0,0.5);
}
.s21f-mobile-menu.s21f-is-open { right: 0; }
.s21f-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.s21f-menu-head h3 { color: var(--s21f-gold); margin: 0; font-size: 1.8rem; }
.s21f-menu-close { background: none; border: none; color: var(--s21f-wheat); font-size: 2rem; cursor: pointer; }
.s21f-menu-list { list-style: none; padding: 0; margin: 0; }
.s21f-menu-list li { border-bottom: 1px solid var(--s21f-border); }
.s21f-menu-list a {
  display: flex; align-items: center; gap: 12px; padding: 13px 8px;
  color: var(--s21f-text); font-weight: 600; font-size: 1.5rem;
}
.s21f-menu-list a:hover { color: var(--s21f-gold); padding-left: 14px; }
.s21f-menu-list .material-symbols-outlined,
.s21f-menu-list i { font-size: 22px; color: var(--s21f-gold); width: 24px; text-align: center; }
.s21f-menu-cta { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
body.s21f-no-scroll { overflow: hidden; }

/* ---------- Main content -------------------------------------------------- */
main { padding-bottom: calc(var(--s21f-bnav-h) + 18px); }

.s21f-section { padding: 24px 14px 6px; }
.s21f-section-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
  gap: 10px;
}
.s21f-section-title {
  font-size: 1.9rem; font-weight: 800; color: var(--s21f-white); margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.s21f-section-title::before {
  content: ''; width: 4px; height: 20px; border-radius: 3px;
  background: var(--s21f-grad); display: inline-block;
}
.s21f-section-more { font-size: 1.3rem; color: var(--s21f-gold); font-weight: 600; }

/* ---------- Hero carousel ------------------------------------------------- */
.s21f-hero {
  position: relative; margin: 12px 12px 0; border-radius: var(--s21f-radius-lg);
  overflow: hidden; box-shadow: var(--s21f-shadow); height: 210px;
}
.s21f-hero-track { position: relative; width: 100%; height: 100%; }
.s21f-hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px; color: #fff;
}
.s21f-hero-slide.s21f-slide-active { opacity: 1; }
.s21f-hero-slide::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.75) 100%);
}
.s21f-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1;
}
.s21f-hero-tag {
  position: relative; display: inline-block; align-self: flex-start;
  background: var(--s21f-grad); color: #2C3E50; font-weight: 700;
  font-size: 1.15rem; padding: 4px 10px; border-radius: 6px; margin-bottom: 8px;
}
.s21f-hero-title { position: relative; font-size: 2.1rem; font-weight: 800; margin: 0 0 4px; line-height: 1.2; }
.s21f-hero-sub { position: relative; font-size: 1.3rem; opacity: .92; margin: 0 0 10px; }
.s21f-hero-cta { position: relative; }
.s21f-hero-dots {
  position: absolute; bottom: 8px; right: 12px; display: flex; gap: 5px; z-index: 2;
}
.s21f-hero-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.5); cursor: pointer; transition: all .2s ease;
}
.s21f-hero-dot.s21f-dot-active { background: var(--s21f-gold); width: 18px; border-radius: 4px; }
.s21f-hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.35); color: #fff; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.s21f-hero-nav.s21f-prev { left: 6px; }
.s21f-hero-nav.s21f-next { right: 6px; }

/* ---------- Feature strip ------------------------------------------------- */
.s21f-features {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin: 14px 12px 0;
}
.s21f-feature {
  background: rgba(255,222,173,0.06); border: 1px solid var(--s21f-border);
  border-radius: var(--s21f-radius); padding: 12px 6px; text-align: center;
}
.s21f-feature .material-symbols-outlined,
.s21f-feature i { color: var(--s21f-gold); font-size: 24px; }
.s21f-feature span { display: block; font-size: 1.15rem; color: var(--s21f-text-soft); margin-top: 4px; }

/* ---------- Category tabs ------------------------------------------------- */
.s21f-cat-tabs {
  display: flex; gap: 7px; overflow-x: auto; padding: 4px 12px 6px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.s21f-cat-tabs::-webkit-scrollbar { display: none; }
.s21f-cat-tab {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 30px; border: 1px solid var(--s21f-border);
  background: rgba(255,255,255,0.04); color: var(--s21f-text-soft);
  font-size: 1.3rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .2s ease, color .2s ease;
}
.s21f-cat-tab:hover { color: var(--s21f-gold); }
.s21f-cat-tab.s21f-cat-active {
  background: var(--s21f-grad); color: #2C3E50; border-color: transparent;
}
.s21f-cat-tab .material-symbols-outlined { font-size: 16px; }

/* ---------- Game grid ----------------------------------------------------- */
.s21f-game-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 6px 12px 4px;
}
.s21f-game-card {
  background: linear-gradient(180deg, #2c3e50, #243342);
  border: 1px solid var(--s21f-border); border-radius: var(--s21f-radius);
  overflow: hidden; position: relative; cursor: pointer;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.s21f-game-card:hover {
  transform: translateY(-3px); border-color: var(--s21f-gold);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}
.s21f-game-thumb { position: relative; aspect-ratio: 1/1; background: #1a2531; overflow: hidden; }
.s21f-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.s21f-game-card:hover .s21f-game-thumb img { transform: scale(1.06); transition: transform .4s ease; }
.s21f-game-overlay {
  position: absolute; inset: 0; background: rgba(28,40,55,0.78);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .22s ease;
}
.s21f-game-card:hover .s21f-game-overlay { opacity: 1; }
.s21f-play-pill {
  background: var(--s21f-grad); color: #2C3E50; font-weight: 700;
  font-size: 1.2rem; padding: 6px 12px; border-radius: 30px;
  display: inline-flex; align-items: center; gap: 4px;
}
.s21f-game-badge {
  position: absolute; top: 6px; left: 6px; background: #d94545; color: #fff;
  font-size: 1rem; font-weight: 700; padding: 2px 6px; border-radius: 5px; z-index: 1;
}
.s21f-game-badge.hot { background: linear-gradient(135deg, #ff7a45, #d94545); }
.s21f-game-badge.new { background: linear-gradient(135deg, #38c172, #259a52); }
.s21f-game-name {
  padding: 7px 8px 9px; font-size: 1.2rem; font-weight: 600; color: var(--s21f-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}

/* ---------- Featured / editorial blocks ---------------------------------- */
.s21f-feature-row {
  display: grid; grid-template-columns: 1fr; gap: 12px; padding: 6px 12px;
}
.s21f-feature-card {
  background: linear-gradient(135deg, rgba(255,222,173,0.10), rgba(44,62,80,0.6));
  border: 1px solid var(--s21f-border); border-radius: var(--s21f-radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
.s21f-feature-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.s21f-feature-body { padding: 12px 14px 16px; }
.s21f-feature-body h3 { color: var(--s21f-white); margin: 0 0 6px; font-size: 1.7rem; }
.s21f-feature-body p { color: var(--s21f-text-soft); margin: 0 0 10px; font-size: 1.35rem; }

/* ---------- Promo banner -------------------------------------------------- */
.s21f-promo {
  margin: 16px 12px 0; padding: 18px 16px; border-radius: var(--s21f-radius-lg);
  background: linear-gradient(135deg, #4A4A4A 0%, #2C3E50 100%);
  border: 1px solid var(--s21f-border); position: relative; overflow: hidden;
}
.s21f-promo::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,222,173,0.35) 0%, transparent 70%);
}
.s21f-promo h3 { color: var(--s21f-gold); margin: 0 0 6px; font-size: 1.9rem; position: relative; }
.s21f-promo p { color: var(--s21f-text-soft); margin: 0 0 12px; position: relative; font-size: 1.35rem; }
.s21f-promo .s21f-btn-cta { position: relative; }

/* ---------- Long-form SEO content ---------------------------------------- */
.s21f-article { padding: 18px 14px; }
.s21f-article h2 {
  color: var(--s21f-white); font-size: 2rem; margin: 18px 0 8px;
  padding-bottom: 6px; border-bottom: 2px solid var(--s21f-border);
}
.s21f-article h2:first-child { margin-top: 0; }
.s21f-article h3 { color: var(--s21f-gold); font-size: 1.7rem; margin: 14px 0 6px; }
.s21f-article p { color: var(--s21f-text-soft); margin: 0 0 10px; font-size: 1.4rem; line-height: 1.7; }
.s21f-article ul { color: var(--s21f-text-soft); padding-left: 20px; margin: 0 0 12px; font-size: 1.4rem; }
.s21f-article li { margin-bottom: 6px; line-height: 1.6; }
.s21f-article strong { color: var(--s21f-wheat); }
.s21f-article a { font-weight: 600; }

/* ---------- FAQ ----------------------------------------------------------- */
.s21f-faq { padding: 14px 12px 4px; }
.s21f-faq-item {
  border: 1px solid var(--s21f-border); border-radius: var(--s21f-radius);
  margin-bottom: 10px; overflow: hidden; background: rgba(255,255,255,0.03);
}
.s21f-faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 14px 14px; color: var(--s21f-white); font-weight: 700; font-size: 1.4rem;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.s21f-faq-q .material-symbols-outlined { transition: transform .25s ease; color: var(--s21f-gold); }
.s21f-faq-item.s21f-faq-open .s21f-faq-q .material-symbols-outlined { transform: rotate(45deg); }
.s21f-faq-a {
  max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease;
  padding: 0 14px; color: var(--s21f-text-soft); font-size: 1.35rem; line-height: 1.6;
}
.s21f-faq-item.s21f-faq-open .s21f-faq-a { max-height: 360px; padding: 0 14px 14px; }

/* ---------- Steps list ---------------------------------------------------- */
.s21f-steps { counter-reset: step; padding: 6px 12px; list-style: none; margin: 0; }
.s21f-steps li {
  position: relative; padding: 12px 12px 12px 52px; margin-bottom: 10px;
  background: rgba(255,222,173,0.05); border: 1px solid var(--s21f-border);
  border-radius: var(--s21f-radius); font-size: 1.35rem; color: var(--s21f-text-soft);
}
.s21f-steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 12px; top: 12px; width: 30px; height: 30px;
  border-radius: 50%; background: var(--s21f-grad); color: #2C3E50;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}

/* ---------- Stats row ----------------------------------------------------- */
.s21f-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 12px 0;
}
.s21f-stat {
  text-align: center; padding: 14px 6px; border-radius: var(--s21f-radius);
  background: rgba(255,222,173,0.06); border: 1px solid var(--s21f-border);
}
.s21f-stat b { display: block; color: var(--s21f-gold); font-size: 2rem; font-weight: 800; }
.s21f-stat span { color: var(--s21f-text-dim); font-size: 1.15rem; }

/* ---------- Footer -------------------------------------------------------- */
.s21f-footer {
  background: linear-gradient(180deg, #1d2935, #16202b);
  border-top: 1px solid var(--s21f-border); padding: 22px 14px 18px; margin-top: 20px;
}
.s21f-footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 16px; }
.s21f-footer h4 { color: var(--s21f-gold); margin: 0 0 8px; font-size: 1.45rem; }
.s21f-footer ul { list-style: none; padding: 0; margin: 0; }
.s21f-footer li { margin-bottom: 6px; }
.s21f-footer a { color: var(--s21f-text-soft); font-size: 1.3rem; }
.s21f-footer a:hover { color: var(--s21f-gold); }
.s21f-footer-bottom {
  border-top: 1px solid var(--s21f-border); padding-top: 12px;
  text-align: center; color: var(--s21f-text-dim); font-size: 1.2rem;
}
.s21f-footer-pay { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0; }
.s21f-footer-pay span {
  background: rgba(255,255,255,0.06); border: 1px solid var(--s21f-border);
  border-radius: 6px; padding: 3px 8px; font-size: 1.1rem; color: var(--s21f-text-soft);
}

/* ---------- Bottom nav ---------------------------------------------------- */
.s21f-bnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--s21f-maxw); height: var(--s21f-bnav-h);
  background: linear-gradient(180deg, rgba(28,40,55,0.98), rgba(22,32,43,0.99));
  backdrop-filter: blur(12px); border-top: 1px solid var(--s21f-border);
  display: flex; justify-content: space-around; align-items: stretch; z-index: 1000;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.35);
}
.s21f-bnav-btn {
  flex: 1; min-width: 60px; min-height: 60px; background: none; border: none;
  color: var(--s21f-text-dim); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; cursor: pointer; padding: 4px 2px;
  transition: color .2s ease, transform .15s ease; position: relative;
}
.s21f-bnav-btn .material-symbols-outlined { font-size: 24px; }
.s21f-bnav-btn i { font-size: 22px; }
.s21f-bnav-btn span.label { font-size: 1.05rem; font-weight: 600; }
.s21f-bnav-btn:hover { color: var(--s21f-wheat); }
.s21f-bnav-btn.s21f-bnav-active { color: var(--s21f-gold); }
.s21f-bnav-btn.s21f-bnav-active::before {
  content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px;
  background: var(--s21f-grad);
}
.s21f-bnav-btn.s21f-bnav-promo {
  color: #2C3E50;
}
.s21f-bnav-btn.s21f-bnav-promo .s21f-bnav-pill {
  background: var(--s21f-grad); border-radius: 50%; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; margin-top: -16px;
  box-shadow: 0 4px 12px rgba(255,222,173,0.45); border: 3px solid #1c2837;
}
.s21f-bnav-btn.s21f-bnav-promo .s21f-bnav-pill .material-symbols-outlined { font-size: 22px; }

/* ---------- Back to top --------------------------------------------------- */
.s21f-back-top {
  position: fixed; right: 14px; bottom: calc(var(--s21f-bnav-h) + 12px);
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--s21f-border);
  background: var(--s21f-bg-2); color: var(--s21f-gold); cursor: pointer; z-index: 1000;
  display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden;
  transition: opacity .25s ease, transform .2s ease;
}
.s21f-back-top.s21f-visible { opacity: 1; visibility: visible; }
.s21f-back-top:hover { transform: translateY(-2px); }

/* ---------- Reveal animation --------------------------------------------- */
.s21f-reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.s21f-reveal.s21f-revealed { opacity: 1; transform: none; }

/* ---------- Utility ------------------------------------------------------- */
.s21f-container { padding: 0 12px; }
.s21f-text-center { text-align: center; }
.s21f-mt-12 { margin-top: 12px; }
.s21f-mt-20 { margin-top: 20px; }
.s21f-divider { height: 1px; background: var(--s21f-border); margin: 18px 12px; }

/* ---------- Desktop: hide bottom nav, show wide nav ---------------------- */
@media (min-width: 769px) {
  .s21f-bnav { display: none; }
  main { padding-bottom: 24px; }
  .s21f-back-top { bottom: 22px; }
}
@media (min-width: 600px) and (max-width: 768px) {
  .s21f-game-grid { grid-template-columns: repeat(4, 1fr); }
  .s21f-features { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 360px) {
  .s21f-game-grid { grid-template-columns: repeat(2, 1fr); }
  .s21f-brand-name { font-size: 1.5rem; }
  .s21f-btn { padding: 8px 10px; font-size: 1.25rem; }
}
