/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0c0b;
  --bg-deep: #070908;
  --panel: rgba(24, 28, 24, 0.55);
  --panel-solid: #141815;
  --border: rgba(230, 185, 92, 0.18);
  --border-hover: rgba(230, 185, 92, 0.45);
  --text: #ece7da;
  --text-muted: #9c9585;
  --gold: #e6b95c;
  --gold-soft: rgba(230, 185, 92, 0.14);
  --moon: #d9ece4;
  --arcane: #a892f0;
  --arcane-soft: rgba(168, 146, 240, 0.12);
  --font-display: 'Cinzel', 'Noto Serif SC', serif;
  --font-serif: 'Noto Serif SC', 'Cinzel', serif;
  --font-body: 'Noto Sans SC', system-ui, sans-serif;
  --radius: 16px;
  --header-h: 66px;
  --ease: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%, rgba(168, 146, 240, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 20%, rgba(230, 185, 92, 0.06), transparent 55%),
    radial-gradient(ellipse 80% 60% at 15% 80%, rgba(80, 140, 110, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg-deep), var(--bg) 40%, var(--bg-deep));
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
strong { color: #fff; font-weight: 600; }

.container { width: min(1100px, 91vw); margin-inline: auto; }

/* ===== Atmosphere ===== */
.fog {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.015), transparent 25%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.012), transparent 30%);
  animation: fogDrift 26s ease-in-out infinite alternate;
}
@keyframes fogDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-3%, 2%, 0); }
}

.embers {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.embers span {
  position: absolute;
  bottom: -12px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  box-shadow: 0 0 8px 1px rgba(230, 185, 92, 0.6);
  animation: rise linear infinite;
}
.embers span:nth-child(1){ left: 8%;  animation-duration: 15s; animation-delay: 0s; }
.embers span:nth-child(2){ left: 20%; animation-duration: 19s; animation-delay: 3s; }
.embers span:nth-child(3){ left: 33%; animation-duration: 13s; animation-delay: 6s; background: var(--arcane); box-shadow: 0 0 8px 1px rgba(168,146,240,.6); }
.embers span:nth-child(4){ left: 45%; animation-duration: 21s; animation-delay: 1s; }
.embers span:nth-child(5){ left: 57%; animation-duration: 17s; animation-delay: 8s; }
.embers span:nth-child(6){ left: 66%; animation-duration: 14s; animation-delay: 4s; background: var(--arcane); box-shadow: 0 0 8px 1px rgba(168,146,240,.6); }
.embers span:nth-child(7){ left: 74%; animation-duration: 20s; animation-delay: 2s; }
.embers span:nth-child(8){ left: 83%; animation-duration: 16s; animation-delay: 9s; }
.embers span:nth-child(9){ left: 91%; animation-duration: 18s; animation-delay: 5s; }
.embers span:nth-child(10){ left: 50%; animation-duration: 23s; animation-delay: 11s; }
@keyframes rise {
  0%   { transform: translateY(0) translateX(0) scale(1);   opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-105vh) translateX(24px) scale(0.4); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fog, .embers span { animation: none; }
  .embers { display: none; }
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 12, 11, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.logo-mark { width: 38px; height: 38px; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(230,185,92,.25)); }
.logo-mark.sm { width: 30px; height: 30px; }
.logo-accent { color: var(--gold); }
.logo-flourish {
  color: var(--gold);
  font-size: 0.85rem;
  filter: drop-shadow(0 0 6px rgba(230, 185, 92, 0.35));
}
.logo-flourish.sm { font-size: 0.75rem; }
.logo-text { color: #f0ead9; }

.nav { display: flex; gap: 1.9rem; }
.nav a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: color var(--ease);
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--ease);
}
.nav a:hover { color: var(--gold); }
.nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all var(--ease);
}
.lang-btn.active, .lang-btn:hover { background: var(--gold-soft); color: var(--gold); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); transition: var(--ease); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--ease);
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, rgba(230, 185, 92, 0.9), rgba(201, 138, 60, 0.85));
  color: #1a1408;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(230, 185, 92, 0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(230, 185, 92, 0.35);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--gold); }
.btn-sm { padding: 0.6rem 1.3rem; font-size: 0.85rem; }

/* ===== Hero ===== */
.hero {
  padding: calc(var(--header-h) + 7rem) 0 4rem;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}
.hero-inner { max-width: 760px; }
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.75rem;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  background: linear-gradient(180deg, #fff, #d8cfb8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(230, 185, 92, 0.08);
}
.hero-seg { white-space: nowrap; }
.hero-seg:not(:last-child)::after {
  content: '·';
  margin: 0 0.45em;
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.hero-divider {
  color: var(--border);
  width: min(420px, 70vw);
  margin-top: 4rem;
}
.hero-divider svg { width: 100%; height: 20px; color: var(--gold); opacity: 0.4; }

/* ===== Sections ===== */
.section { padding: 4.5rem 0; }
.section-head { margin-bottom: 3rem; }
.section-head.center { text-align: center; }
.section-head.center .section-desc { margin-inline: auto; }
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.85rem;
}
.section-tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  opacity: 0.9;
}
.section-desc { color: var(--text-muted); max-width: 580px; text-wrap: balance; }
#games .section-desc {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(0.7rem, 1.7vw, 0.95rem);
}

