/* PhishNet Styles - Blue/Black Theme */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500;600&display=swap');

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

/* CSS Variables */
:root {
  /* NEW BLUE/BLACK THEME COLORS */
  --black: #000000;
  --bg-dark: #0b0b0b;
  --primary-blue: #0B63D9;
  --accent-cyan: #00B7D9;
  --muted: #6b7280;
  --card-bg: #0f0f10;
  --glow: rgba(11,99,217,0.32);
  
  /* Threat Colors - UNCHANGED */
  --color-safe: #00FF88;
  --color-malicious: #FF4D4D;
  --color-suspicious: #FFC107;
  --color-neutral: #E6E6E6;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0B0B0B 0%, #001a33 50%, #0B63D9 100%);
  --gradient-header: linear-gradient(90deg, #0B0B0B 0%, #001a33 100%);
  
  /* Dark Theme */
  --bg-primary: #0B0B0B;
  --bg-secondary: #0f0f10;
  --text-primary: #FFFFFF;
  --text-secondary: #0B63D9;
  --text-muted: #999999;
  --border-color: #1a1a1a;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Animations */
  --transition-speed: 0.3s;
  --animation-duration: 0.6s;

  /* UNIFIED BORDER SYSTEM VARIABLES */
  --border-thin: 1px solid rgba(255, 255, 255, 0.1);
  --border-semi: 1px solid rgba(255, 255, 255, 0.08);
  --glow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--gradient-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  padding-top: 76px;
}

/* Skip to Content Link (Accessibility) */
.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--primary-blue);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  color: white;
  font-family: 'Inter', sans-serif;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--accent-cyan);
}

/* SHINING BORDER UTILITY CLASS */
.shiny-border {
  background: var(--card-bg);
  border-radius: 12px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.04);
  overflow: hidden;
}

.shiny-border.glow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  box-shadow: 0 10px 30px var(--glow);
  border-radius: inherit;
  opacity: 0.9;
  transition: opacity .35s;
  pointer-events: none;
}

.shiny-border:hover.glow::after {
  opacity: 1;
  transform: scale(1.02);
}

/* Header */
header {
  background: transparent;
  border-bottom: none;
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

header.scrolled {
  padding: 0.6rem 2rem;
}

header.scrolled .header-container {
  background: rgba(8,8,12,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 1px 24px rgba(0,0,0,0.3);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "logo nav actions";
  align-items: center;
  gap: 2rem;
  min-height: 48px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* BRAND LOGO */
.brand-logo {
  grid-area: logo;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo .logo-icon {
  display: none;
}

.brand-logo .logo-text {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 1px;
  font-family: 'Orbitron', sans-serif;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.brand-logo:hover .logo-text {
  color: rgba(255,255,255,0.8);
}


.logo {
  grid-area: logo;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: 'Orbitron', sans-serif;
}

.logo svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: none; /* Hide shield icon */
}

nav {
  grid-area: nav;
  justify-self: center;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
  justify-content: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.45);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 450;
  display: flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.04);
}
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  min-width: 180px;
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.96);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  list-style: none;
  margin-top: 0.5rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.03) inset;
  z-index: 1001;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 0.7rem;
  color: var(--text-muted);
  transition: all 0.15s ease;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: end;
  flex-shrink: 0;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.logged-in .auth-buttons {
  display: none;
}

.user-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: none;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  z-index: 1001;
  aspect-ratio: 1 / 1;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  image-rendering: auto;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
  .user-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
}

.user-avatar:hover {
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.15);
}

.logged-in .user-avatar {
  display: flex;
  opacity: 1;
  visibility: visible;
}

/* Profile Menu */
.profile-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  min-width: 280px;
  padding: 0.5rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.03) inset;
  z-index: 1001;
  transform-origin: top right;
  animation: pm-in 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.profile-menu-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.6rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 0.35rem;
}

/* Exit animation state */
.profile-menu.closing {
  animation: pm-out 150ms cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

@keyframes pm-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pm-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
}

/* Dropdown top user info */
.profile-menu-header .profile-menu-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  border: none;
  box-shadow: 0 0 0 2px rgba(11,99,217,0.25);
}

.profile-menu-header .profile-menu-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.profile-menu-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.profile-menu-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Results card styles */
.results-card {
  margin: var(--spacing-lg) auto;
  max-width: 1100px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-soft);
  border: var(--border-thin);
}

.results-card .card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.results-card .card-title {
  margin: 0;
  font-size: 1.25rem;
  color: white;
}

.download-scan-btn {
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-speed), background var(--transition-speed);
}

