/* DeepFakeShield AI - Premium Design System */

:root {
  /* Core Palette */
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.4);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Backgrounds */
  --bg-dark: #030014;
  --bg-panel: rgba(255, 255, 255, 0.03);
  --bg-panel-hover: rgba(255, 255, 255, 0.06);
  --bg-panel-active: rgba(255, 255, 255, 0.09);

  /* Glassmorphism */
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
  --backdrop-blur: blur(20px);

  /* Typography */
  --font-main: "Inter", sans-serif;
  --font-display: "Outfit", sans-serif;
  --text-main: #ffffff;
  --text-muted: #94a3b8;

  /* Animation */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Animated Mesh Background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(
      circle at 15% 50%,
      rgba(99, 102, 241, 0.15) 0%,
      transparent 25%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(6, 182, 212, 0.15) 0%,
      transparent 25%
    );
  z-index: -1;
  animation: bgPulse 10s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Typography */
h1,
h2,
h3,
h4,
.brand-text {
  font-family: var(--font-display);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem; /* Reduced padding */
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(3, 0, 20, 0.7); /* Slightly darker */
  backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--glass-border);
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-ai {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* User Menu & Dropdown */
.user-menu {
  position: relative;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  transition: all 0.2s ease;
}

.user-profile:hover {
  background: var(--bg-panel-hover);
  border-color: var(--glass-highlight);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-name {
  font-weight: 500;
  color: var(--text-main);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  width: 180px;
  background: rgba(13, 15, 30, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: var(--glass-shadow);
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-menu.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--bg-panel-hover);
  color: var(--text-main);
}

.dropdown-item.text-error {
  color: var(--error);
}

.dropdown-item.text-error:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-spring);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-ghost {
  background: var(--bg-panel);
  border-color: var(--glass-border);
  color: var(--text-main);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: var(--bg-panel-hover);
  border-color: var(--glass-highlight);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-icon {
  padding: 0.5rem;
  border-radius: 50%;
}

/* Glass Cards Generic */
.glass-card,
.feature-card,
.analysis-preview,
.upload-zone,
.report-item,
.setting-item {
  background: var(--bg-panel);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.glass-card:hover {
  border-color: var(--glass-highlight);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem; /* More top padding for fixed nav */
  max-width: 1400px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  padding-right: 4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 4.5rem; /* Larger title */
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 4rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-main);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--glass-border);
}

/* How It Works Section */
.how-it-works {
  padding: 6rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  position: relative;
}

/* Connecting Line */
.process-steps::before {
  content: "";
  position: absolute;
  top: 60px; /* Align with icon center */
  left: 15%; /* Start after first icon */
  right: 15%; /* End before last icon */
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  opacity: 0.3;
  z-index: 0;
}

.step-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-icon-wrapper {
  width: 120px;
  height: 120px;
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 3rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--backdrop-blur);
  transition: transform 0.3s var(--ease-spring);
}

.step-card:hover .step-icon-wrapper {
  transform: scale(1.1);
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.step-number {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  position: absolute;
  top: 0;
  right: calc(50% - 60px); /* Position on top-right of the circle */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.step-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 300px;
}

/* Upload Zone */
.upload-container {
  padding: 8rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.page-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.page-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.upload-zone {
  border: 2px dashed var(--glass-border);
  padding: 5rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
  cursor: pointer;
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.01) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-5px);
}

