/* ===== DOCCHAIN STYLES ===== */
:root {
  /* Dark Theme (Default) */
  --bg: #0a0a0f;
  --bg2: #0f0f18;
  --bg3: #14141f;
  --card: #13131e;
  --card-border: #1e1e2e;
  --accent: #00e5ff;
  --accent2: #7c3aed;
  --accent3: #10b981;
  --danger: #ff4757;
  --text: #e2e2f0;
  --text-dim: #6b6b8a;
  --text-muted: #3d3d5c;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius: 10px;
  --radius-lg: 16px;
  --glow: 0 0 40px rgba(0,229,255,0.12);
  --glow-strong: 0 0 60px rgba(0,229,255,0.22);
}

body.light-theme {
  --bg: #f8fafc;
  --bg2: #ffffff;
  --bg3: #f1f5f9;
  --card: #ffffff;
  --card-border: #e2e8f0;
  --accent: #0ea5e9;
  --accent2: #6366f1;
  --accent3: #10b981;
  --danger: #ef4444;
  --text: #1e293b;
  --text-dim: #64748b;
  --text-muted: #94a3b8;
  --glow: 0 4px 20px rgba(14, 165, 233, 0.1);
  --glow-strong: 0 8px 30px rgba(14, 165, 233, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Noise overlay */
.noise {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ===== HEADER ===== */
header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 2rem;
  padding: 1rem 2.5rem;
  background: var(--bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.hidden {
  transform: translateY(-100%);
  pointer-events: none;
}

.header-actions {
  display: flex; align-items: center; gap: 1.5rem;
  margin-left: 1.5rem;
}

.theme-btn {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }

.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-icon { display: flex; align-items: center; }
.logo-text { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }

nav { display: flex; gap: 0.25rem; margin-left: auto; }
.nav-link {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em;
  text-decoration: none; color: var(--text-dim);
  padding: 0.4rem 1rem; border-radius: 6px;
  transition: all 0.2s; text-transform: uppercase;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent); background: rgba(0,229,255,0.08);
}

.header-badge {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em;
  color: var(--accent); background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.2); border-radius: 100px;
  padding: 0.3rem 0.8rem; text-transform: uppercase;
}

/* ===== HERO ===== */
.hero {
  padding: 3rem 2.5rem 1.5rem;
  position: relative; z-index: 1;
  max-width: 800px; margin: 0 auto;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  max-height: 500px; opacity: 1;
}

.hero.hidden {
  max-height: 0; padding: 0; opacity: 0; margin: 0;
  pointer-events: none;
}

.hero::before {
  content: ''; position: absolute;
  width: 500px; height: 200px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.12) 0%, transparent 70%);
  top: 0; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}

.hero-tag {
  display: inline-block; font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(0,229,255,0.2);
  padding: 0.25rem 0.8rem; border-radius: 100px; margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.04em;
  margin-bottom: 1rem;
}
.accent-text { color: var(--accent); }

.hero-sub {
  font-size: 0.9rem; color: var(--text-dim); line-height: 1.6;
  max-width: 500px; margin: 0 auto 1.5rem;
  font-weight: 400;
}

.chain-visual {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  flex-wrap: wrap;
}
.block {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em;
  padding: 0.5rem 1.25rem; border: 1px solid var(--card-border);
  border-radius: 8px; background: var(--card); color: var(--text-dim);
}
.accent-block {
  border-color: var(--accent); color: var(--accent);
  background: rgba(0,229,255,0.06);
  box-shadow: 0 0 20px rgba(0,229,255,0.15);
}
.chain-link { color: var(--text-muted); font-size: 1.2rem; }

/* ===== MAIN CONTENT ===== */
main {
  max-width: 1100px; margin: 0 auto;
  padding: 0 2.5rem 4rem;
  position: relative; z-index: 1;
  transition: padding 0.4s ease;
}

.hero.hidden + main {
  padding-top: 2.5rem;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== GRID ===== */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.3s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,0.2), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: rgba(0,229,255,0.2); }

.card-label {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ===== DROP ZONE ===== */
.drop-zone {
  border: 1.5px dashed var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  cursor: pointer; text-align: center;
  transition: all 0.3s; position: relative;
}
.drop-zone:hover {
  border-color: var(--accent);
  background: rgba(0,229,255,0.04);
}
.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(0,229,255,0.08);
  box-shadow: var(--glow);
}
.drop-zone.small { padding: 1.25rem 0.75rem; }

.drop-icon { margin-bottom: 1rem; opacity: 0.7; }
.drop-icon.small-icon { margin-bottom: 0.75rem; }

