/* ==========================================================================
   PG99 Code - layout-21f1.css
   Prefix: w21f1-
   Palette: #E9967A (salmon) | #5D5D5D (gray) | #0E1621 (deep navy bg) | #FFB6C1 (pink)
   Mobile-first. Max content width 430px optimized.
   ========================================================================== */

:root {
  --w21f1-bg: #0E1621;
  --w21f1-bg-2: #16202e;
  --w21f1-bg-3: #1f2b3c;
  --w21f1-salmon: #E9967A;
  --w21f1-gray: #5D5D5D;
  --w21f1-pink: #FFB6C1;
  --w21f1-text: #f3e9e6;
  --w21f1-muted: #aeb6c0;
  --w21f1-border: rgba(233, 150, 122, 0.18);
  --w21f1-grad: linear-gradient(135deg, #E9967A 0%, #FFB6C1 100%);
  --w21f1-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html {
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Be Vietnam Pro", Roboto, system-ui, sans-serif;
  background: var(--w21f1-bg);
  color: var(--w21f1-text);
  line-height: 1.6;
  font-size: 1.5rem;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--w21f1-pink); text-decoration: none; }
a:hover { color: var(--w21f1-salmon); }

.w21f1-wrap {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ---------- Header ---------- */
.w21f1-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(14, 22, 33, 0.96);
  border-bottom: 1px solid var(--w21f1-border);
  backdrop-filter: blur(8px);
}
.w21f1-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  max-width: 430px;
  margin: 0 auto;
}
.w21f1-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--w21f1-text);
}
.w21f1-brand-logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--w21f1-grad);
  display: grid; place-items: center;
  color: #0E1621;
  font-weight: 900;
}
.w21f1-brand b { color: var(--w21f1-salmon); }
.w21f1-actions { display: flex; gap: 8px; align-items: center; }
.w21f1-icon-btn {
  background: transparent;
  border: 1px solid var(--w21f1-border);
  color: var(--w21f1-text);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 18px;
}
.w21f1-icon-btn:hover { background: var(--w21f1-bg-3); }
.w21f1-btn {
  border: none;
  border-radius: 24px;
  padding: 9px 18px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.w21f1-btn:hover { transform: translateY(-1px); }
.w21f1-btn-primary {
  background: var(--w21f1-grad);
  color: #0E1621;
  box-shadow: 0 4px 14px rgba(233, 150, 122, 0.45);
}
.w21f1-btn-ghost {
  background: transparent;
  color: var(--w21f1-text);
  border: 1px solid var(--w21f1-salmon);
}

/* ---------- Mobile Menu Drawer ---------- */
.w21f1-menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  z-index: 9998;
}
.w21f1-mobile-menu {
  position: fixed;
  top: 0; right: -85%;
  width: 80%; max-width: 320px;
  height: 100vh;
  background: var(--w21f1-bg-2);
  z-index: 9999;
  padding: 70px 18px 24px;
  transition: right .28s ease;
  overflow-y: auto;
  border-left: 1px solid var(--w21f1-border);
}
.w21f1-mobile-menu.w21f1-open { right: 0; }
.w21f1-mobile-menu.w21f1-open ~ .w21f1-menu-backdrop { opacity: 1; pointer-events: auto; }
.w21f1-menu-close {
  position: absolute; top: 14px; right: 14px;
  background: transparent; border: none; color: var(--w21f1-text);
  font-size: 22px; cursor: pointer;
}
.w21f1-menu-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--w21f1-border);
  color: var(--w21f1-text);
  font-size: 1.5rem;
}
.w21f1-menu-link i { color: var(--w21f1-salmon); font-size: 18px; }
.w21f1-menu-link:hover { background: var(--w21f1-bg-3); color: var(--w21f1-pink); }