.upload-icon {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.upload-formats {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.format-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Analysis Options */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.option-card {
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.option-card:hover {
  background: var(--bg-panel-hover);
  border-color: var(--primary-glow);
}

.option-card.selected {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
}

.option-checkbox {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: transparent;
}

.option-checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.option-checkbox:checked::after {
  content: "✓";
  color: white;
  font-size: 0.9rem;
  font-weight: 800;
}

.option-label {
  font-weight: 600;
  color: var(--text-main);
}

/* Reports List */
.reports-container {
  padding: 8rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.report-item:active {
  transform: scale(0.98);
}

.report-item:hover {
  transform: translateY(-2px);
  background: var(--bg-panel-hover);
  border-color: var(--glass-highlight);
}

.report-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.report-thumbnail {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.report-meta h4 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.report-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.report-status {
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.report-status.authentic {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.report-status.fake {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.empty-state {
  text-align: center;
  padding: 6rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

/* Settings Page */
.settings-container {
  padding: 8rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.settings-grid {
  display: grid;
  gap: 2rem;
}

.settings-section h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.setting-info h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.setting-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
  display: inline-block;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  display: block;
  width: 50px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: 0.3s;
  border: 1px solid var(--glass-border);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
  border-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Select Dropdown */
.setting-select {
  background: var(--bg-dark);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 2rem 0.5rem 1rem;
  border-radius: 8px;
  font-family: var(--font-main);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1em;
}

/* Auth Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: rgba(13, 15, 30, 0.85); /* Darker backdrop for modal */
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 24px;
  width: 90%;
  max-width: 420px;
  padding: 2.5rem;
  position: relative;
  z-index: 1010;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-main);
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  position: relative;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.auth-tab.active {
  background: var(--bg-panel-hover);
  color: var(--text-main);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Auth Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.btn-full {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
  font-size: 1rem;
}

/* Results Grid from previous CSS preserved/enhanced */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Timeline, Processing from previous CSS preserved needs only minor tweaks if any */
.timeline-section,
.processing-container {
  margin-top: 2rem;
}

.processing-container {
  text-align: center;
  padding: 8rem 2rem;
}

/* Processing Animations */
.processing-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
}

.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  animation: pulse 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.delay-1 {
  animation-delay: 1s;
}
.delay-2 {
  animation-delay: 2s;
}

.processing-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  z-index: 10;
}

@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.progress-container {
  max-width: 500px;
  margin: 2rem auto;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.5s ease;
}

.processing-stages {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stage {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
  transition: all 0.3s;
}

.stage.active {
  opacity: 1;
  color: var(--accent);
}

.stage.completed {
  opacity: 1;
  color: var(--success);
}

/* NEW: Detailed Stage Cards */
.processing-stages-detailed {
  max-width: 600px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stage-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  text-align: left;
  transition: all 0.3s ease;
  opacity: 0.4;
}

.stage-card.active {
  opacity: 1;
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

.stage-card.active .stage-spinner {
  display: block;
}

.stage-card.active .stage-check {
  display: none;
}

.stage-card.completed {
  opacity: 1;
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.stage-card.completed .stage-spinner {
  display: none;
}

.stage-card.completed .stage-check {
  display: flex;
  color: var(--success);
}

.stage-card-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stage-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(6, 182, 212, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.stage-check {
  font-size: 1.25rem;
  display: none;
}

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

.stage-card-content {
  flex: 1;
  min-width: 0;
}

.stage-card-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.stage-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.stage-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

/* Activity Log */
.activity-log {
  max-width: 600px;
  margin: 2rem auto 0;
  padding: 1rem 1.25rem;
  text-align: left;
  max-height: 180px;
  overflow: hidden;
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.activity-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.activity-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 140px;
  overflow-y: auto;
}

.activity-content::-webkit-scrollbar {
  width: 4px;
}

.activity-content::-webkit-scrollbar-track {
  background: transparent;
}

.activity-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.activity-item {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  padding: 0.3rem 0;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.activity-time {
  color: var(--accent);
  font-family: monospace;
  min-width: 45px;
}

.activity-text {
  color: var(--text-muted);
}

/* Page Transitions */
.page {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.page.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .process-steps::before {
    display: none;
  }

  .navbar {
    padding: 1rem;
  }

  .nav-links {
    display: none;
  }
}

/* Reports Tabs - Premium Segmented Control */
.reports-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.5rem;
  border-radius: 16px;
  width: fit-content;
  border: 1px solid var(--glass-border);
}

.report-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.report-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.report-tab.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
  font-weight: 600;
}

/* Dashboard Analytics */
.dashboard-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.dashboard-view.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  background: linear-gradient(
    145deg,
    rgba(30, 41, 59, 0.7),
    rgba(15, 23, 42, 0.6)
  );
  border-color: rgba(255, 255, 255, 0.1);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0.5;
}

.stat-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-display);
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(6, 182, 212, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
  }
  100% {
    box-shadow: 0 0 5px rgba(6, 182, 212, 0.2);
  }
}

.stat-card:hover .stat-value {
  animation: glow 2s infinite;
}

.stat-trend {
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-trend.up {
  color: var(--error);
} /* More fakes is bad/up */
.stat-trend.down {
  color: var(--success);
}

/* Analytics Charts Area */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.chart-card {
  padding: 1.5rem;
  min-height: 300px;
}

.chart-header {
  margin-bottom: 1.5rem;
}

/* Simple Bar Chart Visualization */
.simple-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 200px;
  justify-content: center;
}

.chart-bar-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chart-label {
  width: 60px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.chart-track {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.chart-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2));
  border-radius: 6px;
}

/* Recent Threats List */
.recent-threats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.threat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.1);
}

.threat-icon {
  color: var(--error);
}

.threat-info h4 {
  font-size: 0.9rem;
  color: var(--text-main);
}

.threat-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

/* --- NEW AUTH UI STYLES --- */

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
  pointer-events: none;
  z-index: 2;
}

.input-wrapper input {
  padding-left: 3rem; /* Space for icon */
  padding-right: 1rem;
}

/* Specific padding for password to accommodate toggle */
.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
  /* When text is toggled */
  padding-right: 3rem;
}

.input-wrapper:focus-within .input-icon {
  color: var(--primary);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.2s;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--text-main);
}

/* --- TOAST NOTIFICATIONS --- */

#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none; /* Let clicks pass through container area */
}

.toast {
  background: rgba(13, 15, 30, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  min-width: 300px;
  pointer-events: auto;
  animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}

.toast.hiding {
  animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-icon {
  font-size: 1.25rem;
}

.toast-message {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
}

.toast.success {
  border-left: 4px solid var(--success);
}
.toast.success .toast-icon {
  color: var(--success);
}

.toast.error {
  border-left: 4px solid var(--error);
}
.toast.error .toast-icon {
  color: var(--error);
}

.toast.info {
  border-left: 4px solid var(--accent);
}
.toast.info .toast-icon {
  color: var(--accent);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  to {
    opacity: 0;
    transform: translateX(20px) scale(0.9);
  }
}

@media (max-width: 480px) {
  #toast-container {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
  }

  .toast {
    width: 100%;
    min-width: unset;
  }
}

/* --- EVIDENCE TIMELINE STYLES --- */

.timeline-section {
  margin-top: 3rem;
}

.timeline-section h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--text-main);
}