.download-scan-btn:hover { transform: translateY(-2px); background: #0952b8; }

.status-badge { padding: 1rem; border-radius: var(--radius-md); margin: 1rem 0; }
.status-badge-row { display:flex; align-items:center; gap:1rem; }
.status-icon { width:56px; height:56px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.status-icon-symbol { font-size:1.5rem; font-weight:700; display:flex; align-items:center; justify-content:center; line-height:1; }

/* Status variants for icon background and symbol color */
.status-icon.safe { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.18); }
.status-icon.safe .status-icon-symbol { color: #10B981 !important; }
.status-icon.suspicious { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.18); }
.status-icon.suspicious .status-icon-symbol { color: #F59E0B !important; }
.status-icon.malicious { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.18); }
.status-icon.malicious .status-icon-symbol { color: #EF4444 !important; }
.status-label { font-size:0.825rem; color: var(--text-muted); margin:0 0 0.25rem 0; }
.status-title { font-size:1.25rem; font-weight:800; margin:0; }
.status-sub { font-size:0.9rem; color: var(--text-muted); margin-top:6px; }

.results-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap:1rem; margin: 1rem 0; }
.info-item { background: transparent; padding: 0.5rem; border-radius: 6px; }
.info-label { font-size:0.8rem; color: var(--text-muted); margin-bottom:0.25rem; }
.info-value { font-weight:700; color: white; }

.section { margin-top: 1rem; }
.section-title { font-size:1rem; margin:0 0 0.75rem 0; }
.indicators-list { list-style:none; padding:0; margin:0; display:grid; grid-template-columns: 1fr; gap:0.5rem; }
.indicator-item { padding: 0.75rem; background: rgba(255,255,255,0.02); border-left: 4px solid #0B63D9; border-radius: var(--radius-sm); color: white; }
.indicator-item.safe { border-left-color: #10B981; background: rgba(16,185,129,0.04); }
.indicator-item.threat { border-left-color: #EF4444; background: rgba(239,68,68,0.04); }
.indicator-item.warning { border-left-color: #F59E0B; background: rgba(245,158,11,0.04); }

/* Icon inside indicator items */
.indicator-item { display:flex; align-items:center; }
.indicator-icon { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; margin-right:0.75rem; flex-shrink:0; font-weight:700; line-height:1; }
.indicator-item.safe .indicator-icon { background: rgba(16,185,129,0.12); color: #10B981 !important; }
.indicator-item.threat .indicator-icon { background: rgba(239,68,68,0.12); color: #EF4444 !important; }
.indicator-item.warning .indicator-icon { background: rgba(245,158,11,0.12); color: #F59E0B !important; }
.issues-list { padding-left: 1rem; margin:0; }
.issue-item { margin-bottom: 0.5rem; color: white; }

.summary-box { margin-top: 1rem; padding: 1rem; background: rgba(255,255,255,0.02); border-left: 4px solid var(--primary-blue); border-radius: var(--radius-md); }
.summary-text { color: white; line-height: 1.6; }

.profile-menu-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  image-rendering: auto;
}

.profile-menu-info {
  flex: 1;
  min-width: 0;
}

.profile-menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.04);
  margin: 0.25rem 0.4rem;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.15s ease;
  width: 100%;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.profile-menu-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.profile-menu-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.profile-menu-item:hover svg {
  opacity: 0.85;
}

.profile-menu-item--danger:hover {
  color: #FF4D4D;
}
.profile-menu-item--danger:hover svg {
  opacity: 0.85;
  color: #FF4D4D;
}

/* Buttons */
.btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 0 10px rgba(11, 99, 217, 0.3);
}

.btn-primary:hover {
  background: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(11, 99, 217, 0.6);
  transform: translateY(-2px);
  color: white;
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: white;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

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

.btn-lg {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

.btn-cta {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(11, 99, 217, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(11, 99, 217, 0.6);
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* Section */
section {
  padding: var(--spacing-xl) 0;
}

/* Hero Section */
.hero {
  padding: 48px 24px;
  text-align: center;
}

.hero-heading {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 6vw, 64px);
  color: #ffffff;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
}
@keyframes shine {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}
.hero h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(48px, 5vw, 56px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Card - SHINING BORDER APPLIED */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  border: 1px solid rgba(255,255,255,0.04);
  overflow: visible;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  box-shadow: 0 10px 30px var(--glow);
  border-radius: inherit;
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}

.card:hover::after {
  opacity: 0.9;
}

.card-header {
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin: 0;
  font-family: 'Inter', sans-serif;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-safe {
  background: rgba(0, 255, 136, 0.1);
  color: var(--color-safe);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.badge-malicious {
  background: rgba(255, 77, 77, 0.1);
  color: var(--color-malicious);
  border: 1px solid rgba(255, 77, 77, 0.3);
}

.badge-suspicious {
  background: rgba(255, 193, 7, 0.1);
  color: var(--color-suspicious);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Category Links */
#category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-speed);
  cursor: pointer;
  border-left: 3px solid transparent;
  color: #FFFFFF;
  text-decoration: none;
}

#category-list a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--primary-blue);
  color: #FFFFFF;
}

#category-list a.active {
  background: rgba(11, 99, 217, 0.2);
  border-left-color: var(--primary-blue);
  color: var(--accent-cyan);
  font-weight: 500;
}

/* Forms - SHINING BORDER APPLIED */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: white;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  font-size: 0.9375rem;
  transition: all var(--transition-speed);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(11, 99, 217, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Dashboard Layout - RESPONSIVE */
.dashboard {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1099px) {
  .dashboard {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
  }
}

@media (max-width: 699px) {
  .dashboard {
    padding: 0 12px;
  }
  
  .card {
    width: 100%;
  }
  
  input,
  button {
    width: 100%;
  }
}

/* Responsive Table - Full Solution */
/* Recent Scans Table - REMOVED FOR RECONSTRUCTION */
/* All table-related CSS styles commented out */

/* NEW Scan Results Table Implementation */
.table-container {
  width: 100%;
  max-height: calc(7 * 50px + 50px);
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-gutter: stable both-edges;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(11, 99, 217, 0.3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Scrollbar Styling for Webkit Browsers */
.table-container::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb {
  background: rgba(11, 99, 217, 0.8);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #0B63D9;
}

/* Firefox Scrollbar */
.table-container {
  scrollbar-color: rgba(11, 99, 217, 0.8) rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
}

#scan-results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

#scan-results-table th,
#scan-results-table td {
  white-space: nowrap;
  padding: 12px 16px;
  line-height: 1.4;
}

#scan-results-table td:nth-child(1) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#scan-results-table td:nth-child(5) {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#scan-results-table th,
#scan-results-table td {
  border: none;
  text-align: left;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 48px;
  vertical-align: middle;
}

#scan-results-table thead {
  background: #003d7a;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid rgba(11, 99, 217, 0.5);
}

#scan-results-table th {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  color: #FFFFFF;
}

#scan-results-table tbody tr {
  transition: background 0.2s ease;
}

#scan-results-table tbody tr:hover {
  background: rgba(11, 99, 217, 0.12);
}

#scan-results-table td {
  font-size: 0.95rem;
  color: #FFFFFF;
}

/* Result Status Colors */
#scan-results-table .result-safe {
  color: #00FF88;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

#scan-results-table .result-suspicious {
  color: #FFC107;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

#scan-results-table .result-malicious {
  color: #FF4D4D;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 77, 77, 0.3);
}

/* Action Buttons */
.action-btn {
  cursor: pointer;
  padding: 6px 12px;
  margin-right: 6px;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-btn {
  background-color: #0B63D9;
  border: 1px solid #0B63D9;
}

.view-btn:hover {
  background-color: #0952b8;
  box-shadow: 0 0 15px rgba(11, 99, 217, 0.8);
  transform: scale(1.05);
}

.delete-btn {
  background-color: rgba(239, 68, 68, 0.8);
  border: 1px solid #ef4444;
}

.delete-btn:hover {
  background-color: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  transform: scale(1.05);
}

.action-btn:active {
  transform: scale(0.98);
}

/* Delete confirmation modal */
.delete-confirm-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(11, 99, 217, 0.22), transparent 45%), rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.delete-confirm-modal {
  background: linear-gradient(160deg, #0f172a 0%, #0b1224 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 22px 22px 18px;
  width: min(460px, 92%);
  color: #ffffff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03);
  animation: modal-pop 0.18s ease-out;
}

.delete-confirm-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.delete-confirm-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25);
}

.delete-confirm-title {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.delete-confirm-subtext {
  margin: 2px 0 0;
  color: #cbd5e1;
  font-size: 0.93rem;
}

.delete-confirm-body {
  margin: 8px 0 6px;
}

.delete-confirm-message {
  margin: 0 0 6px;
  line-height: 1.55;
  color: #e2e8f0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.delete-confirm-note {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.delete-confirm-highlight {
  color: #ffffff;
  font-weight: 800;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: rgba(239, 68, 68, 0.14);
  padding: 6px 8px;
  border-radius: 8px;
}

.delete-confirm-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-btn {
  padding: 11px 14px;
  border-radius: 10px;
  border: none;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, filter 0.2s ease;
  font-size: 0.95rem;
}

.modal-btn.secondary {
  background: #1f2937;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.modal-btn.secondary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.modal-btn.danger {
  background: linear-gradient(135deg, #ef4444, #f97373);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.35);
}

.modal-btn.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.45);
  filter: brightness(1.02);
}

@keyframes modal-pop {
  from { transform: translateY(6px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Vertical scrolling for recent scans sidebar on reports page */
.recent-scans-container {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

.recent-scans-container::-webkit-scrollbar {
  width: 6px;
}

.recent-scans-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.recent-scans-container::-webkit-scrollbar-thumb {
  background: rgba(11, 99, 217, 0.4);
  border-radius: 10px;
}

.recent-scans-container::-webkit-scrollbar-thumb:hover {
  background: rgba(11, 99, 217, 0.7);
}

/* Alert Card - SHINING BORDER WITH BLUE ACCENT */
.alert-card {
  display: flex;
  gap: 16px;
  padding: 18px;
  border-radius: 10px;
  min-height: unset;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 1rem;
}

.alert-card::before {
  content: "";
  width: 6px;
  border-radius: 6px;
  background: var(--primary-blue);
  flex-shrink: 0;
}

/* Footer */
footer {
  background: transparent;
  border-top: none;
  margin-top: auto;
  padding: 3rem 2rem 1.5rem;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 0;
  padding: 2.5rem 2.5rem 2rem;
  background: var(--gradient-header);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
/* Subtle top accent gradient — matches navbar bottom glow */
.footer-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

/* ── Brand column ── */
.footer-brand {
  border-left: none !important;
  padding-left: 0 !important;
}

.footer-brand-title {
  font-family: 'Orbitron', 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.75rem 0;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan, #00B7D9));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 1.25rem 0;
  max-width: 320px;
}

.footer-cta-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: var(--primary-blue);
  background: transparent;
  border: 1px solid rgba(11, 99, 217, 0.35);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-speed);
  text-decoration: none;
  white-space: nowrap;
}
.footer-cta-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.footer-cta-btn:hover {
  background: var(--primary-blue);
  color: #ffffff;
  border-color: var(--primary-blue);
  box-shadow: 0 0 16px var(--glow);
  transform: translateY(-1px);
}

/* ── Link columns ── */
.footer-section {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  padding-left: 2rem;
}

.footer-section:first-child {
  border-left: none;
  padding-left: 0;
}

.footer-section h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  color: white;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.55rem;
}

.footer-section a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition-speed);
  text-decoration: none;
}

.footer-section a:hover {
  color: white;
}

/* ── Social icons ── */
.footer-socials {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-speed);
}

.footer-socials a:hover {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(11, 99, 217, 0.4);
  transform: translateY(-2px);
}

.footer-socials svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ── Copyright bar ── */
.footer-copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding-top: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  letter-spacing: 0.02em;
}

.footer-copyright-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  margin-bottom: 1rem;
}

/* Legacy support for pages still using old footer-quick-check */
.footer-quick-check {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-quick-check input {
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: white;
  font-size: 0.875rem;
}

.footer-quick-check .btn-primary {
  max-width: 100%;
  width: 100%;
  padding: 0.625rem 1rem;
}

/* Animations */
.animate-fade-in {
  animation: fadeIn var(--animation-duration) ease-out;
}

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

/* Auth Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 450px;
  width: 100%;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  display: inline-block;
  margin-bottom: 1.5rem;
}

/* Settings */
.settings-section {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.settings-section h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-family: 'Inter', sans-serif;
}

.settings-section h2 svg {
  color: var(--primary-blue);
}

.avatar-upload {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
}

.avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.5rem;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  image-rendering: auto; /* Natural rendering */
  box-shadow: 0 4px 12px rgba(11, 99, 217, 0.2);
}

@media (max-width: 768px) {
  .avatar-preview {
    width: 100px;
    height: 100px;
    font-size: 1.25rem;
  }
}

@media (max-width: 640px) {
  .avatar-upload {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
  }
  
  .avatar-preview {
    width: 80px;
    height: 80px;
    font-size: 1rem;
    margin: 0 auto;
  }

  .avatar-controls {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 280px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.3rem !important;
    margin-top: 0 !important;
    margin: 0 auto !important;
  }

  .avatar-buttons-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.2rem !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 250px !important;
    margin: 0 auto !important;
  }

  .avatar-buttons-group .btn {
    flex: 1 !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
    white-space: nowrap !important;
    padding: 0.35rem 0.5rem !important;
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
  }

  .button-separator {
    display: none !important;
  }

  .avatar-status {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    font-size: 0.7rem !important;
    margin-top: 0.2rem !important;
    margin: 0 auto !important;
  }

  .avatar-status.active {
    display: flex !important;
  }
}

.avatar-controls {
  position: absolute;
  top: 60px; /* Vertically centered on 120px avatar */
  left: 135px; /* Slightly to the right of avatar */
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.avatar-buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.button-separator {
  color: var(--text-muted);
  font-weight: 500;
  user-select: none;
}

.btn-remove {
  color: var(--color-malicious) !important;
}

.btn-remove:hover {
  background: rgba(255, 77, 77, 0.1) !important;
  color: var(--color-malicious) !important;
}

.avatar-status {
  display: none;
  color: var(--accent-cyan);
  font-size: 0.875rem;
  font-weight: 500;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.avatar-status.active {
  display: flex;
}

.avatar-fit-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fit-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

.avatar-fit-control .form-select {
  max-width: 280px;
}

#avatarUploadStatus {
  display: none;
  color: var(--accent-cyan);
  font-size: 0.875rem;
  font-weight: 500;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

#avatarUploadStatus.active {
  display: flex;
}

.spinner-icon {
  width: 1rem;
  height: 1rem;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-secondary);
  transition: .4s;
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

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

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

/* Pricing */
.pricing-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-speed);
}

.pricing-card.featured {
  border-color: var(--primary-blue);
  box-shadow: 0 0 30px rgba(11, 99, 217, 0.3);
}

.pricing-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.pricing-period {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  text-align: left;
}

.pricing-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  color: white;
}

.pricing-features li:last-child {
  border-bottom: none;
}

/* FAQ */
.faq-item {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
}

/* Restore visible scrollbars (override accidental hiding) */
html, body, .table-container, .recent-scans-container, .chatbot-messages, textarea, .modal, .card {
  overflow: auto !important;
}

