/* ═══════════════════════════════════════════════════════════
   Frontend CSS — Luxury Autograph Authentication Center
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Noto+Serif+SC:wght@300;400;600&display=swap');

:root {
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --gold-dark: #9a7a32;
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --bg4: #222222;
  --text: #e8e0d0;
  --text-muted: #8a8070;
  --border: rgba(201,168,76,0.2);
  --border-hover: rgba(201,168,76,0.5);
  --success: #4ade80;
  --error: #f87171;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ─── Background particles canvas ──────────────────────── */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: .4;
}

/* ─── Nav ───────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  height: 70px;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.nav-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.nav-logo-text {
  font-family: 'Cinzel', serif;
  font-size: 14px; font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  line-height: 1.2;
}
.nav-logo-sub { font-size: 10px; color: var(--text-muted); letter-spacing: 2px; }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 13px; letter-spacing: 1px;
  transition: color .3s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transition: transform .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: none; color: var(--gold); font-size: 22px; cursor: pointer; }

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 100px 20px 60px;
}

.hero-inner { text-align: center; max-width: 680px; width: 100%; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--border);
  color: var(--gold-light); font-size: 11px; letter-spacing: 2px;
  padding: 6px 16px; border-radius: 20px;
  margin-bottom: 28px; text-transform: uppercase;
}
.hero-badge span { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; animation: pulse 2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.4); }
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-title-cn { font-family: 'Noto Serif SC', serif; font-size: clamp(20px, 3.5vw, 36px); color: var(--text); margin-bottom: 16px; }

.hero-desc {
  font-size: 14px; color: var(--text-muted); letter-spacing: 1px; line-height: 1.8;
  margin-bottom: 48px;
}

/* ─── Search Card ───────────────────────────────────────── */
.search-card {
  background: linear-gradient(145deg, rgba(26,26,26,.9), rgba(17,17,17,.9));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(201,168,76,.1);
  position: relative; overflow: hidden;
}
.search-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.search-label { font-size: 12px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }

.search-input-wrap { position: relative; margin-bottom: 20px; }
.search-input {
  width: 100%; padding: 18px 60px 18px 22px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text); font-family: 'Courier New', monospace;
  font-size: 16px; letter-spacing: 2px;
  outline: none; transition: border-color .3s, box-shadow .3s;
}
.search-input::placeholder { color: var(--text-muted); letter-spacing: 1px; font-family: inherit; font-size: 14px; }
.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.1), 0 0 20px rgba(201,168,76,.05);
}

.search-icon {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 18px; pointer-events: none;
}

.btn-search {
  width: 100%; padding: 18px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border: none; border-radius: 12px;
  color: #000; font-family: 'Noto Serif SC', serif;
  font-size: 16px; font-weight: 600; letter-spacing: 3px;
  cursor: pointer; transition: all .3s;
  position: relative; overflow: hidden;
}
.btn-search::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
  opacity: 0; transition: opacity .3s;
}
.btn-search:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201,168,76,.4); }
.btn-search:hover::before { opacity: 1; }
.btn-search:active { transform: translateY(0); }

.btn-search .btn-icon { margin-right: 8px; }

/* ─── Stats Bar ─────────────────────────────────────────── */
.stats-bar {
  display: flex; justify-content: center; gap: 40px;
  margin-top: 56px; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num { font-family: 'Cinzel', serif; font-size: 28px; color: var(--gold); font-weight: 700; }
.stat-label { font-size: 11px; color: var(--text-muted); letter-spacing: 2px; margin-top: 4px; }

/* ─── Features ──────────────────────────────────────────── */
.features {
  position: relative; z-index: 1;
  padding: 80px 40px;
  max-width: 1100px; margin: 0 auto;
}
.section-title {
  text-align: center; margin-bottom: 50px;
  font-family: 'Cinzel', serif; font-size: 22px; color: var(--gold);
  letter-spacing: 3px; text-transform: uppercase;
}
.section-title::before, .section-title::after {
  content: '─── '; color: var(--border-hover);
}
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px 28px; transition: all .3s;
}
.feature-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(201,168,76,.1); }
.feature-icon { font-size: 32px; margin-bottom: 16px; }
.feature-title { font-size: 16px; color: var(--gold-light); margin-bottom: 10px; }
.feature-desc { font-size: 13px; color: var(--text-muted); line-height: 1.8; }

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  text-align: center;
  color: var(--text-muted); font-size: 12px; letter-spacing: 1px;
}
.footer a { color: var(--gold); text-decoration: none; }
.footer-official {
  font-size: 13px; color: var(--gold);
  margin-bottom: 8px; letter-spacing: 2px;
}