.drop-text { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.4rem; }
.drop-text.small-text { font-size: 0.8rem; }
.link-text { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.red-link { color: var(--danger) !important; }

.drop-sub { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); }

/* File info */
.file-info { margin-top: 1rem; }
.file-info-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.file-name { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); }
.file-size { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.progress-bar { height: 3px; background: var(--card-border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width 1.5s ease; border-radius: 2px; }

/* ===== HASH DISPLAY ===== */
.hash-display {
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  background: var(--bg2); border: 1px solid var(--card-border);
  border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden;
}
.hash-placeholder { text-align: center; }
.hash-dots { display: flex; gap: 0.3rem; justify-content: center; margin-bottom: 0.75rem; }
.hash-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--card-border);
  animation: blink-dot 1.5s ease-in-out infinite;
}
.hash-dots span:nth-child(2) { animation-delay: 0.2s; }
.hash-dots span:nth-child(3) { animation-delay: 0.4s; }
.hash-dots span:nth-child(4) { animation-delay: 0.6s; }
.hash-dots span:nth-child(5) { animation-delay: 0.8s; }
.hash-dots span:nth-child(6) { animation-delay: 1.0s; }
.hash-dots span:nth-child(7) { animation-delay: 1.2s; }
.hash-dots span:nth-child(8) { animation-delay: 1.4s; }
@keyframes blink-dot { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; background: var(--accent); } }

.hash-placeholder p { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }

.hash-value {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent);
  word-break: break-all; padding: 1rem 1.25rem; line-height: 1.8;
  letter-spacing: 0.05em; text-align: center;
  animation: reveal-hash 0.5s ease;
}
@keyframes reveal-hash {
  from { opacity: 0; filter: blur(8px); }
  to { opacity: 1; filter: none; }
}

.hash-copy-btn {
  font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted);
  background: none; border: 1px solid var(--card-border); border-radius: 6px;
  padding: 0.3rem 0.8rem; cursor: pointer; transition: all 0.2s;
  display: block; margin: 0 auto 0.25rem;
}
.hash-copy-btn:hover { color: var(--accent); border-color: var(--accent); }

/* Hash meta */
.hash-meta { border-top: 1px solid var(--card-border); padding-top: 1rem; }
.meta-row { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.meta-key { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.meta-val { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }

/* ===== QR CONTAINER ===== */
.qr-container {
  display: flex; align-items: center; justify-content: center;
  min-height: 180px; margin-bottom: 1rem;
}
.qr-placeholder { text-align: center; }

/* QR grid placeholder animation */
.qr-grid {
  width: 80px; height: 80px; margin: 0 auto 0.75rem;
  background-image:
    linear-gradient(var(--card-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--card-border) 1px, transparent 1px);
  background-size: 8px 8px;
  border-radius: 4px; opacity: 0.4;
  animation: scan 2s linear infinite;
  position: relative; overflow: hidden;
}
.qr-grid::after {
  content: ''; position: absolute; left: 0; right: 0; height: 2px;
  background: var(--accent); opacity: 0.5;
  animation: scan-line 2s linear infinite;
}
@keyframes scan-line { 0% { top: 0; } 100% { top: 100%; } }

.qr-placeholder p { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); text-align: center; max-width: 160px; margin: 0 auto; }

#qrcode { padding: 12px; background: white; border-radius: 8px; box-shadow: var(--glow); animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }

.qr-actions { display: flex; gap: 0.75rem; }

/* ===== BLOCKCHAIN VIZ ===== */
.chain-card { grid-column: 1 / -1; }
.blockchain-viz { min-height: 80px; }
.chain-empty { display: flex; align-items: center; justify-content: center; min-height: 80px; }
.chain-empty p { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); text-align: center; }

.chain-blocks {
  display: flex; align-items: center; gap: 0; overflow-x: auto;
  padding-bottom: 0.5rem;
}
.chain-block {
  flex-shrink: 0; background: var(--bg2); border: 1px solid var(--card-border);
  border-radius: 8px; padding: 0.75rem 1rem; min-width: 160px;
  animation: slide-in 0.4s ease forwards; opacity: 0;
}
.chain-block:last-child { border-color: var(--accent); background: rgba(0,229,255,0.04); }
.chain-arrow { flex-shrink: 0; color: var(--accent); font-size: 1rem; margin: 0 0.4rem; opacity: 0.5; }
.cb-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.cb-hash { font-family: var(--font-mono); font-size: 0.6rem; color: var(--accent); word-break: break-all; line-height: 1.4; }
.cb-time { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-muted); margin-top: 0.35rem; }