/* ---------- Hero Carousel ---------- */
.w21f1-hero {
  margin-top: 60px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
}
.w21f1-hero-track { position: relative; height: 220px; }
.w21f1-hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .6s;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 22px;
  color: #fff;
}
.w21f1-hero-slide.w21f1-active { opacity: 1; }
.w21f1-hero-slide img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .22; z-index: -1;
}
.w21f1-hero-slide:nth-child(1) { background: linear-gradient(135deg, #E9967A, #0E1621); }
.w21f1-hero-slide:nth-child(2) { background: linear-gradient(135deg, #FFB6C1, #5D5D5D); }
.w21f1-hero-slide:nth-child(3) { background: linear-gradient(135deg, #5D5D5D, #E9967A); }
.w21f1-hero-title { font-size: 2.6rem; font-weight: 900; margin: 0 0 6px; line-height: 1.15; }
.w21f1-hero-sub { font-size: 1.4rem; opacity: .92; margin: 0 0 14px; }
.w21f1-hero-dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
}
.w21f1-hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.4);
}
.w21f1-hero-dot.w21f1-active { background: #fff; width: 18px; border-radius: 4px; }

/* ---------- Sections ---------- */
.w21f1-section { padding: 22px 0; }
.w21f1-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 2rem; font-weight: 800;
  margin: 0 0 14px;
  color: var(--w21f1-text);
}
.w21f1-section-title::before {
  content: ""; width: 5px; height: 22px; border-radius: 3px;
  background: var(--w21f1-grad);
}
.w21f1-section-title small {
  font-size: 1.2rem; color: var(--w21f1-muted); font-weight: 500;
}

/* ---------- Filter Tabs ---------- */
.w21f1-filter-bar {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
}
.w21f1-filter-bar::-webkit-scrollbar { display: none; }
.w21f1-filter-tab {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 18px;
  background: var(--w21f1-bg-2);
  border: 1px solid var(--w21f1-border);
  color: var(--w21f1-muted);
  font-size: 1.3rem;
  cursor: pointer;
  white-space: nowrap;
}
.w21f1-filter-tab.w21f1-active {
  background: var(--w21f1-grad);
  color: #0E1621;
  border-color: transparent;
  font-weight: 700;
}

/* ---------- Game Grid ---------- */
.w21f1-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.w21f1-game-card {
  background: var(--w21f1-bg-2);
  border: 1px solid var(--w21f1-border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform .15s, box-shadow .15s;
}
.w21f1-game-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--w21f1-shadow);
  border-color: var(--w21f1-salmon);
}
.w21f1-game-card img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
}
.w21f1-game-name {
  padding: 6px 8px;
  font-size: 1.15rem;
  text-align: center;
  color: var(--w21f1-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.w21f1-game-badge {
  position: absolute; top: 6px; left: 6px;
  background: var(--w21f1-grad);
  color: #0E1621;
  font-size: 1rem;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
}
.w21f1-game-play {
  position: absolute; inset: 0;
  background: rgba(14,22,33,0.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.w21f1-game-card:hover .w21f1-game-play { opacity: 1; }
.w21f1-game-play span {
  background: var(--w21f1-grad);
  color: #0E1621;
  padding: 6px 14px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1.2rem;
}

/* ---------- Featured / Promo ---------- */
.w21f1-promo-box {
  background: var(--w21f1-bg-2);
  border: 1px solid var(--w21f1-border);
  border-radius: 14px;
  padding: 16px;
  display: flex; gap: 14px; align-items: center;
  margin-bottom: 12px;
}
.w21f1-promo-box .w21f1-promo-ico {
  width: 48px; height: 48px; flex: 0 0 auto;
  border-radius: 12px;
  background: var(--w21f1-grad);
  display: grid; place-items: center;
  color: #0E1621; font-size: 22px;
}
.w21f1-promo-box h3 { margin: 0 0 4px; font-size: 1.5rem; color: var(--w21f1-text); }
.w21f1-promo-box p { margin: 0; font-size: 1.25rem; color: var(--w21f1-muted); }

.w21f1-cta {
  display: block;
  text-align: center;
  background: var(--w21f1-grad);
  color: #0E1621;
  padding: 14px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 1.6rem;
  margin: 18px 0;
  box-shadow: 0 6px 18px rgba(233,150,122,0.45);
}

/* ---------- SEO Long text ---------- */
.w21f1-article {
  background: var(--w21f1-bg-2);
  border: 1px solid var(--w21f1-border);
  border-radius: 14px;
  padding: 18px;
  font-size: 1.4rem;
  color: var(--w21f1-text);
}
.w21f1-article h2 { font-size: 1.9rem; margin: 16px 0 8px; color: var(--w21f1-pink); }
.w21f1-article h2:first-child { margin-top: 0; }
.w21f1-article h3 { font-size: 1.6rem; margin: 14px 0 6px; color: var(--w21f1-salmon); }
.w21f1-article p { margin: 0 0 10px; color: var(--w21f1-text); }
.w21f1-article ul { padding-left: 18px; margin: 6px 0 12px; }
.w21f1-article li { margin-bottom: 6px; }
.w21f1-article strong { color: var(--w21f1-pink); }

/* ---------- FAQ ---------- */
.w21f1-faq-item {
  background: var(--w21f1-bg-2);
  border: 1px solid var(--w21f1-border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.w21f1-faq-q {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--w21f1-text);
  text-align: left;
  padding: 14px 16px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
}
.w21f1-faq-q .w21f1-faq-ico { color: var(--w21f1-salmon); transition: transform .2s; }
.w21f1-faq-item.w21f1-open .w21f1-faq-ico { transform: rotate(45deg); }
.w21f1-faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .25s ease;
  padding: 0 16px;
  color: var(--w21f1-muted);
  font-size: 1.3rem;
}
.w21f1-faq-item.w21f1-open .w21f1-faq-a { max-height: 400px; padding: 0 16px 14px; }

/* ---------- Footer ---------- */
.w21f1-footer {
  background: var(--w21f1-bg-2);
  border-top: 1px solid var(--w21f1-border);
  padding: 24px 0 90px;
  margin-top: 18px;
}
.w21f1-footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.w21f1-footer-col h4 {
  font-size: 1.4rem;
  color: var(--w21f1-salmon);
  margin: 0 0 10px;
}
.w21f1-footer-col a {
  display: block;
  color: var(--w21f1-muted);
  font-size: 1.25rem;
  padding: 4px 0;
}
.w21f1-footer-col a:hover { color: var(--w21f1-pink); }
.w21f1-footer-bottom {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--w21f1-border);
  text-align: center;
  color: var(--w21f1-muted);
  font-size: 1.2rem;
}
.w21f1-disclaimer {
  background: rgba(255,182,193,0.08);
  border: 1px solid var(--w21f1-border);
  border-radius: 10px;
  padding: 12px;
  margin-top: 14px;
  font-size: 1.2rem;
  color: var(--w21f1-muted);
}

/* ---------- Mobile Bottom Nav ---------- */
.w21f1-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: rgba(14,22,33,0.98);
  border-top: 1px solid var(--w21f1-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}
.w21f1-bottom-nav a,
.w21f1-bottom-nav button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--w21f1-muted);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  font-size: 1.05rem;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  transition: color .15s, transform .15s;
}
.w21f1-bottom-nav a i,
.w21f1-bottom-nav button i { font-size: 22px; }
.w21f1-bottom-nav a:hover,
.w21f1-bottom-nav button:hover { color: var(--w21f1-pink); transform: translateY(-1px); }
.w21f1-bottom-nav .w21f1-active { color: var(--w21f1-salmon); }
.w21f1-bottom-nav .w21f1-nav-promo {
  position: relative;
}
.w21f1-bottom-nav .w21f1-nav-promo i {
  background: var(--w21f1-grad);
  color: #0E1621;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin-top: -22px;
  box-shadow: 0 4px 12px rgba(233,150,122,0.5);
  font-size: 22px;
}

.w21f1-no-scroll { overflow: hidden; }

main { padding-bottom: 80px; }

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  body { background: #050b13; }
  .w21f1-wrap { max-width: 1100px; }
  .w21f1-header-inner { max-width: 1100px; }
  .w21f1-hero-track { height: 320px; }
  .w21f1-hero-title { font-size: 3.6rem; }
  .w21f1-hero-sub { font-size: 1.8rem; }
  .w21f1-game-grid { grid-template-columns: repeat(6, 1fr); }
  .w21f1-footer-cols { grid-template-columns: repeat(4, 1fr); }
  .w21f1-bottom-nav { display: none; }
  main { padding-bottom: 30px; }
  .w21f1-footer { padding-bottom: 30px; }
}
