/* =============================
   URL-PhishShield AI — style.css
   ============================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-primary: #060b18;
  --bg-secondary: #0a1020;
  --bg-card: rgba(13, 25, 55, 0.7);
  --bg-card-hover: rgba(17, 32, 68, 0.85);

  --cyan: #00f5d4;
  --cyan-dim: rgba(0, 245, 212, 0.15);
  --cyan-glow: rgba(0, 245, 212, 0.4);
  --purple: #7b2fff;
  --purple-dim: rgba(123, 47, 255, 0.15);
  --purple-glow: rgba(123, 47, 255, 0.4);
  --blue: #1a6fff;
  --blue-dim: rgba(26, 111, 255, 0.15);

  --safe: #00c896;
  --safe-dim: rgba(0, 200, 150, 0.15);
  --safe-glow: rgba(0, 200, 150, 0.3);
  --warning: #ffb830;
  --warning-dim: rgba(255, 184, 48, 0.15);
  --warning-glow: rgba(255, 184, 48, 0.3);
  --danger: #ff2d55;
  --danger-dim: rgba(255, 45, 85, 0.15);
  --danger-glow: rgba(255, 45, 85, 0.35);

  --text-primary: #e8eeff;
  --text-secondary: #7b90c0;
  --text-muted: #4a5a80;

  --border: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(0, 245, 212, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-glow-cyan: 0 0 20px rgba(0, 245, 212, 0.25);
  --shadow-glow-purple: 0 0 20px rgba(123, 47, 255, 0.25);

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--purple) var(--bg-secondary);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
}

/* ---------- Background Canvas ---------- */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

#particle-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(6, 11, 24, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(6, 11, 24, 0.95);
  border-bottom-color: rgba(0, 245, 212, 0.1);
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-shield {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 8px rgba(0, 245, 212, 0.5));
  animation: shieldPulse 3s ease-in-out infinite;
}

@keyframes shieldPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(0, 245, 212, 0.5)); }
  50% { filter: drop-shadow(0 0 14px rgba(0, 245, 212, 0.8)); }
}

.logo-text { display: flex; align-items: center; gap: 6px; }

.logo-name {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #00f5d4, #7b2fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}

.logo-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  padding: 2px 7px;
  border-radius: 50px;
  color: white;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.btn-scan-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--purple), #5b1fff);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 8px;
}

.btn-scan-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(123, 47, 255, 0.5);
}

/* ---------- Hero Section ---------- */
.hero-section {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 2rem 60px;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content { flex: 1; max-width: 600px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.08);
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s ease forwards;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulseGlow 1.5s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,245,212,0.5); }
  50% { opacity: 0.8; box-shadow: 0 0 0 5px rgba(0,245,212,0); }
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 1.2rem;
  animation: fadeInUp 0.8s 0.1s ease forwards;
  opacity: 0;
}

.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s 0.2s ease forwards;
  opacity: 0;
}

.hero-subtitle strong { color: var(--cyan); }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  animation: fadeInUp 0.8s 0.3s ease forwards;
  opacity: 0;
}

.stat-card { text-align: center; }

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-unit {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

/* ---------- Hero Visual / Globe ---------- */
.hero-visual {
  flex: 0 0 380px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 1s 0.4s ease forwards;
  opacity: 0;
}

.threat-globe {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.globe-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: rotateRing 8s linear infinite;
}

.ring-1 {
  width: 100%; height: 100%;
  border-color: rgba(0, 245, 212, 0.15);
  animation-duration: 8s;
}

.ring-2 {
  width: 75%; height: 75%;
  border-color: rgba(123, 47, 255, 0.2);
  animation-duration: 12s;
  animation-direction: reverse;
}

.ring-3 {
  width: 50%; height: 50%;
  border-color: rgba(0, 245, 212, 0.1);
  border-style: dashed;
  animation-duration: 6s;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.globe-core {
  z-index: 2;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(123, 47, 255, 0.3), rgba(6, 11, 24, 0.8));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 245, 212, 0.3);
  box-shadow: 0 0 30px rgba(123, 47, 255, 0.3), inset 0 0 20px rgba(0, 245, 212, 0.1);
  animation: corePulse 2s ease-in-out infinite;
}

@keyframes corePulse {
  0%, 100% { box-shadow: 0 0 30px rgba(123, 47, 255, 0.3), inset 0 0 20px rgba(0, 245, 212, 0.1); }
  50% { box-shadow: 0 0 50px rgba(123, 47, 255, 0.5), inset 0 0 30px rgba(0, 245, 212, 0.2); }
}