@keyframes slide-in { to { opacity: 1; transform: translateX(0); } from { opacity: 0; transform: translateX(-20px); } }

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  padding: 0.6rem 1.2rem; border-radius: 8px; cursor: pointer;
  transition: all 0.2s; flex: 1; text-align: center;
}
.btn-primary {
  background: var(--accent); color: #000; border: 1px solid var(--accent); font-weight: 700;
}
.btn-primary:hover { background: #33eeff; box-shadow: 0 0 20px rgba(0,229,255,0.3); }
.btn-secondary {
  background: transparent; color: var(--text-dim); border: 1px solid var(--card-border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.generate-btn-wrap { display: flex; justify-content: center; margin-top: 2rem; }
.btn-generate {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff; border: none; border-radius: 12px;
  padding: 1rem 3rem; cursor: pointer;
  transition: all 0.3s; display: flex; align-items: center; gap: 0.75rem;
  box-shadow: 0 4px 30px rgba(124,58,237,0.3);
}
.btn-generate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(124,58,237,0.5);
}
.btn-generate:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.btn-icon { font-size: 1.2rem; }

.btn-generate.small-btn {
  padding: 0.75rem 2rem;
  font-size: 0.85rem;
  border-radius: 10px;
}
.btn-generate.small-btn .btn-icon { font-size: 1rem; }

/* ===== VERIFY SECTION ===== */
.verify-intro { text-align: center; margin-bottom: 1.5rem; }
.verify-intro h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.verify-intro p { color: var(--text-dim); font-size: 0.85rem; }

.verify-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5rem;
  align-items: start; margin-bottom: 2rem;
}

/* .verify-card styles inherited from .card */

.verify-hash-box {
  margin-top: 1rem; padding: 0.75rem 1rem;
  background: var(--bg2); border: 1px solid var(--card-border);
  border-radius: 8px; display: flex; flex-direction: column; gap: 0.3rem;
}
.verify-hash-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; }
.verify-hash-val { font-family: var(--font-mono); font-size: 0.62rem; color: var(--accent); word-break: break-all; line-height: 1.6; }

.vs-divider { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding-top: 2rem; }
.vs-line { width: 1px; flex: 1; background: var(--card-border); }
.vs-circle {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700;
  color: var(--text-muted); border: 1px solid var(--card-border);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); flex-shrink: 0;
  transition: all 0.4s;
}
.vs-circle.match { border-color: var(--accent3); color: var(--accent3); background: rgba(16,185,129,0.1); }
.vs-circle.mismatch { border-color: var(--danger); color: var(--danger); background: rgba(255,71,87,0.1); }

.verify-btn-wrap { display: flex; justify-content: center; margin-bottom: 2rem; }

/* ===== VERIFY RESULT ===== */
.result-card {
  border-radius: var(--radius-lg); padding: 2rem;
  border: 1px solid; animation: reveal-result 0.5s ease;
}
.result-card.match {
  background: rgba(16,185,129,0.06); border-color: var(--accent3);
  box-shadow: 0 0 40px rgba(16,185,129,0.1);
}
.result-card.mismatch {
  background: rgba(255,71,87,0.06); border-color: var(--danger);
  box-shadow: 0 0 40px rgba(255,71,87,0.1);
}

@keyframes reveal-result { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.result-icon { font-size: 3rem; margin-bottom: 1rem; text-align: center; }
.result-text { text-align: center; margin-bottom: 1.5rem; }
.result-text h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.result-card.match .result-text h3 { color: var(--accent3); }
.result-card.mismatch .result-text h3 { color: var(--danger); }
.result-text p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; }

.result-hashes { display: flex; flex-direction: column; gap: 0.75rem; }
.rh-row { background: var(--bg2); border-radius: 8px; padding: 0.75rem 1rem; }
.rh-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.3rem; }
.rh-val { font-family: var(--font-mono); font-size: 0.65rem; word-break: break-all; line-height: 1.6; }
.rh-val.match { color: var(--accent3); }
.rh-val.mismatch { color: var(--danger); }

/* Logo styling */
#headerLogo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.3));
}

.footer-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--card-border);
  padding: 4rem 2.5rem 2rem;
  background: var(--bg2);
  position: relative;
  z-index: 1;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand .logo {
  margin-bottom: 1.5rem;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 450px;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.2s;
}

