:root {
  --bg: #0f0f13;
  --surface: #1a1a27;
  --border: #2d2d3e;
  --accent: #6366f1;
  --text: #e2e8f0;
  --muted: #64748b;
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --radius: 16px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}

#app {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.c2pa-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
}

main {
  min-height: 60vh;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
}

.drop-icon {
  color: var(--muted);
  margin-bottom: 8px;
}

.drop-zone h2 {
  font-size: 22px;
  font-weight: 600;
}

.drop-zone p {
  color: var(--muted);
  font-size: 14px;
  max-width: 300px;
}

.select-btn {
  margin-top: 8px;
  padding: 12px 28px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  transition: background 0.15s;
}

.select-btn:hover { background: #5558e8; }

.expected-hash {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.hash-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.hash-value {
  font-family: monospace;
  font-size: 14px;
  color: var(--accent);
  word-break: break-all;
}

/* Verifying */
#verifying-section {
  display: flex;
  justify-content: center;
  padding: 80px 0;
}

.verifying-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.verify-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

#verify-status {
  color: var(--muted);
  font-size: 15px;
}

/* Verdict */
.verdict {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 2px solid;
}

.verdict.authentic {
  background: rgba(34, 197, 94, 0.08);
  border-color: var(--success);
}

.verdict.tampered {
  background: rgba(239, 68, 68, 0.08);
  border-color: var(--error);
}

.verdict.unknown {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--warning);
}

.verdict-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.verdict.authentic .verdict-icon { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.verdict.tampered .verdict-icon { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.verdict.unknown .verdict-icon { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.verdict-text h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.verdict.authentic .verdict-text h2 { color: var(--success); }
.verdict.tampered .verdict-text h2 { color: var(--error); }
.verdict.unknown .verdict-text h2 { color: var(--warning); }

.verdict-text p { color: var(--muted); font-size: 14px; }

/* Details */
.manifest-details,
.assertions-section,
.hash-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.manifest-details h3,
.assertions-section h3,
.hash-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-item {
  background: #13131f;
  border-radius: 10px;
  padding: 12px 14px;
}

.detail-item .key {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-item .value {
  font-size: 13px;
  word-break: break-all;
  font-weight: 500;
}

.assertion-item {
  padding: 12px 14px;
  background: #13131f;
  border-radius: 10px;
  margin-bottom: 8px;
}

.assertion-label {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
  font-family: monospace;
}

.assertion-data {
  font-size: 12px;
  color: var(--muted);
  font-family: monospace;
  white-space: pre-wrap;
  overflow-x: auto;
}

.hash-compare {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hash-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.hash-row-label {
  font-size: 12px;
  color: var(--muted);
  min-width: 100px;
  padding-top: 2px;
}

.hash-row-value {
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
  flex: 1;
}

.hash-match { color: var(--success); }
.hash-mismatch { color: var(--error); }

.hash-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.hash-result.match {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid var(--success);
}

.hash-result.mismatch {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid var(--error);
}

.dedi-card {
  background: #13131f;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dedi-row { display: flex; align-items: center; gap: 12px; color: var(--text); }
.dedi-name { font-size: 15px; font-weight: 600; }
.dedi-url { font-size: 12px; color: var(--accent); text-decoration: none; }
.dedi-url:hover { text-decoration: underline; }
.dedi-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.dedi-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border: 1px solid; border-radius: 999px; }
.dedi-id { font-size: 11px; color: var(--muted); font-family: monospace; word-break: break-all; }

.verify-another {
  display: block;
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
  margin-bottom: 40px;
  transition: all 0.15s;
}

.verify-another:hover {
  border-color: var(--accent);
  color: var(--accent);
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 40px;
}

footer p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

.hidden { display: none !important; }