/* WebKit-based browsers */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.04);
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* Firefox */
* {
  scrollbar-width: auto;
  scrollbar-color: rgba(255,255,255,0.12) rgba(0,0,0,0.04);
}

/* Ensure textarea/text fields show scroll when needed */
.form-textarea {
  overflow: auto !important;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: white;
  transition: background var(--transition-speed);
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.05);
}

.faq-question svg {
  transition: transform var(--transition-speed);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Demo */
.demo-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
}

.demo-section-reverse {
  direction: rtl;
}

.demo-section-reverse > * {
  direction: ltr;
}

.video-placeholder {
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Password Toggle */
.input-with-toggle {
  position: relative;
}

.input-with-toggle .password-field {
  padding-right: 3rem;
}

.pw-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-toggle svg {
  width: 20px;
  height: 20px;
}

/* ===================================
   SCANNER / CODE RESULTS - ROBOTO MONO
   =================================== */

/* URL Display & Input */
.url-display,
.url-input,
.scan-url,
.scanned-url {
  font-family: 'Roboto Mono', monospace;
}

/* Scanner Results */
.scan-result,
.scan-output,
.scanner-result,
.analysis-result,
.threat-analysis,
.scan-data {
  font-family: 'Roboto Mono', monospace;
}

/* Code blocks and technical data */
code,
pre,
.code,
.code-block,
.technical-data,
.hash-value,
.timestamp {
  font-family: 'Roboto Mono', monospace;
}

/* Technical identifiers */
.identifier,
.scan-id,
.report-id,
.file-hash {
  font-family: 'Roboto Mono', monospace;
}

/* Responsive */
@media (max-width: 968px) {
  .header-container {
    grid-template-columns: auto 1fr;
    grid-template-areas: 
      "logo actions"
      "nav nav";
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
  }
  
  nav {
    justify-self: start;
    grid-column: 1 / -1;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-section {
    border-left: none;
    padding-left: 0;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .demo-section {
    grid-template-columns: 1fr;
  }
  
  .demo-section-reverse {
    direction: ltr;
  }
  
}

@media (max-width: 699px) {
  .container {
    padding: 0 1rem;
  }
  
  .header-container {
    padding: 1rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  .footer-section {
    border-left: none;
    padding-left: 0;
  }
  .footer-brand {
    text-align: center;
  }
  .footer-brand-desc {
    max-width: 100%;
  }
  .footer-cta-row {
    justify-content: center;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: clamp(28px, 8vw, 40px);
  }
  
  .feature-icon {
    width: 40px;
    height: 40px;
  }
  
}

@media (max-width: 360px) {
  html {
    font-size: 14px;
  }
}

/* ===================================
   MODERN DASHBOARD REDESIGN
   =================================== */

/* Page Header */
.dash-page-header {
  margin-bottom: 1.75rem;
}
.dash-page-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.01em;
}
.dash-page-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

/* ── Stats Row ── */
.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-stat-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.dash-stat-card:hover {
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.dash-stat-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.dash-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-stat-value {
  font-family: 'Inter', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}
.dash-stat-danger { color: #FF4D4D; }
.dash-stat-safe { color: #00FF88; }

/* ── Dashboard Cards ── */
.dash-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color var(--transition-speed);
}
.dash-card:last-child {
  margin-bottom: 0;
}
.dash-card:hover {
  border-color: rgba(255,255,255,0.08);
}

.dash-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dash-card-title svg {
  color: var(--primary-blue);
  flex-shrink: 0;
}
.dash-card-subtitle {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

/* ── Alert Items ── */
.dash-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.03);
  transition: all var(--transition-speed);
  cursor: default;
}
.dash-alert-item:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
}

.dash-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 6px currentColor;
}

.dash-alert-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dash-alert-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
}

.dash-alert-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-alert-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.dash-alert-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 3px;
}
.dash-badge-malicious {
  background: rgba(255,77,77,0.12);
  color: #FF4D4D;
}
.dash-badge-suspicious {
  background: rgba(255,193,7,0.12);
  color: #FFC107;
}
.dash-badge-safe {
  background: rgba(0,255,136,0.12);
  color: #00FF88;
}

.dash-alert-time {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  font-family: 'Roboto Mono', monospace;
}

/* ── Security Tips ── */
.dash-tips-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.dash-tip-card {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm, 6px);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-left: 3px solid #00B7D9;
  transition: all 0.2s ease;
}
.dash-tip-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
.dash-tip-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.dash-tip-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: 0.85;
}
.dash-tip-icon svg {
  flex-shrink: 0;
  overflow: visible;
}
.dash-tip-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}
.dash-tip-text {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0;
  opacity: 0.85;
}

.dash-btn-secondary {
  width: 100%;
  padding: 0.6rem 1rem;
  background: rgba(11,99,217,0.08);
  color: var(--primary-blue);
  border: 1px solid rgba(11,99,217,0.2);
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
}
.dash-btn-secondary:hover {
  background: var(--primary-blue);
  color: #ffffff;
  border-color: var(--primary-blue);
}

/* ── Chart Legend ── */
.dash-chart-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.dash-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.dash-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Recent Scans Card List ── */
.dash-scans-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.dash-scans-header .dash-card-title { margin-bottom: 0; }
.dash-scans-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
}
.dash-scans-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dash-scan-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm, 6px);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all var(--transition-speed, 0.2s) ease;
}
.dash-scan-card:hover {
  background: rgba(255,255,255,0.045);
  border-color: rgba(11,99,217,0.25);
}
.dash-scan-status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-scan-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}
.dash-scan-safe .dash-scan-dot { box-shadow: 0 0 6px rgba(0,255,136,0.4); }
.dash-scan-malicious .dash-scan-dot { box-shadow: 0 0 6px rgba(255,77,77,0.4); }
.dash-scan-suspicious .dash-scan-dot { box-shadow: 0 0 6px rgba(255,193,7,0.4); }

.dash-scan-info {
  flex: 1;
  min-width: 0;
}
.dash-scan-target {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
  font-family: 'Roboto Mono', monospace;
}
.dash-scan-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.dash-scan-type {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.dash-scan-type svg { opacity: 0.5; }
.dash-scan-time {
  opacity: 0.6;
}

.dash-scan-result {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
  min-width: 80px;
}
.dash-scan-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
}
.dash-scan-badge-safe {
  color: #00FF88;
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.15);
}
.dash-scan-badge-malicious {
  color: #FF4D4D;
  background: rgba(255,77,77,0.08);
  border: 1px solid rgba(255,77,77,0.15);
}
.dash-scan-badge-suspicious {
  color: #FFC107;
  background: rgba(255,193,7,0.08);
  border: 1px solid rgba(255,193,7,0.15);
}

.dash-scan-conf {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.dash-scan-conf-bar {
  width: 48px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.dash-scan-conf-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.dash-scan-conf-text {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: 'Roboto Mono', monospace;
  min-width: 28px;
  text-align: right;
}

.dash-scan-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.25rem 0.25rem;
  margin-top: 0.25rem;
}
.dash-scan-footer-btns {
  display: flex;
  gap: 0.5rem;
}
.dash-scan-showing {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.6;
}
.dash-scan-show-more {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-primary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.dash-scan-show-more:hover {
  background: rgba(11,99,217,0.12);
  border-color: rgba(11,99,217,0.3);
  color: var(--accent-cyan, #00B7D9);
}

.dash-scan-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  gap: 0.75rem;
}
.dash-scan-empty p {
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.6;
  margin: 0;
}

/* ── Dashboard Responsive ── */
@media (max-width: 1024px) {
  .dash-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .dash-stats-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .dash-stat-value {
    font-size: 1.5rem;
  }
  .dash-page-title {
    font-size: 1.4rem;
  }
  .dash-card {
    padding: 1.1rem;
  }
  .dash-scan-card {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .dash-scan-result {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.03);
  }
}

/* ===================================
   UI IMPROVEMENTS - Feature Icons & Recent Alerts
   =================================== */

/* Feature Icon Container with Blue Glow */
.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(11, 99, 217, 0.15), rgba(0, 183, 217, 0.08));
  border: 1px solid rgba(11, 99, 217, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
  transition: all 0.35s ease;
  box-shadow: 0 0 20px rgba(11, 99, 217, 0.2),
              inset 0 0 20px rgba(11, 99, 217, 0.1);
}

.feature-icon::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(11, 99, 217, 0.4), rgba(0, 183, 217, 0.2));
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}

.feature-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(11, 99, 217, 0.4),
              0 0 60px rgba(0, 183, 217, 0.2),
              inset 0 0 30px rgba(11, 99, 217, 0.15);
}

.feature-icon:hover::before {
  opacity: 1;
}

.feature-icon svg {
  color: #FFFFFF;
  filter: drop-shadow(0 0 8px rgba(11, 99, 217, 0.6))
          drop-shadow(0 0 16px rgba(0, 183, 217, 0.3));
  transition: filter 0.35s ease;
}

.feature-icon:hover svg {
  filter: drop-shadow(0 0 12px rgba(11, 99, 217, 0.8))
          drop-shadow(0 0 24px rgba(0, 183, 217, 0.5));
}



/* ===================================
   TABLE (RECENT SCANS) FIXES - ENSURE ALIGNMENT
   =================================== */

/* Generic table base — column widths set per-table via ID selectors */
table:not(#scan-results-table) {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  table-layout: fixed;
}

table:not(#scan-results-table) thead {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 2px solid var(--border-color);
}

