:root {
  --primary: #8B5CF6;
  --primary-dim: rgba(139,92,246,0.12);
  --accent: #06B6D4;
  --accent-dim: rgba(6,182,212,0.12);
  --bg: #0B0E14;
  --bg-input: rgba(6,8,12,0.9);
  --border: rgba(139,92,246,0.12);
  --border-hover: rgba(139,92,246,0.25);
  --text: #E2E8F0;
  --text-dim: #94A3B8;
  --text-muted: #64748B;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 250ms ease;
  --glass: rgba(11,14,20,0.65);
  --glass-border: rgba(139,92,246,0.08);
  --success: #10B981;
  --danger: #EF4444;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  min-height: 100vh; line-height: 1.6;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(139,92,246,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(6,182,212,0.04) 0%, transparent 50%);
}
.app { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; min-height: 100vh; }

.header { padding: 16px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 12px; }
.logo { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.header h1 { font-size: 1.2rem; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: var(--radius-sm); border: none; font-family: var(--font); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--primary-dim); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.upload-label { cursor: pointer; }
.upload-label input { display: none; }

.main { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; padding: 16px 0; align-items: start; }

.panel { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; animation: fadeIn 0.3s ease; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.panel-header h2 { font-size: 0.88rem; font-weight: 600; }
.panel-actions { display: flex; gap: 6px; }
.panel-body { padding: 16px; }

.input { width: 100%; padding: 8px 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: var(--font); font-size: 0.82rem; outline: none; transition: all var(--transition); }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.hash-textarea { min-height: 100px; resize: vertical; font-family: var(--mono); font-size: 0.8rem; }

/* Compare Center */
.compare-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px 10px; }
.compare-badge { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; border: 2px solid var(--border); transition: all 0.3s ease; }
.compare-badge.match { background: rgba(16,185,129,0.1); border-color: var(--success); color: var(--success); }
.compare-badge.mismatch { background: rgba(239,68,68,0.1); border-color: var(--danger); color: var(--danger); }
.compare-label { font-size: 0.72rem; color: var(--text-muted); text-align: center; max-width: 100px; }

/* Results */
.algo-results { margin-top: 12px; }
.algo-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.algo-row:last-child { border-bottom: none; }
.algo-name { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; color: var(--text-dim); min-width: 60px; flex-shrink: 0; }
.algo-hash { flex: 1; font-family: var(--mono); font-size: 0.72rem; color: var(--text); word-break: break-all; line-height: 1.4; }
.algo-match { color: var(--success); }
.algo-mismatch { color: var(--danger); }
.copy-hash { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.72rem; padding: 2px 6px; border-radius: 4px; transition: all var(--transition); flex-shrink: 0; }
.copy-hash:hover { color: var(--text); background: var(--primary-dim); }

.footer { padding: 16px 0; text-align: center; font-size: 0.72rem; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: auto; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
@media (max-width: 800px) { .main { grid-template-columns: 1fr; } .compare-center { flex-direction: row; padding: 10px 0; } }