.threat-tag {
  position: absolute;
  background: rgba(13, 25, 55, 0.9);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  animation: floatTag 4s ease-in-out infinite;
}

.tag-1 { top: 10%; left: -5%; border-color: rgba(255,45,85,0.4); color: #ff6b84; animation-delay: 0s; }
.tag-2 { top: 15%; right: -5%; border-color: rgba(255,184,48,0.4); color: var(--warning); animation-delay: 1s; }
.tag-3 { bottom: 25%; left: -10%; border-color: rgba(26,111,255,0.4); color: #6aabff; animation-delay: 2s; }
.tag-4 { bottom: 15%; right: -5%; border-color: rgba(123,47,255,0.4); color: #b47fff; animation-delay: 0.5s; }

@keyframes floatTag {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Section Shared Styles ---------- */
section {
  position: relative;
  z-index: 2;
  padding: 80px 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- Analyzer Section ---------- */
.analyzer-section {
  max-width: 860px;
  margin: 0 auto;
}

.analyzer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(24px);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.analyzer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  opacity: 0.6;
}

.analyzer-card:focus-within {
  border-color: rgba(0, 245, 212, 0.2);
  box-shadow: var(--shadow-card), 0 0 30px rgba(0, 245, 212, 0.08);
}

.input-wrapper {
  position: relative;
  margin-bottom: 0.75rem;
}

.input-icon {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--text-muted);
  z-index: 1;
  pointer-events: none;
}

.url-textarea {
  width: 100%;
  min-height: 160px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  padding: 1rem 3.5rem 1rem 3rem;
  resize: vertical;
  outline: none;
  transition: var(--transition);
}

.url-textarea:focus {
  border-color: rgba(0, 245, 212, 0.35);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.07);
}

.url-textarea::placeholder { color: var(--text-muted); line-height: 1.7; }

.input-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-clear, .btn-paste {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-clear:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-dim); }
.btn-paste:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }

.url-counter {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1.2rem;
  padding-left: 4px;
}

.analyzer-options {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.option-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.option-toggle input { display: none; }

.toggle-track {
  width: 38px;
  height: 20px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border);
  position: relative;
  transition: var(--transition);
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition);
}

.option-toggle input:checked + .toggle-track {
  background: linear-gradient(135deg, rgba(0,245,212,0.3), rgba(123,47,255,0.3));
  border-color: rgba(0, 245, 212, 0.4);
}

.option-toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
  background: var(--cyan);
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ---------- Analyze Button ---------- */
.btn-analyze {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #7b2fff 0%, #00c4b4 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.btn-analyze:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(123, 47, 255, 0.5), 0 0 40px rgba(0, 245, 212, 0.2);
}

.btn-analyze:active { transform: translateY(0); }

.btn-analyze.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-shimmer {
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
  animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

.btn-scan-icon { animation: scanBounce 2s ease-in-out infinite; }

@keyframes scanBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ---------- Loading ---------- */
.loading-container {
  text-align: center;
  padding: 2rem 0 1rem;
}

.loading-scanner {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.2rem;
  position: relative;
  border: 1px solid rgba(0,245,212,0.2);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
}

.scan-beam {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 8px var(--cyan);
  animation: scanMove 1.2s ease-in-out infinite;
}

@keyframes scanMove {
  0% { top: 0; }
  100% { top: 100%; }
}

.scan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
  height: 100%;
}

.scan-cell {
  border-radius: 2px;
  background: rgba(0,245,212,0.05);
  border: 1px solid rgba(0,245,212,0.08);
  animation: cellPulse 1.8s ease-in-out infinite;
}

.scan-cell:nth-child(odd) { animation-delay: 0.3s; }

@keyframes cellPulse {
  0%, 100% { background: rgba(0,245,212,0.05); }
  50% { background: rgba(0,245,212,0.15); }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.loading-progress {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  border-radius: 2px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px var(--cyan);
}

/* ---------- Results Section ---------- */
.results-section {
  max-width: 860px;
  margin: 0 auto;
  padding-top: 0;
}

.results-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.results-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-align: center;
  backdrop-filter: blur(10px);
}

.summary-count {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card.total .summary-count { color: var(--cyan); }
.summary-card.safe .summary-count { color: var(--safe); }
.summary-card.suspicious .summary-count { color: var(--warning); }
.summary-card.phishing .summary-count { color: var(--danger); }

/* ---------- Result Card ---------- */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  animation: slideInUp 0.4s ease forwards;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card.safe {
  border-color: rgba(0, 200, 150, 0.25);
}

.result-card.safe::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--safe), transparent);
}