table:not(#scan-results-table) th {
  padding: 1rem 0.75rem;
  text-align: left;
  font-weight: 600;
  color: white;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table:not(#scan-results-table) td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  color: white;
  vertical-align: middle;
}

table:not(#scan-results-table) tbody tr {
  transition: background var(--transition-speed);
}

table:not(#scan-results-table) tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.legend-circle {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

/* ===================================
   TABLE RESPONSIVE MEDIA QUERIES
   =================================== */

/* Hide Confidence column on small tablets (<= 768px) */
@media (max-width: 768px) {
  .grid-4 {
    /* Keep 2 columns for the stat cards on smaller tablets */
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Hide Confidence column on Recent Scans table (4th column) */
  table th:nth-child(4),
  table td:nth-child(4) {
    display: none;
  }

  /* Re-adjust widths for remaining columns */
  table th:nth-child(1) { width: 40%; } /* Target */
  table th:nth-child(2) { width: 20%; } /* Type */
  table th:nth-child(3) { width: 20%; } /* Result */
  table th:nth-child(5) { width: 10%; } /* Time */
  table th:nth-child(6) { width: 10%; } /* Actions */
}

/* Hide more columns on mobile phones (<= 576px) */
@media (max-width: 576px) {
  .grid-4 {
    /* Show 2 columns on tablets and larger mobile screens */
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  /* Hide Type (2nd), Confidence (4th), Time (5th) columns on Recent Scans table */
  table th:nth-child(2),
  table td:nth-child(2),
  table th:nth-child(4),
  table td:nth-child(4),
  table th:nth-child(5),
  table td:nth-child(5) {
    display: none;
  }
  
  /* Force Target (1st column) to be max-width and truncate */
  table td:first-child {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 60% !important; /* Give it most of the space */
  }

  /* Re-adjust widths for the remaining visible columns: Target, Result, Actions */
  table th:nth-child(1) { width: 60%; } /* Target */
  table th:nth-child(3) { width: 20%; } /* Result */
  table th:nth-child(6) { width: 20%; } /* Actions */

  /* Ensure long alert descriptions wrap correctly */
  .alert-description {
    word-break: break-all;
  }
}

/* Stack stat cards on small phones (<= 480px) */
@media (max-width: 480px) {
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .card h2 {
    font-size: 1.5rem !important;
  }
  
  .card p {
    font-size: 0.75rem !important;
  }
}

/* Stack stat cards on very small phones (<= 400px) */
@media (max-width: 400px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Keeping original small-screen media queries */
@media (max-width: 480px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
  }
}

/* Print Styles - Hide header, footer, sidebar for PDF export */
@media print {
  header,
  footer {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
  
  main {
    background: white !important;
  }
  
  /* Make report full width, hide sidebar */
  .report-layout {
    grid-template-columns: 1fr !important;
  }
  
  .report-layout > div:last-child {
    display: none !important;
  }
  
  /* Adjust cards for print */
  .card {
    background: white !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }
  
  /* Keep text dark for printing */
  h1, h2, h3, h4, h5, h6,
  p, span, li, div {
    color: #000 !important;
  }
  
  /* Adjust badge colors for print */
  .badge {
    border: 2px solid #000 !important;
  }
  
  .badge-malicious {
    background: #ffcccc !important;
    color: #c00 !important;
  }
  
  /* Remove buttons from print */
  button,
  .btn {
    display: none !important;
  }
  
  /* Adjust threat indicators for print */
  li[style*="background: rgba(255, 77, 77"] {
    background: #fff0f0 !important;
    border-left: 4px solid #c00 !important;
  }
  
  /* Text muted to dark for print */
  [style*="color: var(--text-muted)"],
  [style*="color: var(--text-secondary)"] {
    color: #666 !important;
  }
}
/* ============================================================
   UNIFIED BORDER SYSTEM - FIXED VERSION
   Only adds borders without breaking layout
   ============================================================ */

/* Add these to :root ONLY */
:root {
  --border-thin: 1px solid rgba(255, 255, 255, 0.1);
  --border-semi: 1px solid rgba(255, 255, 255, 0.08);
  --glow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ONLY UPDATE BORDER VALUES - NO LAYOUT CHANGES */

/* Card - just update border */
.card {
  border: var(--border-thin) !important;
  box-shadow: var(--shadow-subtle);
}

.card:hover {
  box-shadow: var(--shadow-soft);
}

/* Form inputs - just update border */
.form-input,
.form-textarea,
.form-select {
  border: var(--border-thin) !important;
  box-shadow: var(--glow-inner);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary-blue) !important;
  box-shadow: var(--glow-inner), 0 0 0 3px rgba(11, 99, 217, 0.1);
}

/* Buttons - just update border */
.btn-primary {
  border: var(--border-thin) !important;
}

.btn-outline {
  border: var(--border-thin) !important;
}

/* Auth card - just update border */
.auth-card {
  border: var(--border-thin) !important;
  box-shadow: var(--shadow-soft);
}

/* Settings section - just update border */
.settings-section {
  border: var(--border-thin) !important;
  box-shadow: var(--shadow-subtle);
}

.settings-section:hover {
  box-shadow: var(--shadow-soft);
}

/* Pricing card - just update border */
.pricing-card {
  border: var(--border-thin) !important;
  box-shadow: var(--shadow-subtle);
}

.pricing-card:hover {
  box-shadow: var(--shadow-soft);
}

/* Alert card - just update border */
.alert-card {
  border: var(--border-thin) !important;
  box-shadow: var(--shadow-subtle);
}

/* Footer grid - match navbar border */
.footer-grid {
  border: var(--border-thin) !important;
  box-shadow: var(--shadow-subtle);
}

.footer-grid:hover {
  box-shadow: var(--shadow-soft);
}

/* Footer CTA buttons */
.footer-cta-btn {
  border: 1px solid rgba(11, 99, 217, 0.35) !important;
}

/* Footer socials - just update border */
.footer-socials a {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: var(--glow-inner);
}

.footer-socials a:hover {
  box-shadow: var(--glow-inner), 0 0 12px rgba(11, 99, 217, 0.4);
}

/* Header - just update border */
.header-container {
  border-color: rgba(255,255,255,0.04) !important;
}

.header-container:hover {
  border-color: rgba(255,255,255,0.06) !important;
}

/* Dropdown - just update border */
.dropdown-menu {
  border: var(--border-thin) !important;
  box-shadow: var(--shadow-soft);
}

/* Profile menu - just update border */
.profile-menu {
  border: var(--border-thin) !important;
}

/* FAQ - just update border */
.faq-item {
  border: var(--border-thin) !important;
}

/* Badge - just update border */
.badge {
  border: var(--border-semi) !important;
}

/* Toggle slider - just update border */
.toggle-slider {
  border: var(--border-thin) !important;
}

/* Custom animation for the login hero background - REMOVED ANIMATION FOR NEW LOOK */
@keyframes flow-background {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Custom login page styling to differentiate the look */
.login-page .login-card {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    /* NEW: Darker transparent background for a security module look */
    background: rgba(15, 15, 16, 0.8);
    border: 2px solid rgba(0, 183, 217, 0.4);
    box-shadow: 0 0 50px rgba(0, 183, 217, 0.1);
    backdrop-filter: blur(8px);
}

.login-page .login-card:hover {
    box-shadow: 0 0 60px rgba(0, 183, 217, 0.3), 0 0 5px var(--accent-cyan);
    border-color: var(--accent-cyan);
}

/* Login Feature List Overhaul */
.login-features {
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.login-page .login-feature-item {
    display: grid;
    grid-template-columns: 24px 1fr; /* Icon width, then text */
    gap: 1rem;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    align-items: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.login-page .login-feature-item:last-child {
    border-bottom: none;
}

.login-page .login-feature-item:hover {
    background-color: transparent; /* Remove hover background */
    transform: translateX(5px);
}

.login-page .login-feature-icon {
    /* Style icons as distinct markers */
    width: 24px;
    height: 24px;
    color: var(--accent-cyan) !important; 
    filter: drop-shadow(0 0 4px var(--accent-cyan));
    transition: filter 0.3s ease;
}

.login-page .login-feature-item:hover .login-feature-icon {
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

/* Added specific styles for the login hero section - NO ANIMATION */
.login-hero {
    background: linear-gradient(180deg, rgba(0, 183, 217, 0.08) 0%, transparent 100%); /* Simpler, static gradient */
    padding: 4rem 1.5rem 2rem;
    text-align: center;
    background-size: 100% 100%;
    animation: none; /* Ensure animation is off */
}

.login-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.login-hero p {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Styles moved from inline/style block in login.html */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-content {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 1.5rem 4rem;
}

.login-card {
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 560px;
    width: 100%;
}

.login-card-header {
    margin-bottom: 1.5rem;
}

.login-card-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

.login-card-header p {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}


.login-form-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.login-form-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: block;
}

.login-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.login-input-group .form-input {
    flex: 1;
    font-family: 'Inter', sans-serif;
}

.login-input-group .btn {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    font-family: 'Inter', sans-serif;
}

.login-note {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.login-note a {
    color: var(--primary-blue); /* Use primary-blue for links */
    text-decoration: none;
}

@media (max-width: 600px) {
    .login-hero {
        padding: 3rem 1rem 1.5rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .login-input-group {
        flex-direction: column;
    }

    .login-input-group .btn {
        width: 100%;
    }
}
/* === Typewriter helpers (replace previous block) === */
#hero-typewriter {
  white-space: pre-wrap;
  display: inline;
  font-family: inherit;
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1; /* helps alignment */
}

/* Thick block cursor aligned to text bottom, sharp corners */
.type-cursor {
  display: inline-block;
  width: 0.65ch;       /* block width */
  height: 1em;         /* match approx text height */
  margin-left: 0.35rem;
  vertical-align: text-bottom; /* align to bottom of text */
  line-height: 1;
  position: relative;
  overflow: visible;
  /* ensure it sits flush with baseline */
  transform: translateY(0);
}

/* Render a filled block as the cursor using pseudo-element */
.type-cursor::after {
  content: '';
  display: inline-block;
  width: 100%;
  height: 100%;
  background: currentColor; /* uses text color */
  border-radius: 0;         /* sharp corners */
  opacity: 1;
  animation: phishnet-cursor-blink 1s steps(1) infinite;
  transform-origin: center;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .type-cursor::after {
    animation: none;
    opacity: 1;
  }
}

@keyframes phishnet-cursor-blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}
/* ---------- Smooth swap & email-preview styling ---------- */

.animated-hidden {
  display: none;
  opacity: 0;
  transform: translateY(0);
  max-height: 0;
  overflow: hidden;
}

/* swipe-up-in (smooth) */
@keyframes swipeUpIn {
  0% { opacity: 0; transform: translateY(26px) scale(0.997); max-height: 0; }
  60% { opacity: 1; transform: translateY(-6px) scale(1.003); max-height: 300px; }
  100% { opacity: 1; transform: translateY(0) scale(1); max-height: 300px; }
}
.swipe-up-in {
  display: block !important;
  animation: swipeUpIn 420ms cubic-bezier(.16,.9,.24,1) forwards;
  will-change: transform, opacity;
}

/* swipe-up-out (smooth) */
@keyframes swipeUpOut {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  45% { opacity: 0.78; transform: translateY(-10px) scale(0.998); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.985); height:0; margin:0; padding:0; }
}
.swipe-up-out {
  animation: swipeUpOut 360ms cubic-bezier(.12,.9,.18,1) forwards;
  will-change: transform, opacity;
}

/* Email preview shown above password with low opacity */
.email-display {
  color: rgba(255,255,255,0.65);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  margin: 0.35rem 0;
  transition: opacity 220ms ease, transform 220ms ease;
  opacity: 0.9;
}

/* keep wrappers full width so button doesn't jump */
#emailFieldWrapper, #passwordFieldWrapper {
  width: 100%;
}

/* keep button width consistent and right-aligned */
#signinBtnWrapper {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* inline form error style */
.form-error {
  color: #FF6B6B;
  font-size: 0.82rem;
  margin-top: 0.35rem;
  font-family: 'Inter', sans-serif;
}

/* subtle input focus transition */
#passwordFieldWrapper .form-input, #emailFieldWrapper .form-input {
  transition: box-shadow 180ms ease, transform 180ms ease, opacity 120ms ease;
}

/* respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .swipe-up-in, .swipe-up-out {
    animation-duration: 1ms !important;
  }
}
/* --- Make "Forgot Password" & "Use different email" smaller & subtle --- */

#authLinks a,
#authLinks a:visited,
#authLinks a:active {
  color: rgba(255,255,255,0.60);
  font-size: 0.80rem;        /* smaller size */
  font-weight: 400;          /* lighter weight */
  text-decoration: none;
  opacity: 0.85;
  transition: color 180ms ease, opacity 180ms ease;
}

#authLinks a:hover,
#authLinks a:focus {
  color: rgba(255,255,255,0.78);
  opacity: 1;
  text-decoration: underline;
}

/* individual refinement */
#useDifferentEmail,
#forgotPasswordLink {
  font-size: 0.78rem !important;
  opacity: 0.80;
}

/* spacing between the small links */
#authLinks {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.5rem;
}
/* AuthLinks (Always visible - small clean style) */
.auth-links {
  margin-top: 1.2rem;
  text-align: center;
}

.auth-links .small-text {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-right: 6px;
}

#signupLink {
  color: #0B63D9;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

#signupLink:hover {
  text-decoration: underline;
}

/* Extra options (Password stage only) */
.extra-options {
  text-align: center;
  margin-top: 1rem;
}

.dim-link {
  display: block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  margin-top: 0.4rem;
}

.dim-link:hover {
  color: rgba(255,255,255,0.75);
  text-decoration: underline;
}

/* =========================
   Signup / Login shared fixes
   ========================= */

/* Ensure signup and login cards match spacing */
.signup-card,
.login-card {
  max-width: 560px;
  width: 100%;
  padding: 2rem;
  border-radius: var(--radius-lg);
}

/* form group spacing consistent */
.signup-card .form-group,
.login-card .form-group,
.login-form-section .form-group {
  margin-bottom: 1rem;
}

/* small error style (single definition) */
.form-error {
  color: #FF6B6B;
  font-size: 0.82rem;
  margin-top: 0.35rem;
  font-family: 'Inter', sans-serif;
}

/* subtle login/signup link style */
#login-link {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-weight: 600;
}
#login-link:hover {
  text-decoration: underline;
  color: rgba(255,255,255,1);
}