.footer-col a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.made-by {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ===== LOADING ANIMATION ===== */
.loading-hash {
  font-family: var(--font-mono); font-size: 0.65rem; color: var(--accent);
  animation: scramble 0.1s linear infinite;
  padding: 1rem;
}

/* ===== RESPONSIVE ===== */
/* ===== QR PREVIEW ===== */
.qr-preview-box {
  margin: 1rem 0;
  display: flex; justify-content: center;
}
.qr-preview-box img {
  max-width: 120px;
  border-radius: 8px;
  border: 4px solid white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ===== PROCESS PAGE ===== */
.process-container { max-width: 800px; margin: 0 auto; }
.process-header { text-align: center; margin-bottom: 3rem; }
.process-header h2 { font-size: 2.5rem; margin-bottom: 1rem; }

.pipeline-flow {
  display: flex; flex-direction: column; gap: 1rem;
  margin-bottom: 4rem;
}
.pipeline-step {
  display: flex; gap: 2rem; align-items: flex-start;
  padding: 2rem; background: var(--bg2);
  border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  transition: transform 0.3s;
}
.pipeline-step:hover { transform: translateX(10px); border-color: var(--accent); }
.step-num {
  font-family: var(--font-mono); font-size: 2rem; font-weight: 800;
  color: var(--accent); opacity: 0.5;
}
.step-content h3 { margin-bottom: 0.5rem; font-size: 1.25rem; }
.step-content p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1rem; }
.step-tags { display: flex; gap: 0.5rem; }
.step-tags span {
  font-family: var(--font-mono); font-size: 0.65rem;
  padding: 0.2rem 0.6rem; border-radius: 4px;
  background: rgba(0,229,255,0.1); color: var(--accent);
}
.pipeline-arrow { text-align: center; color: var(--text-muted); font-size: 1.5rem; }

.comparison-logic { padding-top: 2rem; border-top: 1px solid var(--card-border); }
.comparison-logic h3 { margin-bottom: 1.5rem; text-align: center; }
.logic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.logic-card {
  padding: 1.5rem; background: var(--bg2);
  border: 1px solid var(--card-border); border-radius: var(--radius);
}
.logic-card h4 { color: var(--accent); margin-bottom: 0.5rem; }
.logic-card p { font-size: 0.85rem; color: var(--text-dim); line-height: 1.5; }

/* ===== RESULTS DETAILS ===== */
.result-details { margin-top: 1.5rem; border-top: 1px solid var(--card-border); padding-top: 1.5rem; }
.rd-item { display: flex; justify-content: space-between; margin-bottom: 0.75rem; font-size: 0.85rem; }
.rd-label { color: var(--text-muted); }
.rd-val { color: var(--text-dim); font-family: var(--font-mono); }

/* ===== INTERACTIVE PIPELINE ===== */
.interactive-pipeline {
  display: flex; flex-direction: column; gap: 1.5rem;
  margin-top: 3rem;
}
.pipeline-row {
  display: flex; align-items: center; justify-content: center; gap: 2rem;
}
.pipeline-card {
  flex: 1; max-width: 380px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  display: flex; gap: 1.25rem; align-items: center;
  cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.pipeline-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: var(--glow);
}
.card-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0, 229, 255, 0.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem;
  flex-shrink: 0; transition: all 0.3s;
}
.pipeline-card:hover .card-num {
  background: var(--accent); color: #000;
  box-shadow: 0 0 15px var(--accent);
}
.card-body h3 { font-size: 1.05rem; margin-bottom: 0.35rem; color: var(--text); }
.card-body p { font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 0.75rem; }
.view-logic {
  font-family: var(--font-mono); font-size: 0.65rem; color: var(--accent);
  opacity: 0.8; transition: opacity 0.2s;
}
.pipeline-card:hover .view-logic { opacity: 1; text-decoration: underline; }
.pipeline-arrow-h { color: var(--text-muted); font-size: 1.25rem; opacity: 0.5; }

