/* ============================================================
   VV72 — "Royal Lion Vault" theme
   ดำสนิท + ทองราชวงศ์ + แดงเบอร์กันดี — hero เต็มจอ ล็อกอินการ์ดลอยทับขอบล่างแบนเนอร์
   ฟอนต์ Cormorant Garamond ไม่รองรับไทย จึงใช้ Marcellus SC ทดแทนไม่ได้ -> ใช้ Trirong (หัว) + Sarabun (เนื้อหา)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #E8C062;
  --gold-bright: #FBE7A6;
  --gold-deep: #9C7A2E;
  --wine: #6E1423;
  --bg: #0A0806;
  --surface: #16110B;
  --border: #3A2E17;
  --ink: #F5EEDD;
  --muted: #C9BB99;
  --dim: #8A7C5C;
  --font-display: 'Trirong', serif;
  --font-body: 'Sarabun', sans-serif;
  --container-sm: 420px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100svh;
  overflow-x: hidden;
  padding-bottom: 84px;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; color: inherit; }

/* ===== HERO — full-bleed banner, header overlaid on top ===== */
.hero-stage { position: relative; }
.hero-banner { width: 100%; height: auto; display: block; }
.header-overlay {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), transparent);
}
.logo-chip { display: inline-flex; align-items: center; background: rgba(0,0,0,0.55); border: 1px solid var(--gold-deep); border-radius: 999px; padding: 0.35rem 0.9rem; box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.header-logo { height: 40px; width: auto; }
.lang-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--gold-deep); background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 2px;
}
.lang-btn svg { width: 100%; height: 100%; border-radius: 50%; }
.hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 70%;
  background: linear-gradient(180deg, transparent, var(--bg) 92%);
}

/* ===== LOGIN CARD — floats over the hero fade, glass gold border ===== */
.main-stage { max-width: var(--container-sm); margin: -2.6rem auto 0; padding: 0 1.25rem 1.5rem; position: relative; z-index: 2; }
.login-card {
  background: rgba(22, 17, 11, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--gold-deep);
  border-radius: 16px;
  padding: 1.8rem 1.5rem 1.6rem;
  box-shadow: 0 20px 44px rgba(0,0,0,0.6);
}
.login-title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 600; color: var(--gold-bright);
  margin-bottom: 1.4rem; text-align: center;
}
.field { width: 100%; margin-bottom: 1rem; }
.field label { display: block; font-size: 0.76rem; color: var(--muted); margin-bottom: 0.4rem; }
.field-input {
  display: flex; align-items: center; gap: 0.55rem; width: 100%;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 0.9rem;
}
.field-input:focus-within { border-color: var(--gold); }
.field-input svg { flex-shrink: 0; color: var(--dim); width: 16px; height: 16px; }
.field-input input { border: none; outline: none; background: transparent; width: 100%; font-family: var(--font-body); font-size: 0.9rem; color: var(--ink); }
.field-input input::placeholder { color: var(--dim); }

.btn-login {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: linear-gradient(120deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  color: #241703; font-family: var(--font-display); font-weight: 700; font-size: 0.96rem;
  padding: 0.85rem 1.5rem; border: none; border-radius: 8px; margin-top: 0.4rem;
  box-shadow: 0 10px 22px rgba(232,192,98,0.28);
}
.btn-login:hover:not(:disabled) { box-shadow: 0 12px 26px rgba(232,192,98,0.4); }
.btn-login svg { width: 17px; height: 17px; }

.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.register-link { font-size: 0.82rem; font-weight: 700; color: var(--gold-bright); }
.btn-line-flat { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 0.4rem 0.7rem; }
.ico-line { display: inline-flex; align-items: center; justify-content: center; background: #06C755; color: #fff; font-size: 0.55rem; font-weight: 800; border-radius: 3px; padding: 1px 5px; }

/* ===== GAME SHOWCASE — large, eye-catching portrait cards ===== */
.game-showcase { max-width: var(--container-sm); margin: 0 auto; padding: 1.6rem 1.25rem 0; }
.game-showcase h2 { font-family: var(--font-display); font-size: 1rem; color: var(--gold-bright); margin-bottom: 0.9rem; text-align: center; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.game-grid img { border-radius: 14px; border: 1px solid var(--gold-deep); box-shadow: 0 12px 24px rgba(0,0,0,0.45); }

/* ===== ABOUT ===== */
.about-text { max-width: var(--container-sm); margin: 0 auto; padding: 1.6rem 1.25rem 1rem; }
.about-text h2 { font-family: var(--font-display); font-size: 0.92rem; color: var(--gold-bright); margin-bottom: 0.6rem; }
.about-text p { font-size: 0.82rem; line-height: 1.85; color: var(--muted); }

/* ===== INVITE / SEO TEXT ===== */
.invite-text { max-width: var(--container-sm); margin: 0 auto; padding: 0 1.25rem 1.2rem; }
.invite-text h2 { font-family: var(--font-display); font-size: 0.92rem; color: var(--gold-bright); margin-bottom: 0.6rem; }
.invite-text p { font-size: 0.82rem; line-height: 1.85; color: var(--muted); }

/* ===== TRUST STRIP ===== */
.trust-strip { display: flex; justify-content: center; gap: 0.7rem; flex-wrap: wrap; max-width: var(--container-sm); margin: 0 auto; padding: 0 1.25rem 1.6rem; }
.trust-chip { font-size: 0.72rem; font-weight: 700; color: var(--gold-bright); border: 1px solid var(--gold-deep); border-radius: 999px; padding: 0.35rem 0.85rem; background: rgba(232,192,98,0.06); }

/* ===== BOTTOM NAV — floating pill ===== */
.bottom-nav {
  position: fixed; left: 1rem; right: 1rem; bottom: 0.9rem; z-index: 30;
  display: flex; justify-content: space-around;
  background: rgba(22,17,11,0.95); backdrop-filter: blur(10px);
  border: 1px solid var(--gold-deep); border-radius: 999px;
  padding: 0.55rem 0.4rem;
  box-shadow: 0 14px 30px rgba(0,0,0,0.5);
}
@media (min-width: 481px) {
  .bottom-nav { left: 50%; right: auto; transform: translateX(-50%); width: 100%; max-width: var(--container-sm); }
}
.bn-item { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; font-size: 0.6rem; font-weight: 600; color: var(--dim); background: none; border: none; padding: 0.2rem 0.5rem; }
.bn-item svg { width: 18px; height: 18px; color: var(--dim); }
.bn-item.active, .bn-item:hover { color: var(--gold-bright); }
.bn-item.active svg { color: var(--gold-bright); }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.6); display: flex; align-items: flex-end; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-sheet { width: 100%; max-width: var(--container-sm); background: var(--surface); border: 1px solid var(--gold-deep); border-bottom: none; border-radius: 16px 16px 0 0; padding: 1.5rem 1.5rem calc(1.75rem + env(safe-area-inset-bottom, 0px)); transform: translateY(16px); transition: transform 0.2s ease; }
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.modal-head h2 { font-family: var(--font-display); font-size: 1rem; color: var(--gold-bright); }
.modal-close { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.modal-steps { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.modal-steps li { display: flex; gap: 0.75rem; align-items: flex-start; }
.step-num { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--wine); color: #fff; font-weight: 700; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; }
.modal-steps p { font-size: 0.83rem; color: var(--muted); line-height: 1.6; }
.modal-steps strong { color: var(--gold-bright); }