/* ---------------- Signup form row (first+last) ---------------- */
.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}
.form-row .split { flex: 1; }

/* Responsive: stack fields on small screens */
@media (max-width: 600px) {
  .form-row { flex-direction: column; }
}

/* ---------------- Password toggle & strength meter ---------------- */
/* Positioning container */
.input-with-toggle { position: relative; }

/* Give password input room on the right so text doesn't overlap the eye */
/* Slightly reduced compared to older value for better visual centering */
.input-with-toggle .password-field {
  padding-right: 2.6rem; /* room for the eye button without stealing input space */
  box-sizing: border-box;
}

/* Eye button: aligned inside the input on the right */
/* NOTE: translateY(-48%) gives optical centering for your input sizes */
.input-with-toggle .pw-toggle {
  position: absolute;
  right: 0.6rem;               /* visual alignment */
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  padding: 0;                  /* keep the hit area tight */
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  line-height: 0;
  transition: color 160ms ease, transform 160ms ease;
}
.input-with-toggle .pw-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Active (when password is visible) - maintain the same offset */
.input-with-toggle .pw-toggle.active {
  opacity: 0.95;
  transform: translateY(-48%) scale(1.03);
}

/* Slightly increase touch area on very small screens */
@media (max-width: 420px) {
  .input-with-toggle .pw-toggle { right: 0.5rem; padding: 0.35rem; transform: translateY(-47%); }
}

/* Hover accessibility */
.input-with-toggle .pw-toggle:hover { color: rgba(255,255,255,0.92); }
.input-with-toggle .pw-toggle:focus { outline: 2px solid rgba(11,99,217,0.18); border-radius: 6px; }