/* ─── Result Page ───────────────────────────────────────── */
.result-page { padding: 100px 20px 60px; max-width: 860px; margin: 0 auto; position: relative; z-index: 1; }

.result-header {
  text-align: center; margin-bottom: 40px;
}
.result-status-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 28px; border-radius: 40px;
  font-size: 15px; font-weight: 600; letter-spacing: 2px;
  margin-bottom: 20px;
}
.result-status-badge.success {
  background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.3); color: var(--success);
}
.result-status-badge.error {
  background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: var(--error);
}
.result-status-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }

.result-card {
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.result-card-header {
  padding: 28px 36px; border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(201,168,76,.05), transparent);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.result-card-header .serial-num {
  font-family: 'Courier New', monospace; font-size: 18px;
  color: var(--gold); letter-spacing: 3px;
}
.result-card-body { padding: 36px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 36px; }
.info-item {}
.info-label { font-size: 10px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.info-value { font-size: 18px; color: var(--text); font-weight: 600; }
.info-value.celebrity { font-size: 24px; color: var(--gold-light); }

/* ─── Images Gallery ────────────────────────────────────── */
.gallery-title { font-size: 11px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery-item {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); cursor: zoom-in;
  aspect-ratio: 4/3; background: var(--bg4);
  transition: all .3s;
}
.gallery-item:hover { border-color: var(--gold); transform: scale(1.02); box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.gallery-item img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-item .img-type-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,.7); color: var(--gold-light);
  font-size: 10px; letter-spacing: 1px; padding: 4px 10px; border-radius: 20px;
}

/* ─── Lightbox ──────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 92vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 20px; right: 28px;
  color: #fff; font-size: 32px; cursor: pointer; background: none; border: none;
  transition: color .2s;
}
.lightbox-close:hover { color: var(--gold); }

/* ─── QR Code ───────────────────────────────────────────── */
.qr-section { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--border); text-align: center; }
.qr-section img { width: 120px; height: 120px; border-radius: 8px; border: 3px solid var(--border); }
.qr-section p { font-size: 11px; color: var(--text-muted); margin-top: 8px; letter-spacing: 1px; }

/* ─── Error / Not Found ─────────────────────────────────── */
.not-found-card {
  background: var(--bg3); border: 1px solid rgba(248,113,113,.2); border-radius: 20px;
  padding: 60px 40px; text-align: center;
}
.not-found-icon { font-size: 64px; margin-bottom: 24px; }
.not-found-title { font-size: 22px; color: var(--error); margin-bottom: 12px; }
.not-found-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.8; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border: 1px solid var(--gold); border-radius: 10px;
  color: var(--gold); text-decoration: none; font-size: 14px; letter-spacing: 2px;
  transition: all .3s; background: transparent; cursor: pointer; font-family: inherit;
}
.btn-outline:hover { background: var(--gold); color: #000; }

/* ─── Loading Spinner ───────────────────────────────────── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state { text-align: center; padding: 60px 20px; }
.loading-state p { color: var(--text-muted); font-size: 13px; letter-spacing: 2px; margin-top: 16px; }

/* ─── Verify page ───────────────────────────────────────── */
.verify-page { padding: 40px 20px; max-width: 860px; margin: 0 auto; }
.verify-header { text-align: center; padding: 40px 20px 30px; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: 70px; left: 0; right: 0;
    background: rgba(10,10,10,.98); padding: 20px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .search-card { padding: 28px 20px; }
  .info-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 24px; }
  .result-card-header { flex-direction: column; }
  .result-card-body { padding: 24px 20px; }
  .features { padding: 60px 20px; }
}