.ornament {
  text-align: center;
  color: var(--gold);
  opacity: 0.4;
  font-size: 0.9rem;
  letter-spacing: 0.5em;
  padding: 0.5rem 0;
}

/* ===== Games ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 820px;
  margin-inline: auto;
}
.game-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(6px);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.game-card:not(.is-soon):hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), 0 0 30px rgba(230, 185, 92, 0.08);
}
.game-card.is-soon { opacity: 0.65; }

.game-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(168, 146, 240, 0.18), transparent 60%),
    linear-gradient(160deg, #101812, #0b1410);
  overflow: hidden;
}
.game-cover.muted {
  background: linear-gradient(160deg, #10120f, #0b0d0a);
}
.game-crest {
  font-size: 3.2rem;
  filter: drop-shadow(0 0 18px rgba(230, 185, 92, 0.4));
  transition: transform var(--ease);
}
.game-crest.dim { opacity: 0.3; filter: none; }
.game-cover:hover .game-crest { transform: scale(1.08) rotate(-4deg); }

.game-cover.has-img { display: block; padding: 0; aspect-ratio: 16 / 9; }
.game-cover.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}
.game-cover.has-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(7, 9, 8, 0.75));
  opacity: 0;
  transition: opacity var(--ease);
}
.game-cover.has-img:hover img { transform: scale(1.05); }
.game-cover.has-img:hover::after { opacity: 1; }

.game-body { padding: 1.5rem; }
.game-body h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.game-en {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-left: 0.35rem;
}
.game-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.2rem; }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3.5rem;
  align-items: center;
}
.about-visual { text-align: center; }
.avatar-ring {
  width: 150px; height: 150px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 140deg, var(--gold), var(--arcane), var(--gold));
  box-shadow: 0 0 40px rgba(230, 185, 92, 0.15);
}
.avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #16201a, #0a0d0b);
  display: grid;
  place-items: center;
}
.avatar svg { width: 74px; height: 74px; filter: drop-shadow(0 0 8px rgba(230,185,92,.3)); }
.about-handle {
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 0.1em;
  font-size: 0.95rem;
}
.about-content h2 { font-family: var(--font-serif); margin-bottom: 1.2rem; }
.about-content p { color: var(--text-muted); margin-bottom: 1.1rem; }

/* ===== Support ===== */
.support-panel {
  max-width: 520px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(8px);
  padding: 1.75rem;
  text-align: center;
}
.support-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-bottom: 1.75rem;
}
.support-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--ease);
}
.support-tab.active {
  background: linear-gradient(135deg, rgba(230,185,92,.9), rgba(201,138,60,.85));
  color: #1a1408;
  font-weight: 600;
}

.cn-switch {
  display: inline-flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem;
}
.cn-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--ease);
}
.cn-btn.active { background: var(--gold-soft); color: var(--gold); }

.reveal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-hover);
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--ease);
}
.reveal-btn:hover {
  background: rgba(230, 185, 92, 0.2);
  box-shadow: 0 0 24px rgba(230, 185, 92, 0.18);
}
.reveal-btn.hidden { display: none; }

.qr-frame {
  position: relative;
  width: 220px;
  aspect-ratio: 1;
  margin: 1.5rem auto 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  animation: qrReveal 0.35s ease;
}
.qr-frame.hidden { display: none; }
@keyframes qrReveal {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
.qr-image {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #fff;
}
.qr-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-image.hidden { display: none; }

.intl-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.support-view.hidden { display: none; }

/* ===== FAQ ===== */
.faq-list { max-width: 720px; margin-inline: auto; display: grid; gap: 0.9rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: border-color var(--ease);
}
.faq-item[open] { border-color: var(--border-hover); }
.faq-item summary {
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '☾';
  color: var(--gold);
  font-size: 1rem;
  transition: transform var(--ease);
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p { padding: 0 1.4rem 1.2rem; font-size: 0.9rem; color: var(--text-muted); }

/* ===== Contact ===== */
.contact-wrap { display: flex; justify-content: center; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.4rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(6px);
  transition: transform var(--ease), border-color var(--ease);
}
.contact-card:hover { transform: translateY(-3px); border-color: var(--border-hover); }
.contact-icon {
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  flex-shrink: 0;
}
.contact-icon svg { display: block; }
.contact-card h3 { font-family: var(--font-display); font-size: 0.9rem; margin-bottom: 0.15rem; }
.contact-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 3rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--ease);
}
.footer-links a:hover { color: var(--gold); }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(10, 12, 11, 0.97);
    backdrop-filter: blur(16px);
    padding: 1.25rem 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    opacity: 0;
    transition: all var(--ease);
    pointer-events: none;
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .menu-toggle { display: flex; }
  .menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .about-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .about-content { text-align: left; }
}