.timeline-card {
  padding: 2rem;
  margin-top: 1rem;
}

.timeline-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.timeline-empty span {
  display: block;
  font-size: 2.5rem;
  color: var(--success);
  margin-bottom: 0.5rem;
}

.timeline-empty p {
  margin: 0;
}

.timeline-track {
  position: relative;
  height: 40px;
  margin-bottom: 0.5rem;
}

.timeline-baseline {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  transform: translateY(-50%);
}

.timeline-marker {
  position: absolute;
  height: 24px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.85;
}

.timeline-marker:hover {
  opacity: 1;
  transform: translateY(-50%) scaleY(1.2);
  z-index: 10;
}

/* Color coding for segment types */
.timeline-marker.video {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.timeline-marker.audio {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.timeline-marker.lipsync {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.timeline-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-dot.video {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.legend-dot.audio {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.legend-dot.lipsync {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Flagged Segments List */
.timeline-segments-list {
  margin-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 1.5rem;
}

.timeline-segments-list h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.segment-item {
  display: grid;
  grid-template-columns: 100px 80px 1fr 60px;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.segment-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.segment-item.video {
  border-left-color: #6366f1;
}

.segment-item.audio {
  border-left-color: #8b5cf6;
}

.segment-item.lipsync {
  border-left-color: #f59e0b;
}

.segment-time {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  font-family: monospace;
}

.segment-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  text-align: center;
}

.segment-item.video .segment-type {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}

.segment-item.audio .segment-type {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.segment-item.lipsync .segment-type {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.segment-reason {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.segment-score {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--error);
  text-align: right;
}

@media (max-width: 768px) {
  .segment-item {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .segment-reason {
    grid-column: 1 / -1;
  }
}

/* ========== Results Page - Verdict Card ========== */
.results-summary-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .results-summary-wrapper {
    grid-template-columns: 1fr;
  }
}

.verdict-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  margin-bottom: 0; /* Removed margin-bottom as wrapper handles gap */
  backdrop-filter: var(--backdrop-blur);
  height: 100%; /* Match height with neighbor if needed */
}

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

.verdict-icon.authentic {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 2px solid var(--success);
}

.verdict-icon.fake {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border: 2px solid var(--error);
}

.verdict-content {
  flex: 1;
}

.verdict-label {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.verdict-label.authentic {
  color: var(--success);
}
.verdict-label.fake {
  color: var(--error);
}

.verdict-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Score Circle - Fixed Size */
.verdict-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.score-circle {
  width: 100px;
  height: 100px;
  position: relative;
}

.score-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-circle .score-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 8;
}

.score-circle .score-fill {
  fill: none;
  stroke: var(--success);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1s ease;
}

.score-circle .score-fill.danger {
  stroke: var(--error);
}

.score-circle .score-fill.warning {
  stroke: var(--warning);
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  font-weight: 700;
}

.score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Media Preview Section */
.media-preview-section {
  margin-bottom: 0;
}

.media-preview-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.media-preview-container {
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 350px;
  overflow: hidden;
}

.media-preview-container img,
.media-preview-container video {
  max-width: 100%;
  max-height: 320px;
  border-radius: 12px;
  object-fit: contain;
}

.media-preview-container video {
  background: #000;
}

/* Modality Cards */
.modality-card {
  padding: 1.5rem;
}

.modality-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.modality-icon {
  font-size: 1.5rem;
}

.modality-header h4 {
  font-size: 1rem;
  margin: 0;
}

.modality-score {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.modality-score .score-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.modality-score .score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.modality-score .score-fill.safe {
  background: var(--success);
}

.modality-score .score-fill.warning {
  background: var(--warning);
}

.modality-score .score-fill.danger {
  background: var(--error);
}

.modality-score .score-text {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

.modality-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  margin-bottom: 1rem;
}

/* Confidence Badge */
.confidence-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  margin-left: auto;
}

/* Detail Stats */
.detail-stats {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.8rem;
}

.stat-row span:first-child {
  color: var(--text-muted);
}

.stat-row span:last-child {
  font-weight: 500;
  color: var(--text-main);
}

/* Artifacts Panel */
.artifacts-panel {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.artifacts-panel h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
}

.artifacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.artifact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  font-size: 0.85rem;
}

.artifact-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.artifact-indicator.safe {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.artifact-indicator.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.artifact-indicator.danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

/* Technical Summary */
.technical-summary {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.technical-summary h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tech-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.tech-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Timeline Section Enhancement */
.timeline-section {
  margin-bottom: 2rem;
}

.timeline-section h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}