.result-card.suspicious {
  border-color: rgba(255, 184, 48, 0.25);
}

.result-card.suspicious::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--warning), transparent);
}

.result-card.phishing {
  border-color: rgba(255, 45, 85, 0.3);
}

.result-card.phishing::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--danger), transparent);
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.result-url-block { flex: 1; min-width: 0; }

.result-url-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.result-url {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  word-break: break-all;
  background: rgba(0, 245, 212, 0.06);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 245, 212, 0.12);
}

.result-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-badge.safe {
  background: var(--safe-dim);
  color: var(--safe);
  border: 1px solid rgba(0, 200, 150, 0.3);
}

.status-badge.suspicious {
  background: var(--warning-dim);
  color: var(--warning);
  border: 1px solid rgba(255, 184, 48, 0.3);
}

.status-badge.phishing {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(255, 45, 85, 0.3);
}

.threat-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.threat-badge.low { background: rgba(0,200,150,0.15); color: var(--safe); }
.threat-badge.medium { background: rgba(255,184,48,0.15); color: var(--warning); }
.threat-badge.high { background: rgba(255,120,50,0.15); color: #ff7832; }
.threat-badge.critical { background: rgba(255,45,85,0.15); color: var(--danger); }

/* ---------- Risk Score Gauge ---------- */
.risk-gauge-section { margin-bottom: 1.5rem; }

.risk-gauge-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.risk-gauge-label span:first-child { color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.risk-score-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
}

.risk-gauge-track {
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.risk-gauge-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  position: relative;
}

.risk-gauge-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 6px; height: 100%;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
}

.risk-gauge-fill.safe { background: linear-gradient(90deg, #00c896, #00f5a0); box-shadow: 0 0 10px var(--safe-glow); }
.risk-gauge-fill.suspicious { background: linear-gradient(90deg, #ff8c00, #ffb830); box-shadow: 0 0 10px var(--warning-glow); }
.risk-gauge-fill.phishing { background: linear-gradient(90deg, #ff2d55, #ff6b84); box-shadow: 0 0 10px var(--danger-glow); }

/* ---------- Feature Grid ---------- */
.features-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.features-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.feature-item {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: var(--transition);
}

.feature-item:hover {
  border-color: rgba(0, 245, 212, 0.15);
  background: rgba(0, 245, 212, 0.03);
}

.feature-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}


.feature-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feature-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  word-break: break-all;
}

.feature-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
}

.feature-flag.danger { background: var(--danger-dim); color: var(--danger); }
.feature-flag.warning { background: var(--warning-dim); color: var(--warning); }
.feature-flag.safe { background: var(--safe-dim); color: var(--safe); }

/* ---------- Indicators & Recommendations ---------- */
.indicator-block, .recommendation-block {
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.indicator-block {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
}

.indicator-block h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.indicator-block p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.recommendation-block {
  border: 1px solid;
}

.recommendation-block.safe { background: rgba(0,200,150,0.07); border-color: rgba(0,200,150,0.2); }
.recommendation-block.suspicious { background: rgba(255,184,48,0.07); border-color: rgba(255,184,48,0.2); }
.recommendation-block.phishing { background: rgba(255,45,85,0.07); border-color: rgba(255,45,85,0.2); }

.recommendation-block h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.recommendation-block.safe h4 { color: var(--safe); }
.recommendation-block.suspicious h4 { color: var(--warning); }
.recommendation-block.phishing h4 { color: var(--danger); }

.recommendation-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.recommendation-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.recommendation-list li::before {
  content: '→';
  color: inherit;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ---------- Results Actions ---------- */
.results-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* ---------- How It Works ---------- */
.how-section {
  max-width: 1100px;
  margin: 0 auto;
  background: rgba(13, 25, 55, 0.3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  position: relative;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 245, 212, 0.2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 20px rgba(0,245,212,0.06);
}

.step-number {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  font-size: 2.5rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.04);
  line-height: 1;
}

.step-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--purple-dim), var(--cyan-dim));
  border: 1px solid rgba(0, 245, 212, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  margin-bottom: 1.2rem;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.feature-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
}

.feature-chip span { color: var(--cyan); font-size: 0.6rem; }

.feature-chip:hover {
  border-color: rgba(0, 245, 212, 0.3);
  color: var(--text-primary);
  background: rgba(0, 245, 212, 0.05);
}

/* ---------- History Section ---------- */
.history-section {
  max-width: 860px;
  margin: 0 auto;
}

.history-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  margin-bottom: 1.5rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 6px 14px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover { border-color: var(--danger); color: var(--danger); }

.history-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.history-item:hover {
  border-color: rgba(0, 245, 212, 0.15);
  background: var(--bg-card-hover);
}

.history-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.history-status-dot.safe { background: var(--safe); box-shadow: 0 0 6px var(--safe); }
.history-status-dot.suspicious { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.history-status-dot.phishing { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

.history-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-score {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
}

.history-score.safe { color: var(--safe); }
.history-score.suspicious { color: var(--warning); }
.history-score.phishing { color: var(--danger); }

.history-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-content { max-width: 600px; margin: 0 auto; }

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
  line-height: 1.65;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.footer-tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.2rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  max-width: 320px;
  animation: toastIn 0.3s ease forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-color: rgba(0,200,150,0.3); }
.toast.error { border-color: rgba(255,45,85,0.3); }
.toast.info { border-color: rgba(0,245,212,0.3); }

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Particles ---------- */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFly linear forwards;
}

@keyframes particleFly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 90px 1.5rem 60px;
    gap: 2.5rem;
  }
  .hero-stats { justify-content: center; }
  .hero-visual { flex: unset; }
  .steps-grid { grid-template-columns: 1fr; }
  .results-summary { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-links .nav-link { display: none; }
  .results-summary { grid-template-columns: repeat(2, 1fr); }
  .result-header { flex-direction: column; }
  .result-badges { align-items: flex-start; }
}

/* =============================
   GEMINI AI INTEGRATION STYLES
   ============================= */

/* --- Gemini API Panel --- */
.gemini-api-panel {
  margin-top: 1rem;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, rgba(123, 47, 255, 0.08), rgba(0, 245, 212, 0.05));
  border: 1px solid rgba(123, 47, 255, 0.3);
  border-radius: var(--radius-md);
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gemini-panel-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
}

.gemini-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--purple), #4e9fff);
  color: #fff;
  white-space: nowrap;
}

