/* ─────────────────────────────────────────────
   ProPro – Deep Fake Detector  |  style.css
   ───────────────────────────────────────────── */

/* ── Tokens ── */
:root {
  --bg:          #07080f;
  --bg2:         #0d0f1a;
  --surface:     #111526;
  --surface2:    #181c30;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);

  --accent:      #7c6af7;
  --accent2:     #9f8fff;
  --cyan:        #38c5f5;
  --green:       #3ddba7;
  --red:         #f45272;
  --amber:       #f9a24b;

  --text:        #e8eaf6;
  --text-muted:  #7a7f9d;
  --text-faint:  #3c4063;

  --radius:      18px;
  --radius-sm:   10px;
  --shadow:      0 24px 64px rgba(0,0,0,.55);
  --transition:  0.25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background Particles ── */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: floatUp var(--dur, 12s) var(--delay, 0s) infinite ease-in-out;
}
@keyframes floatUp {
  0%   { transform: translateY(100vh) scale(0);  opacity: 0; }
  10%  { opacity: .45; }
  90%  { opacity: .1; }
  100% { transform: translateY(-20vh) scale(1.3); opacity: 0; }
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,8,15,.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -.5px;
}
.logo-shield { font-size: 1.5rem; }
.logo-accent { color: var(--accent); }
.nav-badge {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border2);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── Hero ── */
.hero {
  position: relative;
  text-align: center;
  padding: 80px 24px 60px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 320px;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,106,247,.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--accent2);
  background: rgba(124,106,247,.12);
  border: 1px solid rgba(124,106,247,.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.chip-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(124,106,247,.6); }
  50%      { box-shadow: 0 0 0 8px rgba(124,106,247,0); }
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  max-width: 520px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Main container ── */
.main-container {
  max-width: 700px;
  margin: 0 auto 80px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 1;
}

/* ── Detector Card ── */
.detector-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ── Upload Zone ── */
.upload-zone {
  padding: 48px 36px;
  text-align: center;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  margin: 12px;
}
.upload-zone:hover,
.upload-zone.drag-over {
  background: rgba(124,106,247,.06);
  border-color: var(--accent);
}
.upload-icon-wrap { margin-bottom: 20px; }
.upload-circle {
  width: 80px; height: 80px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124,106,247,.2), rgba(56,197,245,.1));
  border: 1px solid rgba(124,106,247,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent2);
  transition: transform var(--transition), box-shadow var(--transition);
}
.upload-zone:hover .upload-circle {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(124,106,247,.3);
}
.upload-primary {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.upload-secondary { font-size: .9rem; color: var(--text-muted); }
.upload-browse {
  background: none;
  border: none;
  color: var(--accent2);
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.upload-browse:hover { color: var(--accent); }
.upload-types {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.type-tag {
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid;
}
.img-tag { color: #a78bfa; border-color: rgba(167,139,250,.3); background: rgba(167,139,250,.08); }
.vid-tag { color: #f87171; border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.08); }
.aud-tag { color: #34d399; border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.08); }
.txt-tag { color: #60a5fa; border-color: rgba(96,165,250,.3); background: rgba(96,165,250,.08); }
.upload-limit {
  margin-top: 14px;
  font-size: .72rem;
  color: var(--text-faint);
}

/* ── File Preview ── */
.file-preview {
  padding: 20px 24px;
}
.file-info {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.file-icon { font-size: 2rem; }
.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.file-clear {
  background: rgba(244,82,114,.15);
  border: 1px solid rgba(244,82,114,.3);
  color: var(--red);
  border-radius: 8px;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
.file-clear:hover { background: rgba(244,82,114,.3); }

.analyse-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--accent), #5b4de0);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  letter-spacing: .3px;
}
.analyse-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124,106,247,.45);
}
.analyse-btn:active { transform: translateY(0); }
.analyse-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Status Card ── */
.status-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  text-align: center;
}
.status-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}
.status-spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(124,106,247,.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-label {
  font-size: 1.1rem;
  font-weight: 700;
}
.progress-track {
  background: var(--surface2);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.status-sub { font-size: .85rem; color: var(--text-muted); }

/* ── Result Card ── */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.verdict-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: var(--surface2);
}
.verdict-icon { font-size: 2.8rem; line-height: 1; }
.verdict-label {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -.5px;
}
.verdict-score {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Verdict colour states */
.verdict--manipulated .verdict-label { color: var(--red); }
.verdict--manipulated { border-color: rgba(244,82,114,.3) !important; background: rgba(244,82,114,.07) !important; }
.verdict--authentic   .verdict-label { color: var(--green); }
.verdict--authentic   { border-color: rgba(61,219,167,.3) !important; background: rgba(61,219,167,.07) !important; }
.verdict--uncertain   .verdict-label { color: var(--amber); }
.verdict--uncertain   { border-color: rgba(249,162,75,.3) !important; background: rgba(249,162,75,.07) !important; }

/* ── Score Meter ── */
.score-meter-wrap {
  margin-bottom: 32px;
}
.score-labels {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
}
.score-track {
  position: relative;
  background: linear-gradient(90deg, var(--green), var(--amber) 50%, var(--red));
  border-radius: 999px;
  height: 14px;
  overflow: visible;
}
.score-fill { display: none; }
.score-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
  transition: left 0.8s cubic-bezier(.4,0,.2,1);
  left: 0%;
}
.score-pct {
  text-align: center;
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Models Grid ── */
.models-section { margin-bottom: 28px; }
.models-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.models-grid {
  display: grid;
  gap: 10px;
}
.model-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.model-name {
  flex: 1;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-status {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.model-status.s-manipulated { background: rgba(244,82,114,.15); color: var(--red); }
.model-status.s-authentic   { background: rgba(61,219,167,.15); color: var(--green); }
.model-status.s-uncertain   { background: rgba(249,162,75,.15);  color: var(--amber); }
.model-status.s-unknown     { background: rgba(120,120,150,.15); color: var(--text-muted); }
.model-score {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 44px;
  text-align: right;
  flex-shrink: 0;
}
.model-bar-wrap {
  width: 80px;
  background: var(--surface);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.model-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transition: width 0.6s ease;
}

/* ── Re-analyse button ── */
.reanalyse-btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.reanalyse-btn:hover { background: var(--surface); color: var(--text); }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: .8rem;
  position: relative;
  z-index: 1;
}
.footer strong { color: var(--text-muted); }

/* ── Utility ── */
.hidden { display: none !important; }