/* ---------------- Password strength meter visuals ---------------- */
.pwd-meter {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.pwd-bar {
  height: 8px;
  flex: 1;
  background: rgba(255,255,255,0.06); /* base (empty) */
  border-radius: 3px;
  transition: background 260ms cubic-bezier(.2,.9,.2,1), transform 220ms ease;
  transform-origin: left center;
}

/* Slight scale consistency for animated feel */
.pwd-bar:nth-child(1) { transform: scaleX(1); }
.pwd-bar:nth-child(2) { transform: scaleX(1); }
.pwd-bar:nth-child(3) { transform: scaleX(1); }
.pwd-bar:nth-child(4) { transform: scaleX(1); }

/* ---------------- Optional strength classes (useful if JS toggles classes) ---------------- */
/* weak = red, fair = orange, good = yellow, strong = green */
.pwd-meter.weak .pwd-bar:nth-child(1) { background: #FF4D4D; transform: scaleX(1.02); }
.pwd-meter.fair  .pwd-bar:nth-child(1) { background: #FF4D4D; transform: scaleX(1.02); }
.pwd-meter.fair  .pwd-bar:nth-child(2) { background: #FF8A00; transform: scaleX(1.04); }
.pwd-meter.good  .pwd-bar:nth-child(1) { background: #FF4D4D; transform: scaleX(1.02); }
.pwd-meter.good  .pwd-bar:nth-child(2) { background: #FF8A00; transform: scaleX(1.04); }
.pwd-meter.good  .pwd-bar:nth-child(3) { background: #FFD600; transform: scaleX(1.06); }
.pwd-meter.strong .pwd-bar:nth-child(1){ background: #FF4D4D; transform: scaleX(1.02); }
.pwd-meter.strong .pwd-bar:nth-child(2){ background: #FF8A00; transform: scaleX(1.04); }
.pwd-meter.strong .pwd-bar:nth-child(3){ background: #FFD600; transform: scaleX(1.06); }
.pwd-meter.strong .pwd-bar:nth-child(4){ background: #00C853; transform: scaleX(1.08); }

/* Optional: color target text (#pwdStrength) when parent meter has class */
.pwd-meter.weak ~ #pwdStrength,
.pwd-meter.weak + #pwdStrength,
.pwd-meter.weak #pwdStrength {
  color: #FF4D4D !important;
}
.pwd-meter.fair ~ #pwdStrength,
.pwd-meter.fair + #pwdStrength,
.pwd-meter.fair #pwdStrength {
  color: #FF8A00 !important;
}
.pwd-meter.good ~ #pwdStrength,
.pwd-meter.good + #pwdStrength,
.pwd-meter.good #pwdStrength {
  color: #FFD600 !important;
}
.pwd-meter.strong ~ #pwdStrength,
.pwd-meter.strong + #pwdStrength,
.pwd-meter.strong #pwdStrength {
  color: #00C853 !important;
}

/* ---------------- Misc / housekeeping ---------------- */
/* Only hide login-features on signup page — leave login page features visible */
.signup-page .login-features { display: none !important; }

/* Show-password checkbox small styling */
.show-pw input[type="checkbox"] {
  accent-color: #0B63D9; /* subtle blue when checked */
  width: 16px;
  height: 16px;
}
.show-pw span {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
}


/* Signup button appearance (keeps theme but slightly softer shadow) */
#signup-button.btn-primary {
  box-shadow: 0 0 10px rgba(11, 99, 217, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
#signup-button.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(11,99,217,0.36);
}

/* Login note spacing */
.login-note { margin-top: 1rem; }

/* Form labels */
.form-label {
  color: rgba(255,255,255,0.92);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
  display: block;
}

/* Fine tune small-screen paddings/inputs if needed */
@media (max-width: 420px) {
  .signup-card, .login-card { padding: 1.25rem; }
  .input-with-toggle .password-field { padding-right: 3rem; }
}
/* Make signup card visually match the login card (glass, border, glow, blur) */
.signup-page .signup-card,
.signup-card {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  background: rgba(15, 15, 16, 0.8);
  border: 2px solid rgba(0, 183, 217, 0.4);
  box-shadow: 0 0 50px rgba(0, 183, 217, 0.1);
  backdrop-filter: blur(8px);
}

.signup-page .signup-card:hover,
.signup-card:hover {
  box-shadow: 0 0 60px rgba(0, 183, 217, 0.3), 0 0 5px var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* ==================== TOAST NOTIFICATION ==================== */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(11, 20, 50, 0.98) 0%, rgba(15, 25, 60, 0.98) 100%);
  border: 2px solid var(--primary-blue);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateX(400px);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 30px rgba(11, 99, 217, 0.5);
  backdrop-filter: blur(10px);
  min-width: 320px;
  max-width: 450px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 5px solid var(--primary-blue);
}

.toast-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.toast-notification.success {
  border-color: #1E90FF;
  border-left-color: #1E90FF;
  background: linear-gradient(135deg, rgba(10, 30, 80, 0.98) 0%, rgba(15, 45, 100, 0.98) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 30px rgba(30, 144, 255, 0.5);
}

.toast-notification.success .toast-icon {
  color: #1E90FF;
  text-shadow: 0 0 10px rgba(30, 144, 255, 0.8);
}

.toast-notification.error {
  border-color: #0B63D9;
  border-left-color: #0B63D9;
  background: linear-gradient(135deg, rgba(11, 20, 50, 0.98) 0%, rgba(15, 30, 70, 0.98) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 30px rgba(11, 99, 217, 0.5);
}

.toast-notification.error .toast-icon {
  color: #0B63D9;
  text-shadow: 0 0 10px rgba(11, 99, 217, 0.8);
}

.toast-notification.warning {
  border-color: #4169E1;
  border-left-color: #4169E1;
  background: linear-gradient(135deg, rgba(20, 40, 90, 0.98) 0%, rgba(30, 55, 110, 0.98) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 30px rgba(65, 105, 225, 0.5);
}

.toast-notification.warning .toast-icon {
  color: #4169E1;
  text-shadow: 0 0 10px rgba(65, 105, 225, 0.8);
}

.toast-notification.info {
  border-color: #00B7D9;
  border-left-color: #00B7D9;
  background: linear-gradient(135deg, rgba(10, 35, 80, 0.98) 0%, rgba(15, 50, 100, 0.98) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 183, 217, 0.5);
}

.toast-notification.info .toast-icon {
  color: #00B7D9;
  text-shadow: 0 0 10px rgba(0, 183, 217, 0.8);
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  min-width: 22px;
  flex-shrink: 0;
}

.toast-message {
  display: inline-block;
  flex: 1;
  word-break: break-word;
  line-height: 1.4;
}

/* Mobile responsive toast */
@media (max-width: 768px) {
  .toast-notification {
    top: 12px;
    right: 12px;
    left: 12px;
    min-width: auto;
    max-width: none;
    transform: translateY(-120px);
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  
  .toast-notification.show {
    transform: translateY(0);
  }
}

/* ============ SCAN RESULTS SECTION ============ */

.results-section {
  background: linear-gradient(135deg, rgba(11, 99, 217, 0.08) 0%, rgba(0, 183, 217, 0.04) 100%);
  border-top: 1px solid rgba(11, 99, 217, 0.2);
  padding: 3rem 0;
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 1000px;
  }
}

.scan-results {
  animation: fadeInUp 0.5s ease-out;
}

.scan-results.hidden {
  display: none;
}

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

.results-card {
  background: var(--card-bg);
  border: 1px solid rgba(11, 99, 217, 0.3);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 32px rgba(11, 99, 217, 0.15);
  max-width: 900px;
  margin: 0 auto;
}

.results-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  border-bottom: 1px solid rgba(11, 99, 217, 0.2);
  background: rgba(11, 99, 217, 0.05);
}

.status-indicator {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

/* Fresh DOM status classes - these apply color when HTML is created */
.results-card.status-safe .status-indicator {
  background: rgba(0, 255, 136, 0.1);
  border: 2px solid rgba(0, 255, 136, 0.5);
}

.results-card.status-safe .status-indicator .status-icon {
  stroke: #00FF88;
  color: #00FF88;
}

.results-card.status-safe .status-label {
  color: #00FF88;
}

.results-card.status-safe .status-subtext {
  color: rgba(0, 255, 136, 0.8);
}

/* Suspicious status */
.results-card.status-suspicious .status-indicator {
  background: rgba(255, 193, 7, 0.1);
  border: 2px solid rgba(255, 193, 7, 0.5);
}

.results-card.status-suspicious .status-indicator .status-icon {
  stroke: #FFC107;
  color: #FFC107;
}

.results-card.status-suspicious .status-label {
  color: #FFC107;
}

.results-card.status-suspicious .status-subtext {
  color: rgba(255, 193, 7, 0.8);
}

/* Malicious status */
.results-card.status-malicious .status-indicator {
  background: rgba(255, 77, 77, 0.1);
  border: 2px solid rgba(255, 77, 77, 0.5);
}

.results-card.status-malicious .status-indicator .status-icon {
  stroke: #FF4D4D;
  color: #FF4D4D;
}

.results-card.status-malicious .status-label {
  color: #FF4D4D;
}

.results-card.status-malicious .status-subtext {
  color: rgba(255, 77, 77, 0.8);
}

.status-icon {
  width: 40px;
  height: 40px;
}

.results-header-text h3 {
  font-size: 1.75rem;
  margin: 0;
  font-weight: 700;
  color: var(--text-primary);
}

.status-subtext {
  color: var(--text-muted);
  margin: 0.25rem 0 0 0;
  font-size: 0.95rem;
}

.results-body {
  padding: 2rem;
}

.risk-meter {
  background: rgba(11, 99, 217, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.risk-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.risk-label span:first-child {
  color: var(--text-muted);
}

.risk-value {
  font-weight: 600;
  font-size: 1.1rem;
}

/* Hide risk bar - show only text */
.risk-bar {
  display: none !important;
}

/* Risk level colors */
.risk-label .risk-value.low {
  color: #00FF88 !important;
}

.risk-label .risk-value.medium {
  color: #FFC107 !important;
}

.risk-label .risk-value.high {
  color: #FF4D4D !important;
}

.risk-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.risk-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-safe) 0%, var(--color-suspicious) 50%, var(--color-malicious) 100%);
  border-radius: 3px;
  transition: width 0.8s ease-out;
}

.issues-section {
  margin-bottom: 2rem;
}

.issues-section h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.issues-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.issues-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(11, 99, 217, 0.05);
  border-left: 3px solid var(--primary-blue);
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.issues-list li:before {
  display: none !important;
  content: "" !important;
}

.issues-list li.warning:before {
  display: none !important;
  content: "" !important;
}

.issues-list li.malicious:before {
  display: none !important;
  content: "" !important;
}

.analysis-box {
  background: rgba(11, 99, 217, 0.08);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-blue);
  margin-bottom: 1.5rem;
}

.analysis-box h4 {
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.analysis-box p {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  font-size: 0.9rem;
}

.results-meta {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(11, 99, 217, 0.1);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.results-meta span:before {
  content: "✓ ";
  color: var(--color-safe);
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(11, 99, 217, 0.2);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .results-section {
    padding: 2rem 0;
  }

  .results-header {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    gap: 1rem;
  }

  .results-header-text h3 {
    font-size: 1.5rem;
  }

  .results-body {
    padding: 1.5rem;
  }

  .risk-meter {
    padding: 1rem;
  }

  .analysis-box {
    padding: 1rem;
  }

  .results-card {
    margin: 0 1rem;
  }
}

/* ============ CLOSE RESULTS BUTTON ============ */

.close-results-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 77, 77, 0.1);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100;
}

.close-results-btn:hover {
  background: rgba(255, 77, 77, 0.2);
  color: var(--color-malicious);
  transform: scale(1.1);
}

.close-results-btn svg {
  width: 20px;
  height: 20px;
}

/* ============ 9-SOURCE SCAN RESULTS ============ */

/* Score ring */
.scan-score-ring {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}
.scan-score-ring svg {
  width: 100%;
  height: 100%;
}
.scan-score-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1;
}
.scan-score-number {
  font-size: 1.75rem;
  font-weight: 800;
  display: block;
}
.scan-score-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* Status badge row */
.status-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-badge svg { width: 14px; height: 14px; }
.status-badge.status-safe { background: rgba(0,255,136,0.12); color: #00FF88; }
.status-badge.status-suspicious { background: rgba(255,193,7,0.12); color: #FFC107; }
.status-badge.status-malicious { background: rgba(255,77,77,0.12); color: #FF4D4D; }

.deescalated-badge {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(11,99,217,0.15);
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scanned-url {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Section headers */
.scan-section {
  margin-bottom: 1.5rem;
}
.scan-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.scan-section-title svg {
  color: var(--primary-blue);
  flex-shrink: 0;
}

/* Sources grid */
.src-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.src-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  transition: border-color 0.2s;
}
.src-card:hover {
  border-color: rgba(255,255,255,0.12);
}
.src-card.src-clean { border-left: 3px solid #00FF88; }
.src-card.src-flagged { border-left: 3px solid #FF4D4D; }
.src-card.src-error { border-left: 3px solid #FFC107; }

.src-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.src-card-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.src-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.src-card-badge.src-clean { background: rgba(0,255,136,0.1); color: #00FF88; }
.src-card-badge.src-flagged { background: rgba(255,77,77,0.1); color: #FF4D4D; }
.src-card-badge.src-error { background: rgba(255,193,7,0.1); color: #FFC107; }

.src-card-detail {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Threats list */
.threats-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.threat-item {
  background: rgba(255,77,77,0.04);
  border: 1px solid rgba(255,77,77,0.15);
  border-radius: 8px;
  padding: 0.75rem;
}
.threat-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.threat-type-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: #FF4D4D;
}
.threat-source {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}
.threat-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}
.threat-conf {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  opacity: 0.7;
}

/* Contributions */
.contrib-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contrib-row {
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  align-items: center;
  gap: 0.5rem;
}
.contrib-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contrib-bar-bg {
  height: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  overflow: hidden;
}
.contrib-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease-out;
  min-width: 2px;
}
.contrib-value {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  font-family: monospace;
}

/* Explanation */
.explanation-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  background: rgba(11,99,217,0.04);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary-blue);
}

/* Errors */
.scan-errors-section .error-item {
  font-size: 0.78rem;
  color: #FFC107;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,193,7,0.1);
}
.scan-errors-section .error-item:last-child {
  border-bottom: none;
}

/* Safe summary */
.safe-summary {
  background: rgba(0,255,136,0.03);
  border: 1px solid rgba(0,255,136,0.1);
  border-radius: 8px;
  padding: 1rem;
}
.safe-checks {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.safe-check-item {
  font-size: 0.85rem;
  color: rgba(0,255,136,0.85);
  padding: 0.2rem 0;
}

/* Scan loading state */
.scan-loading-card {
  border-color: rgba(11,99,217,0.3) !important;
}
.scan-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 2rem;
  gap: 1.25rem;
  text-align: center;
}
.scan-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(11,99,217,0.15);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.scan-loading-text h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-primary);
}
.scan-loading-text p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.scan-loading-sources {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 500px;
}
.scan-loading-sources span {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(11,99,217,0.08);
  color: var(--text-muted);
  animation: pulse 1.5s ease-in-out infinite;
}
.scan-loading-sources span:nth-child(2) { animation-delay: 0.1s; }
.scan-loading-sources span:nth-child(3) { animation-delay: 0.2s; }
.scan-loading-sources span:nth-child(4) { animation-delay: 0.3s; }
.scan-loading-sources span:nth-child(5) { animation-delay: 0.4s; }
.scan-loading-sources span:nth-child(6) { animation-delay: 0.5s; }
.scan-loading-sources span:nth-child(7) { animation-delay: 0.6s; }
.scan-loading-sources span:nth-child(8) { animation-delay: 0.7s; }
.scan-loading-sources span:nth-child(9) { animation-delay: 0.8s; }
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; background: rgba(11,99,217,0.2); }
}

/* Scan button loading state */
.btn.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}
.btn.loading::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
  .src-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .scan-score-ring {
    width: 80px;
    height: 80px;
  }
  .scan-score-number {
    font-size: 1.35rem;
  }
  .contrib-row {
    grid-template-columns: 110px 1fr 50px;
  }
  .results-header {
    flex-direction: column;
    text-align: center;
  }
}
@media (max-width: 480px) {
  .src-grid {
    grid-template-columns: 1fr;
  }
  .contrib-row {
    grid-template-columns: 100px 1fr 45px;
  }
}

/* ============ HIBP-STYLE SCAN RESULT ============ */

/* Wrapper */
.hibp-scan-result {
  max-width: 900px;
  margin: 0 auto;
}

/* ── HERO CARD ── */
.hibp-hero {
  position: relative;
  text-align: center;
  padding: 3rem 2.5rem 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0;
  overflow: hidden;
}
.hibp-hero.status-safe {
  border-color: rgba(0,255,136,0.2);
}
.hibp-hero.status-suspicious {
  border-color: rgba(255,193,7,0.2);
}
.hibp-hero.status-malicious {
  border-color: rgba(255,77,77,0.2);
}

.hibp-hero .close-results-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.hibp-hero-score {
  font-family: 'Orbitron', 'Inter', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hibp-hero-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.hibp-hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 1.25rem;
}

.hibp-hero-url {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 20px;
  border-radius: 24px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── OVERVIEW BAR ── */
.hibp-overview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  background: linear-gradient(135deg, rgba(11,99,217,0.08) 0%, rgba(0,183,217,0.04) 100%);
  border: 1px solid rgba(11,99,217,0.15);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hibp-overview-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
}
.hibp-overview-left svg {
  color: var(--primary-blue);
  flex-shrink: 0;
}
.hibp-overview-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.view-full-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-blue);
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-speed);
  white-space: nowrap;
}
.view-full-report-btn:hover {
  background: #0050C0;
  box-shadow: 0 4px 16px var(--glow);
  transform: translateY(-1px);
}

/* ── DETAIL SECTIONS (hidden by default) ── */
.hibp-details-container {
  display: none;
  margin-top: 1.5rem;
  animation: fadeSlideIn 0.4s ease-out;
}
.hibp-scan-result.show-details .hibp-details-container {
  display: block;
}
.hibp-scan-result.show-details .view-full-report-btn {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.1);
}
.hibp-scan-result.show-details .view-full-report-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  box-shadow: none;
  transform: none;
}

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

/* ── DETAIL CARD ── */
.hibp-detail-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.hibp-detail-card:last-child {
  margin-bottom: 0;
}

.hibp-detail-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ── TWO-COLUMN LAYOUT ── */
.hibp-two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.hibp-main-col {
  margin-bottom: 0;
}
.hibp-overview-sidebar {
  margin-bottom: 0;
}

/* ── SCAN OVERVIEW SIDEBAR ── */
.hibp-overview-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.9rem;
}
.hibp-overview-item:last-child {
  border-bottom: none;
}
.hibp-overview-label {
  color: var(--text-muted);
  flex: 1;
}
.hibp-overview-item strong {
  font-weight: 700;
}