.gemini-key-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.gemini-key-input {
  flex: 1;
  padding: 0.65rem 1rem;
  background: rgba(6, 11, 24, 0.7);
  border: 1px solid rgba(123, 47, 255, 0.35);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.gemini-key-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123, 47, 255, 0.15);
}

.gemini-key-input::placeholder { color: var(--text-muted); }

.btn-key-toggle,
.btn-save-key {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-key-toggle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}
.btn-key-toggle:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }

.btn-save-key {
  background: linear-gradient(135deg, var(--purple), #4e9fff);
  color: #fff;
  white-space: nowrap;
}
.btn-save-key:hover { opacity: 0.88; transform: translateY(-1px); }

.gemini-key-hint {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.gemini-key-hint a { color: var(--cyan); text-decoration: none; }
.gemini-key-hint a:hover { text-decoration: underline; }

.gemini-status {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  min-height: 18px;
  transition: all 0.2s ease;
}
.gemini-status.success { color: var(--safe); }
.gemini-status.error   { color: var(--danger); }
.gemini-status.info    { color: var(--cyan); }

/* --- Gemini AI Result Block inside result cards --- */
.gemini-ai-block {
  margin-top: 1rem;
  padding: 1.1rem 1.3rem;
  background: linear-gradient(135deg, rgba(123,47,255,0.07), rgba(0,245,212,0.04));
  border: 1px solid rgba(123,47,255,0.25);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.gemini-ai-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}

.gemini-ai-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.gemini-ai-header .ai-chip {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--purple), #4e9fff);
  color: #fff;
}

.gemini-ai-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(123,47,255,0.3);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.gemini-ai-loading-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Skeleton loader */
.gemini-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.skeleton-line {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(123,47,255,0.12) 25%,
    rgba(123,47,255,0.25) 50%,
    rgba(123,47,255,0.12) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton-line:nth-child(2) { width: 85%; }
.skeleton-line:nth-child(3) { width: 70%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Gemini AI content */
.gemini-ai-content {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.gemini-verdict {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.7rem;
}
.gemini-verdict.safe     { background: var(--safe-dim); color: var(--safe); border: 1px solid rgba(0,200,150,0.3); }
.gemini-verdict.warning  { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(255,184,48,0.3); }
.gemini-verdict.danger   { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(255,45,85,0.3); }

.gemini-ai-error {
  font-size: 0.78rem;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* confidence bar */
.gemini-confidence-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.6rem;
}
.gemini-confidence-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.gemini-confidence-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.gemini-confidence-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition: width 0.8s ease;
}
.gemini-confidence-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan);
  min-width: 36px;
  text-align: right;
}
