/* ============ aincrad.wiki design system ============ */
:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --surface: rgba(148, 184, 255, 0.05);
  --surface-2: rgba(148, 184, 255, 0.09);
  --border: rgba(148, 184, 255, 0.14);
  --border-bright: rgba(103, 232, 249, 0.45);
  --text: #e6edf7;
  --text-dim: #9aa8bf;
  --accent: #67e8f9;
  --accent-2: #3b82f6;
  --gold: #f0c869;
  --danger: #f87171;
  --radius: 14px;
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --maxw: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent-2); color: #fff; padding: 8px 16px; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- ambient background ---------- */
.bg-aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bg-aurora span {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.16; will-change: transform;
  animation: drift 26s ease-in-out infinite alternate;
}
.bg-aurora span:nth-child(1) { width: 56vw; height: 56vw; left: -14vw; top: -18vw; background: radial-gradient(circle, #1d4ed8, transparent 65%); }
.bg-aurora span:nth-child(2) { width: 44vw; height: 44vw; right: -12vw; top: 22vh; background: radial-gradient(circle, #0e7490, transparent 65%); animation-delay: -9s; animation-duration: 32s; }
.bg-aurora span:nth-child(3) { width: 38vw; height: 38vw; left: 28vw; bottom: -22vw; background: radial-gradient(circle, #5b21b6, transparent 65%); animation-delay: -18s; animation-duration: 38s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 4vh, 0) scale(1.15); }
}
#particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo-mark { filter: drop-shadow(0 0 6px rgba(103, 232, 249, 0.45)); flex: none; }
.brand-text { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: 0.04em; }
.brand-dot { color: var(--accent); }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 8px 13px; border-radius: 8px;
  color: var(--text-dim); font-weight: 500; font-size: 0.92rem;
  transition: color 0.2s, background 0.2s;
}
.nav-list a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-list a.active { color: var(--accent); }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 92px 0 72px;
  background-image: linear-gradient(180deg, rgba(7,11,20,0.55) 0%, rgba(7,11,20,0.82) 70%, var(--bg) 100%), var(--hero-img, none);
  background-size: cover;
  background-position: center 30%;
}
.hero-plain { padding: 70px 0 36px; background-image: none; }
.hero-veil { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% 110%, rgba(59,130,246,0.18), transparent); pointer-events: none; }
.hero-inner { position: relative; max-width: 850px; }
.kicker {
  margin: 0 0 14px; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
}
h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 700; line-height: 1.15; letter-spacing: 0.01em;
}
.lead { font-size: 1.13rem; color: var(--text-dim); max-width: 64ch; margin: 0; }
.article-date { margin-top: 16px; font-size: 0.85rem; color: var(--text-dim); }

/* shimmer / 流光 text */
.shimmer {
  background: linear-gradient(110deg, #f3f7ff 30%, #67e8f9 47%, #f0c869 53%, #f3f7ff 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }

/* ---------- countdown ---------- */
.countdown { display: flex; gap: 14px; margin: 30px 0 8px; flex-wrap: wrap; }
.cd-cell {
  min-width: 86px; text-align: center; padding: 14px 10px 11px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.cd-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1; text-shadow: 0 0 18px rgba(103,232,249,0.5); }
.cd-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-dim); margin-top: 6px; }

/* ---------- latest news flash (hero module) ---------- */
.news-flash {
  margin-top: 34px; max-width: 640px;
  background: rgba(11, 17, 32, 0.66); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px 10px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 36px rgba(2, 8, 23, 0.45), inset 0 1px 0 rgba(255,255,255,0.05);
}
.news-flash-head { display: flex; align-items: center; gap: 9px; padding-bottom: 11px; border-bottom: 1px solid var(--border); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(240,200,105,0.55); animation: live-pulse 2.2s ease-out infinite; }
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(240,200,105,0.55); }
  70% { box-shadow: 0 0 0 9px rgba(240,200,105,0); }
  100% { box-shadow: 0 0 0 0 rgba(240,200,105,0); }
}
.news-flash-title { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase; }
.news-flash-all { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.news-flash-list { list-style: none; margin: 0; padding: 0; }
.news-flash-list li { border-bottom: 1px solid rgba(148,184,255,0.08); }
.news-flash-list li:last-child { border-bottom: 0; }
.news-flash-list a { display: flex; gap: 13px; align-items: center; padding: 11px 4px; color: var(--text); border-radius: 8px; transition: background 0.18s; }
.news-flash-list a:hover { background: var(--surface-2); text-decoration: none; }
.news-flash-list img { width: 76px; height: 46px; object-fit: cover; border-radius: 7px; flex: none; border: 1px solid var(--border); }
.nf-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nf-meta { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); display: flex; align-items: center; gap: 7px; }
.nf-title { font-size: 0.92rem; font-weight: 600; line-height: 1.4; }
.news-flash-list a:hover .nf-title { color: var(--accent); }
.nf-badge {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; color: #081018;
  padding: 2px 7px; border-radius: 99px;
  background: linear-gradient(110deg, #f0c869 25%, #fff3cf 50%, #f0c869 75%);
  background-size: 200% 100%; animation: shimmer 3.5s linear infinite;
}
@media (max-width: 680px) {
  .news-flash { padding: 13px 13px 7px; }
  .news-flash-list img { width: 60px; height: 38px; }
}

/* ---------- buttons ---------- */
.btn-row { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(120deg, #0ea5e9, #3b82f6);
  color: #fff; box-shadow: 0 4px 22px rgba(59,130,246,0.4);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(59,130,246,0.55); }
.btn-ghost { border: 1px solid var(--border-bright); color: var(--accent); background: rgba(103,232,249,0.05); }
.btn-ghost:hover { background: rgba(103,232,249,0.12); }

/* ---------- sections & grids ---------- */
.section { padding: 64px 0 20px; }
.section-head { margin-bottom: 30px; }
.section-head h2 {
  font-family: var(--font-display); font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  margin: 0 0 10px; font-weight: 600;
}
.section-head h2::after {
  content: ''; display: block; width: 64px; height: 2px; margin-top: 12px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.section-head p { color: var(--text-dim); margin: 0; max-width: 70ch; }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- cards ---------- */
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; color: var(--text);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  position: relative;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(103,232,249,0.5), transparent 38%, transparent 65%, rgba(240,200,105,0.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.25s; pointer-events: none;
}
.card:hover { transform: translateY(-5px); text-decoration: none; box-shadow: 0 14px 38px rgba(2,8,23,0.55); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card-media { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-tag {
  align-self: flex-start; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(240,200,105,0.35); border-radius: 99px; padding: 3px 10px;
}
.card-body h3 { margin: 2px 0 0; font-size: 1.12rem; font-weight: 600; line-height: 1.35; }
.card-body p { margin: 0; color: var(--text-dim); font-size: 0.92rem; flex: 1; }
.card-cta { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-top: 6px; }

/* ---------- prose (article body) ---------- */
.prose {
  max-width: 780px; margin: 40px auto 70px;
  background: rgba(11, 17, 32, 0.55); border: 1px solid var(--border);
  border-radius: 18px; padding: clamp(24px, 4.5vw, 52px);
  backdrop-filter: blur(8px);
}
.prose h2 {
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 600;
  margin: 2.2em 0 0.7em; padding-bottom: 0.4em;
  border-bottom: 1px solid var(--border);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 1.8em 0 0.6em; color: var(--accent); font-weight: 600; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--accent); }
.prose strong { color: #fff; }
.prose img { border-radius: 12px; margin: 1.4em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.92rem; }
.prose th { text-align: left; color: var(--accent); font-weight: 600; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tr:hover td { background: rgba(148,184,255,0.04); }

.callout {
  display: flex; gap: 14px; margin: 1.5em 0; padding: 16px 18px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); font-size: 0.95rem;
}
.callout p { margin: 0; }
.callout-tip { border-left: 3px solid var(--accent); }
.callout-warn { border-left: 3px solid var(--danger); }
.callout-info { border-left: 3px solid var(--gold); }
.callout-icon { flex: none; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; font-weight: 400; transition: transform 0.2s; flex: none; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-a { padding: 0 20px 18px; color: var(--text-dim); }
.faq-a p { margin: 0 0 0.8em; }

/* ---------- YouTube facade ---------- */
.yt-facade {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; background: #000;
  border: 1px solid var(--border); margin: 1.5em 0;
}
.yt-facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.82; transition: opacity 0.25s, transform 0.4s; }
.yt-facade:hover img { opacity: 1; transform: scale(1.03); }
.yt-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: rgba(23, 23, 23, 0.82); transition: color 0.2s, transform 0.2s;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5));
}
.yt-facade:hover .yt-play { color: #f00; transform: translate(-50%, -50%) scale(1.08); }
.yt-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 18px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-size: 0.9rem; font-weight: 600; color: #fff;
}
.yt-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- stat strip / spec table ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 36px 0; }
.stat {
  padding: 18px; text-align: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.stat .stat-v { font-family: var(--font-display); font-size: 1.25rem; color: var(--gold); font-weight: 600; }
.stat .stat-k { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-dim); margin-top: 4px; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 80px; border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(11,17,32,0.9));
  padding: 54px 0 34px; font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer-brand p { color: var(--text-dim); margin: 14px 0 0; max-width: 38ch; }
.site-footer h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text); margin: 4px 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer ul a { color: var(--text-dim); }
.site-footer ul a:hover { color: var(--accent); }
.footer-legal { color: #5e6b82; font-size: 0.78rem; line-height: 1.6; border-top: 1px solid var(--border); padding-top: 22px; }
.footer-copy { color: #5e6b82; font-size: 0.78rem; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 50px; }
}
@media (max-width: 860px) {
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; background: none;
    border: 1px solid var(--border); border-radius: 8px; padding: 10px 9px; cursor: pointer;
  }
  .nav-toggle span { width: 20px; height: 2px; background: var(--text); transition: transform 0.2s, opacity 0.2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-list {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 10px 16px 16px;
    background: rgba(7, 11, 20, 0.97); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: 13px 10px; font-size: 1rem; }
  .countdown { gap: 9px; }
  .cd-cell { min-width: 72px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bg-aurora span { animation: none; }
  .shimmer { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  #particles { display: none; }
}