.hibp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

/* ── SECURITY SOURCES GRID ── */
.hibp-sources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.hibp-source-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: border-color var(--transition-speed);
}
.hibp-source-item:hover {
  border-color: rgba(11,99,217,0.25);
}
.hibp-source-item .hibp-dot {
  grid-row: 1 / -1;
  align-self: center;
}
.hibp-source-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hibp-source-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hibp-source-detail {
  grid-column: 2 / -1;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── RISK CONTRIBUTIONS ── */
.hibp-contrib-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.hibp-contrib-row {
  display: grid;
  grid-template-columns: 160px 1fr 60px;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.85rem;
}
.hibp-contrib-label {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hibp-contrib-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.hibp-contrib-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease-out;
}
.hibp-contrib-value {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

/* ── RECOMMENDED ACTIONS ── */
.hibp-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.hibp-action-item {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
  border-left: 3px solid var(--primary-blue);
  background: rgba(11,99,217,0.03);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.hibp-action-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,99,217,0.1);
  border-radius: 50%;
}
.hibp-action-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.hibp-action-item p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── ERRORS CARD ── */
.hibp-errors-card {
  border-color: rgba(255,193,7,0.15);
}
.hibp-error-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.hibp-error-item:last-child {
  border-bottom: none;
}
.hibp-error-item strong {
  color: var(--color-suspicious);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hibp-hero {
    padding: 2rem 1.5rem;
  }
  .hibp-hero-score {
    font-size: 3rem;
  }
  .hibp-hero-title {
    font-size: 1.4rem;
  }
  .hibp-two-col {
    grid-template-columns: 1fr;
  }
  .hibp-sources-grid {
    grid-template-columns: 1fr;
  }
  .hibp-actions-grid {
    grid-template-columns: 1fr;
  }
  .hibp-contrib-row {
    grid-template-columns: 120px 1fr 50px;
  }
  .hibp-detail-card {
    padding: 1.25rem;
  }
  .hibp-overview-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .hibp-overview-left {
    justify-content: center;
  }
  .view-full-report-btn {
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .hibp-hero {
    padding: 1.5rem 1rem;
  }
  .hibp-hero-score {
    font-size: 2.5rem;
  }
  .hibp-hero-title {
    font-size: 1.2rem;
  }
  .hibp-hero-desc {
    font-size: 0.9rem;
  }
  .hibp-detail-card {
    padding: 1rem;
  }
  .hibp-detail-title {
    font-size: 1.1rem;
  }
}

/* ============ RESULTS ACTIONS ============ */

.results-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(11, 99, 217, 0.15);
  justify-content: center;
}

.btn-export-pdf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #0B63D9 0%, #0077D9 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(11, 99, 217, 0.25);
}

.btn-export-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11, 99, 217, 0.35);
  background: linear-gradient(135deg, #0050C0 0%, #0055BB 100%);
}

.btn-export-pdf:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(11, 99, 217, 0.2);
}

.btn-export-pdf svg {
  width: 18px;
  height: 18px;
}

/* ============ SCAN HISTORY SECTION ============ */

.scan-history-section {
  background: linear-gradient(135deg, rgba(11, 99, 217, 0.04) 0%, rgba(0, 183, 217, 0.02) 100%);
  padding: 3rem 0;
  border-top: 1px solid rgba(11, 99, 217, 0.15);
}

.history-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.history-header h2 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.history-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.scan-history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.history-card {
  background: var(--card-bg);
  border: 1px solid rgba(11, 99, 217, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: slideIn 0.4s ease-out;
}

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

.history-card:hover {
  border-color: rgba(11, 99, 217, 0.5);
  box-shadow: 0 8px 24px rgba(11, 99, 217, 0.2);
  transform: translateY(-5px);
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.history-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(11, 99, 217, 0.1);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.history-badge.safe {
  background: rgba(0, 255, 136, 0.15);
  color: var(--color-safe);
}

.history-badge.warning {
  background: rgba(255, 193, 7, 0.15);
  color: var(--color-suspicious);
}

.history-badge.malicious {
  background: rgba(255, 77, 77, 0.15);
  color: var(--color-malicious);
}

.history-status-icon {
  width: 16px;
  height: 16px;
}

.history-type-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: rgba(11, 99, 217, 0.15);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-blue);
}

.history-card-value {
  word-break: break-all;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(11, 99, 217, 0.05);
  border-radius: 6px;
  border-left: 3px solid var(--primary-blue);
}

.history-card-issues {
  margin-bottom: 1rem;
}