/* ===== MODAL SYSTEM ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: all 0.3s ease;
  padding: 1.5rem;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
  background: var(--bg2); border: 1px solid var(--card-border);
  border-radius: 24px; width: 100%; max-width: 540px;
  max-height: 85vh; overflow-y: auto;
  transform: translateY(20px) scale(0.95); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
  scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
}
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }

.modal-header {
  padding: 1.25rem 2rem; background: #1a1a2e;
  display: flex; align-items: center; gap: 1.25rem;
  border-bottom: 1px solid var(--card-border);
}
.modal-num {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--danger); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 1.1rem; font-weight: 800;
  box-shadow: 0 0 20px rgba(255, 71, 87, 0.5);
  flex-shrink: 0;
}
.modal-header h2 { font-size: 1.5rem; margin: 0; color: #fff; font-weight: 700; letter-spacing: -0.02em; }

.modal-body { padding: 1.5rem 2rem; }
.modal-desc { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; margin-bottom: 1.5rem; }

.modal-section { margin-bottom: 1.25rem; }
.modal-section h4 {
  font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted);
  letter-spacing: 0.12em; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.6rem;
  text-transform: uppercase;
}
.sec-icon { font-size: 1.1rem; }

.modal-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.modal-tag {
  background: rgba(255,255,255,0.03); border: 1px solid var(--card-border);
  color: var(--text); padding: 0.35rem 0.75rem; border-radius: 6px;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  transition: all 0.2s;
}
.modal-tag:hover { background: rgba(255,255,255,0.06); border-color: var(--accent); }

.modal-steps { display: flex; flex-direction: column; gap: 0.75rem; }
.m-step { display: flex; align-items: flex-start; gap: 0.75rem; }
.m-step-num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px;
  background: rgba(255, 71, 87, 0.15); color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 800;
  margin-top: 2px;
}
.m-step-text { color: var(--text-dim); font-size: 0.85rem; line-height: 1.4; }

.modal-footer {
  padding: 0 2rem 1.5rem; display: flex; justify-content: flex-end;
}
.btn-understood {
  background: var(--danger); color: #fff; border: none;
  padding: 0.6rem 1.75rem; border-radius: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 0.9rem;
  cursor: pointer; transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}
.btn-understood:hover { transform: scale(1.05); filter: brightness(1.1); box-shadow: 0 8px 25px rgba(255, 71, 87, 0.5); }

/* Theme specific modal overrides */
body.light-theme .modal-overlay { background: rgba(15, 23, 42, 0.4); }
body.light-theme .modal-content { background: #fff; }
body.light-theme .modal-header { background: #1e293b; }
body.light-theme .modal-tag { background: #f8fafc; color: #475569; }
body.light-theme .m-step-text { color: #475569; }
body.light-theme .modal-desc { color: #334155; }

/* ===== COMPARISON PAGE ===== */
.comparison-page { max-width: 1000px; margin: 0 auto; }
.comparison-table-wrap {
  background: var(--bg2); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 2rem;
}
.ver-table { width: 100%; border-collapse: collapse; text-align: left; }
.ver-table th {
  background: #1a1a2e; padding: 1.25rem 1.5rem;
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 700;
  color: var(--accent); border-bottom: 1px solid var(--card-border);
}
.ver-table td {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.85rem; color: var(--text-dim);
}
.ver-table tr:hover td { background: rgba(0,229,255,0.02); }
.p-name { font-family: var(--font-mono); font-weight: 700; color: var(--text-muted); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.1em; }

/* Status Badges */
.status-badge {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 800;
  padding: 0.25rem 0.6rem; border-radius: 4px; border: 1px solid;
}
.status-badge.critical { color: var(--danger); border-color: rgba(255,71,87,0.3); background: rgba(255,71,87,0.05); }
.status-badge.info { color: var(--accent); border-color: rgba(0,229,255,0.3); background: rgba(0,229,255,0.05); }
.status-badge.verified { color: var(--accent3); border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.05); }
.status-badge.immutable { color: #f97316; border-color: rgba(249,115,22,0.3); background: rgba(249,115,22,0.05); }

.comparison-footer-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.mini-card {
  background: var(--bg2); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.5rem;
}
.mini-card h4 { color: var(--accent); margin-bottom: 0.5rem; font-size: 1rem; }
.mini-card p { font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; }

@media (max-width: 768px) {
  .ver-table th, .ver-table td { padding: 1rem; font-size: 0.75rem; }
  .comparison-footer-cards { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  header { padding: 0.75rem 1.25rem; flex-wrap: wrap; }
  .header-actions { margin-left: 0; width: 100%; justify-content: space-between; }
  .header-badge { display: none; }
  .hero { padding: 2.5rem 1.25rem 1.5rem; }
  main { padding: 1.25rem 1.25rem 3rem; }
  .panel-grid { grid-template-columns: 1fr; }
  .chain-card { grid-column: auto; }
  .verify-grid { grid-template-columns: 1fr; }
  .vs-divider { flex-direction: row; padding-top: 0; }
  .vs-line { height: 1px; width: auto; flex: 1; }
  .logic-grid { grid-template-columns: 1fr; }
  
  /* Pipeline Mobile */
  .pipeline-row { flex-direction: column; gap: 1rem; }
  .pipeline-arrow-h { transform: rotate(90deg); margin: 0.5rem 0; }
  .pipeline-card { max-width: 100%; }

  /* Footer Mobile */
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-desc { max-width: 100%; }
}
