/* ================================================
   ZKProofID — Global Styles
   Aleo ZKP 기반 연령 인증 SaaS 플랫폼
   ================================================ */

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

:root {
  --primary:      #6366f1;
  --primary-dark: #4f46e5;
  --primary-light:#818cf8;
  --accent:       #06b6d4;
  --success:      #10b981;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --dark:         #0f0f1a;
  --dark2:        #1a1a2e;
  --dark3:        #16213e;
  --card-bg:      #1e1e35;
  --card-border:  rgba(99,102,241,.25);
  --text:         #e2e8f0;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;
  --white:        #ffffff;
  --radius:       16px;
  --radius-sm:    10px;
  --shadow:       0 20px 60px rgba(0,0,0,.5);
  --shadow-sm:    0 4px 20px rgba(0,0,0,.3);
  --transition:   .25s cubic-bezier(.4,0,.2,1);
  --font:         'Inter', sans-serif;
  --mono:         'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- Typography ---------- */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.4rem; border-radius: 50px; font-weight: 600; font-size: .9rem;
  border: 2px solid transparent; cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 8px 25px rgba(99,102,241,.4); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-outline-white { border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); }
.btn-white { background: var(--white); color: var(--dark); }
.btn-white:hover { background: #f1f5f9; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: .4rem 1rem; font-size: .82rem; }

/* ---------- Section Commons ---------- */
.section-inner { max-width: 1200px; margin: 0 auto; padding: 100px 24px; }
.section-label {
  display: inline-block; background: rgba(99,102,241,.15); color: var(--primary-light);
  border: 1px solid rgba(99,102,241,.3); border-radius: 50px;
  padding: .3rem 1rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.section-desc { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; }

/* ================================================
   NAVBAR
   ================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15,15,26,.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(15,15,26,.97); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 2rem; height: 68px;
}
.nav-logo {
  display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem;
}
.logo-icon { font-size: 1.4rem; color: var(--primary); }
.logo-accent { color: var(--accent); }
.nav-links {
  display: flex; gap: .25rem; margin-left: auto;
}
.nav-links a {
  padding: .45rem .85rem; border-radius: 8px; font-size: .9rem; color: var(--text-muted);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.07); }
.nav-actions { display: flex; gap: .75rem; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; padding-top: 68px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(99,102,241,.25) 0%, transparent 60%),
              radial-gradient(ellipse 50% 50% at 100% 80%, rgba(6,182,212,.15) 0%, transparent 50%),
              var(--dark);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(99,102,241,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(99,102,241,.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-inner {
  position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 80px 24px 60px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.35);
  color: var(--primary-light); border-radius: 50px; padding: .4rem 1rem;
  font-size: .82rem; font-weight: 600; margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 900; line-height: 1.15;
  margin-bottom: 1.5rem; max-width: 700px;
}
.hero-desc {
  font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2.5rem;
  max-width: 600px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-stats {
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--white); }
.stat-label { font-size: .8rem; color: var(--text-muted); }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,.1); }

/* Hero Demo Cards */
.hero-demo {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 1rem; z-index: 2;
}
.demo-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.25rem; width: 200px;
  box-shadow: var(--shadow);
}
.demo-card-header {
  font-size: .78rem; font-weight: 700; color: var(--primary-light);
  margin-bottom: 1rem; display: flex; align-items: center; gap: .4rem;
}
.demo-step {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--text-muted); padding: .4rem .6rem;
  border-radius: 8px; margin-bottom: .4rem; transition: var(--transition);
}
.demo-step i { width: 16px; text-align: center; color: var(--primary); }
.active-step { background: rgba(99,102,241,.15); color: var(--white); }
.success-step { background: rgba(16,185,129,.15); color: #6ee7b7; }
.success-step i { color: var(--success); }
.demo-arrow { font-size: 1.5rem; color: var(--primary-light); }

/* ================================================
   AGE TIERS
   ================================================ */
.age-tiers { background: var(--dark2); }
.tiers-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
}
.tier-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 2rem; transition: var(--transition);
}
.tier-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(99,102,241,.5); }
.tier-icon { font-size: 2rem; margin-bottom: 1rem; }
.tier-adult .tier-icon { color: #818cf8; }
.tier-youth .tier-icon { color: #fbbf24; }
.tier-child .tier-icon { color: #34d399; }
.tier-minor .tier-icon { color: #f87171; }
.tier-badge {
  display: inline-block; color: #fff; font-size: .75rem; font-weight: 700;
  padding: .2rem .7rem; border-radius: 50px; margin-bottom: .8rem;
}
.tier-title { font-size: 1.3rem; margin-bottom: .6rem; }
.tier-desc { font-size: .88rem; color: var(--text-muted); margin-bottom: 1.2rem; line-height: 1.5; }
.tier-list li {
  display: flex; align-items: center; gap: .5rem;
  font-size: .84rem; color: var(--text-muted); margin-bottom: .4rem;
}
.tier-list .fa-check { color: var(--success); }
.tier-proof {
  margin-top: 1.2rem; font-family: var(--mono); font-size: .78rem;
  background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; padding: .5rem .8rem; color: var(--text-muted);
}
.proof-true { color: var(--success); font-weight: 700; }

/* ================================================
   HOW IT WORKS
   ================================================ */
.how-it-works { background: var(--dark); }
.flow-container {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 2rem;
  margin-top: 3rem; align-items: start;
}
.flow-side-label {
  display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; font-weight: 700; color: var(--primary-light);
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  border-radius: 8px; padding: .5rem 1rem; margin-bottom: 1.5rem;
}
.flow-steps { display: flex; flex-direction: column; gap: .5rem; }
.flow-step {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 1.2rem; transition: var(--transition);
}
.flow-step:hover { border-color: var(--primary); }
.success-flow { border-color: rgba(16,185,129,.3); }
.success-flow:hover { border-color: var(--success); }
.step-num { font-size: .7rem; font-weight: 800; color: var(--primary); background: rgba(99,102,241,.15); border-radius: 6px; padding: .2rem .45rem; min-width: 28px; text-align: center; }
.step-icon { font-size: 1.3rem; color: var(--primary); min-width: 24px; margin-top: .1rem; }
.success-flow .step-icon { color: var(--success); }
.step-content h4 { font-size: .95rem; margin-bottom: .2rem; }
.step-content p { font-size: .82rem; color: var(--text-muted); line-height: 1.4; }
.flow-connector { text-align: center; color: var(--text-dim); font-size: .85rem; padding: .25rem 0; }
.flow-middle {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-top: 60px;
}
.flow-transfer {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(6,182,212,.2));
  border: 1px solid rgba(99,102,241,.3); border-radius: var(--radius);
  padding: 1.5rem 1.2rem; font-size: .8rem; color: var(--text-muted); text-align: center;
}
.flow-transfer i { font-size: 1.8rem; color: var(--accent); }

/* ================================================
   FEATURES
   ================================================ */
.features { background: var(--dark2); }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
}
.feature-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.8rem; transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; color: #fff; margin-bottom: 1.2rem;
}
.gradient-purple { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.gradient-blue   { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.gradient-green  { background: linear-gradient(135deg, #10b981, #34d399); }
.gradient-orange { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.gradient-red    { background: linear-gradient(135deg, #ef4444, #ec4899); }
.gradient-teal   { background: linear-gradient(135deg, #06b6d4, #6366f1); }
.feature-card h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.feature-card p { font-size: .87rem; color: var(--text-muted); line-height: 1.6; }

/* ================================================
   TECH STACK
   ================================================ */
.tech-stack { background: var(--dark); }
.arch-diagram { margin: 3rem 0; }
.arch-layer {
  border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 1.5rem; background: var(--card-bg);
}
.layer-title {
  font-size: .88rem; font-weight: 700; margin-bottom: 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.layer-mobile .layer-title { color: #818cf8; }
.layer-verify .layer-title { color: #34d399; }
.layer-data   .layer-title { color: #fbbf24; }
.arch-components { display: flex; gap: 1rem; flex-wrap: wrap; }
.arch-comp {
  flex: 1; min-width: 150px; background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.07); border-radius: 10px;
  padding: .8rem 1rem; font-size: .85rem; line-height: 1.4;
}
.arch-comp small { display: block; font-family: var(--mono); color: var(--accent); font-size: .75rem; margin-top: .2rem; }
.arch-arrow {
  text-align: center; padding: 1.2rem 0; font-size: .85rem; color: var(--text-dim);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.arch-arrow i { color: var(--primary); }
.tech-tags { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.tech-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  color: var(--primary-light); border-radius: 50px; padding: .3rem .9rem; font-size: .82rem;
}

/* ================================================
   PRICING
   ================================================ */
.pricing { background: var(--dark2); }
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; margin-top: 3rem; align-items: start;
}
.price-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 2rem; position: relative;
  transition: var(--transition);
}
.price-card:hover { transform: translateY(-4px); }
.price-popular {
  border-color: var(--primary); background: linear-gradient(160deg, #1e1e35 0%, rgba(99,102,241,.1) 100%);
  transform: scale(1.03);
}
.price-popular:hover { transform: scale(1.03) translateY(-4px); }
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700;
  padding: .2rem .9rem; border-radius: 50px;
}
.price-tier { font-size: .85rem; font-weight: 700; color: var(--text-muted); margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .06em; }
.price-amount { font-size: 2.5rem; font-weight: 900; color: var(--white); }
.price-amount span { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.price-desc { font-size: .85rem; color: var(--text-muted); margin: .5rem 0 1.5rem; }
.price-features li {
  display: flex; align-items: center; gap: .6rem;
  font-size: .87rem; color: var(--text-muted); margin-bottom: .6rem;
}
.price-features .fa-check { color: var(--success); }
.price-features .fa-times { color: var(--text-dim); }
.price-features .text-muted { color: var(--text-dim); }
.price-features { margin-bottom: 2rem; }

/* ================================================
   CTA SECTION
   ================================================ */
.cta-section { background: var(--dark); }
.cta-box {
  background: linear-gradient(135deg, rgba(99,102,241,.2) 0%, rgba(6,182,212,.15) 100%);
  border: 1px solid rgba(99,102,241,.3); border-radius: 24px;
  padding: 4rem 2rem; text-align: center;
}
.cta-box h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 1rem; }
.cta-box p  { color: var(--text-muted); margin-bottom: 2.5rem; font-size: 1rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ================================================
   FOOTER
   ================================================ */
.footer { background: var(--dark2); border-top: 1px solid rgba(255,255,255,.06); }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 60px 24px 40px;
  display: flex; gap: 4rem; flex-wrap: wrap;
}
.footer-brand { flex: 1; min-width: 220px; }
.footer-brand p { color: var(--text-muted); font-size: .88rem; margin: 1rem 0 1.2rem; line-height: 1.6; }
.footer-badges .badge-item {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  color: var(--primary-light); border-radius: 50px; padding: .25rem .8rem; font-size: .78rem;
}
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 { font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul li a { font-size: .88rem; color: var(--text-muted); transition: var(--transition); }
.footer-col ul li a:hover { color: var(--primary-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  max-width: 1200px; margin: 0 auto; padding: 20px 24px;
  font-size: .82rem; color: var(--text-dim);
}

/* ================================================
   USER APP PAGE (user.html)
   ================================================ */
.app-page { min-height: 100vh; background: var(--dark); padding-top: 68px; }
.app-container {
  max-width: 480px; margin: 0 auto; padding: 2rem 1.5rem 4rem;
}
.app-header { text-align: center; margin-bottom: 2rem; padding: 1.5rem 0; }
.app-header h1 { font-size: 1.6rem; }
.app-header p { color: var(--text-muted); font-size: .9rem; margin-top: .4rem; }

/* Step Progress */
.step-progress {
  display: flex; align-items: center; gap: .5rem; margin-bottom: 2rem;
}
.sp-step {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem;
}
.sp-dot {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; font-size: .75rem;
  font-weight: 700; color: var(--text-dim); transition: var(--transition);
}
.sp-step.active .sp-dot { border-color: var(--primary); background: var(--primary); color: #fff; }
.sp-step.done .sp-dot { border-color: var(--success); background: var(--success); color: #fff; }
.sp-label { font-size: .7rem; color: var(--text-dim); }
.sp-step.active .sp-label, .sp-step.done .sp-label { color: var(--text-muted); }
.sp-line { flex: 1; height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; margin-bottom: 1rem; }
.sp-line.done { background: var(--success); }

/* App Card */
.app-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.8rem; margin-bottom: 1.2rem;
}
.app-card-title {
  font-size: .8rem; font-weight: 700; color: var(--primary-light);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: .5rem;
}

/* Form inputs */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: .83rem; font-weight: 600; color: var(--text-muted); margin-bottom: .4rem; }
.form-control {
  width: 100%; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: .7rem 1rem; color: var(--text); font-size: .9rem;
  font-family: var(--font); transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); background: rgba(99,102,241,.08); }
.form-control option { background: var(--dark2); }
select.form-control { cursor: pointer; }

/* Age Tier Selector */
.tier-selector { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.tier-option {
  border: 2px solid rgba(255,255,255,.08); border-radius: 10px; padding: .8rem;
  cursor: pointer; transition: var(--transition); text-align: center;
}
.tier-option:hover { border-color: rgba(99,102,241,.4); }
.tier-option.selected { border-color: var(--primary); background: rgba(99,102,241,.12); }
.tier-option-icon { font-size: 1.4rem; margin-bottom: .3rem; }
.tier-option-label { font-size: .75rem; font-weight: 700; color: var(--text-muted); }
.tier-option.selected .tier-option-label { color: var(--primary-light); }
.tier-option-age { font-size: .7rem; color: var(--text-dim); margin-top: .1rem; }

/* Biometric Btn */
.biometric-btn {
  width: 100%; padding: 1.2rem; border-radius: var(--radius); border: 2px dashed rgba(99,102,241,.35);
  background: rgba(99,102,241,.06); color: var(--primary-light); font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: var(--transition); display: flex; flex-direction: column;
  align-items: center; gap: .5rem;
}
.biometric-btn:hover { background: rgba(99,102,241,.15); border-color: var(--primary); }
.biometric-btn i { font-size: 2.5rem; }
.biometric-btn .bio-hint { font-size: .75rem; color: var(--text-dim); font-weight: 400; }

.biometric-btn.success {
  border-color: var(--success); background: rgba(16,185,129,.1); color: #6ee7b7;
  border-style: solid;
}

/* ZKP generation */
.zkp-display {
  background: rgba(0,0,0,.4); border: 1px solid rgba(99,102,241,.2);
  border-radius: 10px; padding: 1rem; font-family: var(--mono); font-size: .72rem;
  color: var(--accent); line-height: 1.6; min-height: 80px; word-break: break-all;
  max-height: 120px; overflow-y: auto;
}
.zkp-display.generating { animation: zkpBlink 1s infinite; }
@keyframes zkpBlink { 50% { opacity: .5; } }

/* Progress bar */
.progress-bar { height: 4px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; margin: .8rem 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px; transition: width .3s; }

/* QR Code display */
.qr-wrapper {
  text-align: center; padding: 1.5rem;
  background: var(--white); border-radius: var(--radius); display: inline-block;
  margin: 0 auto; display: flex; align-items: center; justify-content: center;
}
#qr-canvas { display: block; }
.qr-container { text-align: center; }
.qr-expire-bar { margin-top: 1rem; }
.qr-expire-label { font-size: .78rem; color: var(--text-muted); margin-bottom: .3rem; display: flex; justify-content: space-between; }

/* Result badge */
.result-badge {
  display: flex; align-items: center; justify-content: center; gap: .8rem;
  padding: 1.2rem; border-radius: 12px; font-weight: 700; font-size: 1rem;
}
.result-badge.success { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.result-badge.fail    { background: rgba(239,68,68,.15);  border: 1px solid rgba(239,68,68,.3);  color: #fca5a5; }
.result-badge i { font-size: 1.5rem; }

/* ================================================
   VERIFY PAGE
   ================================================ */
.verify-page { min-height: 100vh; background: var(--dark); padding-top: 68px; }
.verify-container { max-width: 560px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.verify-header { text-align: center; margin-bottom: 2rem; }
.verify-header h1 { font-size: 1.6rem; }
.verify-header p { color: var(--text-muted); font-size: .9rem; }

.scan-area {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--card-border); background: #000;
  /* 정방형 유지 — 비디오와 동일 비율 */
  aspect-ratio: 1;
  max-height: min(80vw, 400px);  /* 너무 크지 않게 */
}
#scan-video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* iOS Safari 하드웨어 가속 */
  -webkit-transform: translateZ(0); transform: translateZ(0);
}
.scan-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.scan-frame {
  /* 더 크게 — QR을 꽉 채우기 쉽게 (60% → 72%) */
  width: 72%; aspect-ratio: 1; border: 2.5px solid var(--primary);
  border-radius: 12px; position: relative; box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
}
.scan-line {
  position: absolute; left: 4px; right: 4px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--primary), transparent);
  box-shadow: 0 0 10px var(--primary);
  animation: scanAnim 1.8s ease-in-out infinite;
}
@keyframes scanAnim {
  0%   { top: 4%; opacity: 1; }
  48%  { top: 93%; opacity: 1; }
  50%  { top: 93%; opacity: 0; }
  52%  { top: 4%;  opacity: 0; }
  54%  { top: 4%;  opacity: 1; }
  100% { top: 4%;  opacity: 1; }
}
.scan-corner {
  position: absolute; width: 22px; height: 22px; border-color: var(--accent); border-style: solid;
}
.corner-tl { top: -2px; left: -2px; border-width: 4px 0 0 4px; border-radius: 6px 0 0 0; }
.corner-tr { top: -2px; right: -2px; border-width: 4px 4px 0 0; border-radius: 0 6px 0 0; }
.corner-bl { bottom: -2px; left: -2px; border-width: 0 0 4px 4px; border-radius: 0 0 0 6px; }
.corner-br { bottom: -2px; right: -2px; border-width: 0 4px 4px 0; border-radius: 0 0 6px 0; }

/* Verify Result Card */
.verify-result {
  text-align: center; padding: 2.5rem 1.5rem; border-radius: var(--radius);
  border: 2px solid transparent; background: var(--card-bg); margin-top: 1.5rem;
  display: none;
}
.verify-result.show { display: block; }
.verify-result.result-pass { border-color: var(--success); background: linear-gradient(135deg, rgba(16,185,129,.1) 0%, var(--card-bg) 100%); }
.verify-result.result-fail { border-color: var(--danger); background: linear-gradient(135deg, rgba(239,68,68,.1) 0%, var(--card-bg) 100%); }
.verify-result-icon { font-size: 4rem; margin-bottom: 1rem; }
.result-pass .verify-result-icon { color: var(--success); }
.result-fail .verify-result-icon { color: var(--danger); }
.verify-result-title { font-size: 1.8rem; font-weight: 900; margin-bottom: .5rem; }
.result-pass .verify-result-title { color: #6ee7b7; }
.result-fail .verify-result-title { color: #fca5a5; }
.verify-result-sub { font-size: .9rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.verify-meta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.verify-meta-item {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; padding: .4rem .9rem; font-size: .78rem; color: var(--text-muted);
  display: flex; align-items: center; gap: .4rem;
}

/* History list */
.scan-history { margin-top: 2rem; }
.history-item {
  display: flex; align-items: center; gap: 1rem;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 10px; padding: .8rem 1rem; margin-bottom: .5rem;
}
.history-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.history-dot.pass { background: var(--success); }
.history-dot.fail { background: var(--danger); }
.history-info { flex: 1; }
.history-label { font-size: .85rem; font-weight: 600; }
.history-time { font-size: .75rem; color: var(--text-dim); }
.history-tier { font-size: .75rem; color: var(--primary-light); }

/* ================================================
   DASHBOARD
   ================================================ */
.dash-page { min-height: 100vh; background: var(--dark); padding-top: 68px; }
.dash-inner { max-width: 1300px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.dash-header h1 { font-size: 1.8rem; }
.dash-header p { color: var(--text-muted); font-size: .9rem; margin-top: .2rem; }

/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.kpi-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 1.5rem; transition: var(--transition);
}
.kpi-card:hover { border-color: rgba(99,102,241,.4); }
.kpi-label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.kpi-value { font-size: 2rem; font-weight: 800; color: var(--white); }
.kpi-change { font-size: .78rem; margin-top: .3rem; }
.kpi-change.up { color: var(--success); }
.kpi-change.down { color: var(--danger); }
.kpi-icon { font-size: 1.5rem; margin-bottom: .7rem; }

/* Chart area */
.chart-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.chart-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.5rem;
}
.chart-title { font-size: .9rem; font-weight: 700; margin-bottom: 1.2rem; display: flex; align-items: center; gap: .5rem; }
.chart-title i { color: var(--primary); }

/* Merchant/Log table */
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th { text-align: left; padding: .75rem 1rem; color: var(--text-dim); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid rgba(255,255,255,.06); }
.data-table td { padding: .7rem 1rem; border-bottom: 1px solid rgba(255,255,255,.04); color: var(--text-muted); }
.data-table tr:hover td { background: rgba(255,255,255,.02); }
.tag {
  display: inline-block; padding: .18rem .65rem; border-radius: 50px; font-size: .72rem; font-weight: 700;
}
.tag-pass  { background: rgba(16,185,129,.15); color: #6ee7b7; }
.tag-fail  { background: rgba(239,68,68,.15);  color: #fca5a5; }
.tag-adult { background: rgba(99,102,241,.15);  color: #c4b5fd; }
.tag-youth { background: rgba(245,158,11,.15);  color: #fde68a; }
.tag-child { background: rgba(16,185,129,.15);  color: #a7f3d0; }
.tag-minor { background: rgba(239,68,68,.15);   color: #fecaca; }

/* Sidebar nav for dashboard */
.dash-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; }
.dash-sidebar {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.2rem; position: sticky; top: 80px;
}
.sidebar-nav li { margin-bottom: .3rem; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem;
  border-radius: 8px; font-size: .88rem; color: var(--text-muted); transition: var(--transition);
}
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: var(--text); }
.sidebar-nav a.active { background: rgba(99,102,241,.15); color: var(--primary-light); }
.sidebar-nav a i { width: 18px; text-align: center; }

/* ================================================
   UTILITIES
   ================================================ */
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.mt-1 { margin-top: .4rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .4rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.spinner {
  width: 28px; height: 28px; border: 3px solid rgba(99,102,241,.2);
  border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
  .hero-demo { display: none; }
  .chart-row { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
  .flow-container { grid-template-columns: 1fr; }
  .flow-middle { flex-direction: row; padding: 0; justify-content: center; }
  .flow-transfer { flex-direction: row; padding: 1rem; }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: flex; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: rgba(15,15,26,.97); padding: 1rem; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav-actions.open { display: flex; flex-direction: column; position: absolute; top: calc(68px + 200px); left: 0; right: 0; background: rgba(15,15,26,.97); padding: 1rem; border-bottom: 1px solid rgba(255,255,255,.06); }
  .hero-stats { gap: 1rem; }
  .stat-divider { display: none; }
  .tier-selector { grid-template-columns: 1fr 1fr; }
  .section-inner { padding: 60px 20px; }
  .cta-actions { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; gap: 2rem; }
  .footer-links { gap: 2rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-actions { flex-direction: column; }
  .tier-selector { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .verify-meta { flex-direction: column; align-items: center; }
}
