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

:root {
  --green: #22c55e;
  --lime: #84cc16;
  --orange: #f59e0b;
  --red: #ef4444;
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-input: #1a1a1a;
  --text: #f5f5f5;
  --text-dim: #a3a3a3;
  --border: #2a2a2a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --radius: 12px;
}

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

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-logo:hover { text-decoration: none; }
.logo-icon { font-size: 24px; }

.nav-actions { display: flex; gap: 12px; align-items: center; }
.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 14px;
}

.btn-share {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.btn-share:hover { background: var(--accent-light); }

/* Hero */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* Scan Form */
.scan-form { margin-bottom: 32px; }

.input-group {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.input-group:focus-within { border-color: var(--accent); }

.input-group input {
  flex: 1;
  padding: 16px 20px;
  font-size: 16px;
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
}

.input-group input::placeholder { color: var(--text-dim); }

.input-group button {
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 600;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.input-group button:hover { background: var(--accent-light); }
.input-group button:disabled { opacity: 0.6; cursor: not-allowed; }

.error-msg {
  color: var(--red);
  font-size: 14px;
  margin-top: 12px;
}

/* Badges */
.badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

/* How it works */
.how-it-works {
  padding: 60px 24px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.how-it-works h2 { font-size: 28px; margin-bottom: 40px; }

.steps { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }

.step {
  flex: 1;
  min-width: 180px;
  max-width: 220px;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 14px; }

/* Recent Scans */
.recent-scans {
  padding: 40px 24px 60px;
  max-width: 640px;
  margin: 0 auto;
}

.recent-scans h2 { font-size: 24px; margin-bottom: 20px; text-align: center; }

.recent-list { display: flex; flex-direction: column; gap: 8px; }

.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

.recent-item a { color: var(--text); }
.recent-score { font-weight: 700; }
.recent-time { color: var(--text-dim); font-size: 12px; }
.recent-empty { text-align: center; color: var(--text-dim); padding: 20px; }

/* Footer */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* === Report Page === */

.report-loading {
  text-align: center;
  padding: 120px 24px;
  color: var(--text-dim);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

.report-error {
  text-align: center;
  padding: 120px 24px;
}
.report-error h2 { margin-bottom: 12px; }
.report-error p { color: var(--text-dim); margin-bottom: 24px; }

.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-light); text-decoration: none; }

/* Report Header */
.report-header {
  text-align: center;
  padding: 40px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.report-url {
  font-size: 16px;
  color: var(--accent-light);
  word-break: break-all;
  margin-bottom: 4px;
}

.report-date { font-size: 13px; color: var(--text-dim); margin-bottom: 32px; }

/* Score Circle */
.score-hero { margin-bottom: 40px; }

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 6px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.score-number { font-size: 48px; font-weight: 800; line-height: 1; }
.score-grade { font-size: 20px; font-weight: 700; opacity: 0.8; }
.score-message { color: var(--text-dim); font-size: 16px; }

/* Score Cards */
.score-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 120px;
}

.card-score { font-size: 32px; font-weight: 800; line-height: 1.2; }
.card-label { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

/* Detail Sections */
.detail-section {
  max-width: 800px;
  margin: 0 auto 24px;
  padding: 0 24px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}

.detail-title { font-size: 18px; font-weight: 700; }
.detail-score { font-size: 16px; font-weight: 700; }

.check-list {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.check-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.check-item:last-child { border-bottom: none; }

.check-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }

.check-info { flex: 1; }
.check-label { font-weight: 600; font-size: 14px; }
.check-value { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.check-rec {
  font-size: 13px;
  color: var(--orange);
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--orange);
}

/* Report Footer */
.report-footer {
  text-align: center;
  padding: 40px 24px 60px;
}
.powered-by { margin-top: 16px; font-size: 13px; color: var(--text-dim); }

/* Social Proof */
.social-proof {
  padding: 40px 24px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.proof-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.proof-stat { display: flex; flex-direction: column; align-items: center; }
.proof-number { font-size: 32px; font-weight: 800; color: var(--accent-light); }
.proof-label { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.proof-divider { width: 1px; height: 40px; background: var(--border); }
.proof-tagline { font-size: 14px; color: var(--text-dim); }

/* Features Grid */
.features {
  padding: 60px 24px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.features h2 { font-size: 28px; margin-bottom: 12px; }
.features-sub { color: var(--text-dim); font-size: 16px; margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: left;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

.feature-card:hover { border-color: var(--accent); }

.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* CTA Banner */
.cta-banner {
  text-align: center;
  padding: 60px 24px;
  max-width: 700px;
  margin: 0 auto;
}

.cta-banner h2 { font-size: 28px; margin-bottom: 12px; }
.cta-banner p { color: var(--text-dim); font-size: 16px; margin-bottom: 24px; }

.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); text-decoration: none; }

/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 28px; }
  .hero { padding: 48px 16px 40px; }
  .input-group { flex-direction: column; }
  .input-group button { border-radius: 0; }
  .score-cards { gap: 8px; }
  .score-card { min-width: 80px; padding: 14px 16px; }
  .card-score { font-size: 24px; }
  .steps { flex-direction: column; align-items: center; }
  .features-grid { grid-template-columns: 1fr; }
  .proof-stats { gap: 24px; }
  .proof-divider { display: none; }
}