.history-issues-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.history-issues-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.history-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(11, 99, 217, 0.15);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.history-time {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.history-actions {
  display: flex;
  gap: 0.5rem;
}

.history-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-delete-btn:hover {
  color: var(--color-malicious);
}

.history-delete-btn svg {
  width: 16px;
  height: 16px;
}

.history-export-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0.25rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-export-btn:hover {
  color: var(--primary-dark);
  transform: scale(1.15);
}

.history-export-btn svg {
  width: 16px;
  height: 16px;
}

.history-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.history-empty-state svg {
  opacity: 0.5;
  margin-bottom: 1rem;
  stroke-width: 1.5;
}

.history-empty-state p {
  margin: 0;
  font-size: 0.95rem;
}

/* ============ RESULTS SECTION CLOSING ANIMATION ============ */

.results-section.closing {
  animation: slideUp 0.4s ease-in;
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
    max-height: 1000px;
  }
  to {
    opacity: 0;
    transform: translateY(-30px);
    max-height: 0;
  }
}

/* Mobile responsive scan history */
@media (max-width: 768px) {
  .scan-history-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .history-card {
    padding: 1rem;
  }

  .history-header h2 {
    font-size: 1.5rem;
  }

  /* Responsive Table on Mobile */
  #scan-results-table th,
  #scan-results-table td {
    padding: 8px 10px;
    font-size: 0.85rem;
    height: 45px;
  }

  .action-btn {
    padding: 5px 8px;
    font-size: 0.75rem;
    margin-right: 4px;
  }

  .table-container {
    max-height: calc(5 * 45px + 45px);
  }
}

@media (max-width: 480px) {
  /* Mobile Table Styles */
  #scan-results-table th,
  #scan-results-table td {
    padding: 6px 8px;
    font-size: 0.75rem;
    height: 40px;
  }

  .action-btn {
    padding: 4px 6px;
    font-size: 0.7rem;
    margin-right: 3px;
  }

  .table-container {
    max-height: calc(4 * 40px + 40px);
  }
}


/* ==================== CYBER HERO SIMULATOR ==================== */
.simulator-main { padding: 4rem 2rem; min-height: calc(100vh - 80px); }
.simulator-container { max-width: 800px; margin: 0 auto; position: relative; }

.simulator-header { text-align: center; margin-bottom: 2rem; }
.simulator-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.text-gradient { background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #38bdf8 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.simulator-sub { color: rgba(255,255,255,0.5); font-size: 1rem; margin-bottom: 2rem; }

.progress-container { width: 100%; height: 6px; background: rgba(255,255,255,0.05); border-radius: 10px; margin-bottom: 1rem; position: relative; }
.progress-bar { height: 100%; background: var(--primary-blue, #0B63D9); border-radius: 10px; transition: width 0.3s ease; }
.progress-text { position: absolute; right: 0; top: 12px; font-size: 0.75rem; color: rgba(255,255,255,0.4); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.simulator-card { background: var(--card-bg, #0f0f10); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 2rem; position: relative; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.25); }

.sim-email-client { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; color: var(--text-primary, #fff); padding: 1.75rem; margin-bottom: 2rem; box-shadow: inset 0 0 20px rgba(0,0,0,0.2); }
.sim-email-header { border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.sim-sender-info { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.sim-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #0B63D9 0%, #00B7D9 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2rem; box-shadow: 0 4px 10px rgba(11,99,217,0.3); }
.sim-meta { display: flex; flex-direction: column; gap: 2px; }
.sim-sender { font-weight: 600; font-size: 0.95rem; color: var(--text-primary, #fff); }
.sim-sender span.highlight-hover { color: var(--text-muted, #999); font-weight: 400; font-family: monospace; font-size: 0.85rem; margin-left: 4px; }
.sim-sender span.highlight-hover:hover { text-decoration: underline; color: var(--primary-blue, #0B63D9); cursor: pointer; }
.sim-to { font-size: 0.8rem; color: var(--text-muted, #999); }
.sim-date { color: rgba(255,255,255,0.3); margin-left: 5px; font-weight: 500; }
.sim-subject { font-size: 1.3rem; font-weight: 700; color: var(--text-primary, #fff); margin-top: 0.5rem; letter-spacing: -0.02em; }
.sim-email-body { font-size: 0.95rem; line-height: 1.7; color: rgba(255,255,255,0.8); }

.sim-actions { text-align: center; }
.sim-question { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.5rem; color: #fff; }
.sim-buttons { display: flex; justify-content: center; gap: 1rem; }
.btn-sim { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 2rem; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; border: 2px solid transparent; }
.btn-safe { background: rgba(0,255,136,0.1); color: #00ff88; border-color: rgba(0,255,136,0.2); }
.btn-safe:hover { background: rgba(0,255,136,0.2); border-color: #00ff88; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,255,136,0.2); }
.btn-phishing { background: rgba(255,77,77,0.1); color: #ff4d4d; border-color: rgba(255,77,77,0.2); }
.btn-phishing:hover { background: rgba(255,77,77,0.2); border-color: #ff4d4d; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(255,77,77,0.2); }

/* Overlays */
.sim-result-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,15,16,0.95); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 10; border-radius: 16px; backdrop-filter: blur(5px); }
.sim-result-overlay.active { opacity: 1; pointer-events: all; }
.sim-result-card { background: #1a1a1c; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 2.5rem; max-width: 500px; text-align: center; transform: translateY(20px); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.sim-result-overlay.active .sim-result-card { transform: translateY(0); }
.sim-result-card.correct { border-color: rgba(0,255,136,0.3); box-shadow: 0 0 30px rgba(0,255,136,0.1); }
.sim-result-card.incorrect { border-color: rgba(255,77,77,0.3); box-shadow: 0 0 30px rgba(255,77,77,0.1); }

.sim-result-icon { width: 60px; height: 60px; margin: 0 auto 1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.correct .sim-result-icon { background: rgba(0,255,136,0.1); color: #00ff88; }
.incorrect .sim-result-icon { background: rgba(255,77,77,0.1); color: #ff4d4d; }
.sim-result-icon svg { width: 30px; height: 30px; }

.sim-result-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; }
.correct .sim-result-title { color: #00ff88; }
.incorrect .sim-result-title { color: #ff4d4d; }

.sim-result-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; margin-bottom: 1.5rem; text-transform: uppercase; }
.sim-result-explanation { font-size: 0.95rem; line-height: 1.6; color: rgba(255,255,255,0.7); margin-bottom: 2rem; background: rgba(255,255,255,0.03); padding: 1rem; border-radius: 8px; border-left: 3px solid var(--primary-blue, #0B63D9); text-align: left; }
.sim-next-btn { width: 100%; padding: 0.8rem; }

/* Final Score View */
.simulator-final { text-align: center; }
.sim-final-card { background: var(--card-bg, #0f0f10); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 3rem; max-width: 500px; margin: 0 auto; box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
.sim-final-title { font-size: 2rem; font-weight: 800; margin-bottom: 2rem; color: #fff; }
.sim-score-circle { width: 150px; margin: 0 auto 1.5rem; }
.circular-chart { display: block; margin: 0 auto; max-width: 80%; max-height: 250px; }
.circle-bg { fill: none; stroke: rgba(255,255,255,0.05); stroke-width: 2.5; }
.circle { fill: none; stroke-width: 2.5; stroke-linecap: round; animation: progress 1s ease-out forwards; }
@keyframes progress { 0% { stroke-dasharray: 0 100; } }
.percentage { fill: #fff; font-family: 'Inter', sans-serif; font-size: 0.5em; text-anchor: middle; font-weight: 700; }
.sim-rank { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.sim-final-desc { color: rgba(255,255,255,0.5); font-size: 1rem; margin-bottom: 2.5rem; }
.sim-final-actions { display: flex; gap: 1rem; justify-content: center; }
.sim-final-actions .btn { flex: 1; padding: 0.8rem; }

@media (max-width: 768px) {
  .simulator-main { padding: 2rem 1rem; }
  .simulator-card { padding: 1.25rem; border-radius: 12px; }
  .sim-email-client { padding: 1.25rem; }
  .sim-buttons { flex-direction: column; gap: 0.75rem; }
  .sim-buttons .btn-sim { width: 100%; justify-content: center; }
  .sim-subject { font-size: 1.15rem; }
  .simulator-title { font-size: 2rem; }
  .sim-result-card { padding: 1.5rem; width: 90%; }
}

/* ============================================================
   MOBILE RESPONSIVE NAVIGATION
   ============================================================ */

/* Hamburger Toggle Button - hidden on desktop */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1002;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(255,255,255,0.06);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

/* Hamburger → X animation when menu is open */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Overlay/Backdrop */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  display: block;
  opacity: 1;
}

/* ─── Mobile Breakpoint ─── */
@media (max-width: 768px) {

  /* Show hamburger button */
  .mobile-menu-toggle {
    display: flex;
    order: 3;
  }

  /* Rearrange header grid for mobile */
  .header-container {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "logo actions toggle";
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }

  /* Place hamburger in grid */
  .mobile-menu-toggle {
    grid-area: toggle;
  }

  /* Mobile nav drawer - slides down from header */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(8, 8, 12, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    z-index: 999;
    padding: 76px 1.25rem 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s ease,
                visibility 0.35s ease;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    max-height: 85vh;
    overflow-y: auto;
  }

  /* Open state */
  nav.mobile-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Stack nav links vertically */
  .nav-links {
    flex-direction: column;
    gap: 0.25rem;
    align-items: stretch;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 10px;
    width: 100%;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(255,255,255,0.06);
  }

  /* Mobile dropdown - inline expand instead of absolute */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    margin: 0.25rem 0 0 0;
    padding: 0.25rem 0.5rem;
    min-width: auto;
    backdrop-filter: none;
    display: none;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown-menu a {
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
  }

  /* Hide auth buttons text, keep compact */
  .header-actions {
    gap: 0.5rem;
  }

  .auth-buttons .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }

  /* Reduce body top padding for smaller header */
  body {
    padding-top: 68px;
  }

  /* Prevent body scroll when menu is open */
  body.mobile-menu-open {
    overflow: hidden;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .header-container {
    padding: 0.45rem 0.75rem;
  }

  .brand-logo .logo-text {
    font-size: 1.05rem;
  }

  .auth-buttons .btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
  }
}
