/* ═══════════════════════════════════════════════════════
   ObdVault — OBD2 Scanner Interface CSS
   Semi-user-friendly: readable labels, scanner aesthetic
   ═══════════════════════════════════════════════════════ */

:root {
  /* Core Palette */
  --bg-primary:    #0a0a0c;
  --bg-card:       #111116;
  --bg-panel:      #13131a;
  --bg-input:      #07070a;
  --bg-scanner:    #0c0c14;

  --border:        #2a2a38;
  --border-light:  #353548;

  /* Brand Colors */
  --orange:        #00f2ff;
  --orange-glow:   rgba(249, 107, 0, 0.35);
  --orange-dim:    rgba(249, 107, 0, 0.12);

  --blue:          #0ea5e9;
  --blue-glow:     rgba(14, 165, 233, 0.2);
  --blue-dim:      rgba(14, 165, 233, 0.08);

  --green:         #22c55e;
  --green-glow:    rgba(34, 197, 94, 0.2);
  --green-dim:     rgba(34, 197, 94, 0.08);

  --red:           #ef4444;

  /* Text */
  --text-primary:   #f0f0f5;
  --text-secondary: #9090a8;
  --text-muted:     #555568;

  /* Typography */
  --font-ui:    'Exo 2', sans-serif;
  --font-mono:  'Share Tech Mono', monospace;
  --font-hud:   'Orbitron', monospace;

  /* Misc */
  --radius-sm:  4px;
  --radius-md:  8px;
  --transition: 0.15s ease-out;
}

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

body {
  font-family: var(--font-ui);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle dot-grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Faint scanlines overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 1;   /* ← was 999; must stay below modals */
  opacity: 0.4;
}

body > * { position: relative; z-index: 1; }

a { color: #00f2ff; text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

/* ── TOP NAVIGATION ───────────────────────────────── */
#topBar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Brand */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

.brand-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.home-hint {
  font-size: 0.65rem;
  color: #00f2ff;
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.3s ease;
  font-family: var(--font-mono);
}

.brand-logo:hover .home-hint {
  opacity: 1;
  transform: translateX(0);
}

.brand-tagline {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

/* Nav Status */
.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Nav Actions Desktop */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Hide desktop auth buttons on small screens */
@media (max-width: 800px) {
  .desktop-upgrade { display: none !important; }
}
@media (max-width: 600px) {
  .nav-actions { display: none !important; }
}

/* Hamburger Btn (Mobile) */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 1rem;
}
.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
}
@media (max-width: 800px) {
  .hamburger-btn { display: flex; }
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-light);
  background: var(--blue-dim);
  border-radius: var(--radius-sm);
}

.user-badge-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.user-badge-email {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--blue);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-pill {
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--orange-dim);
  color: #00f2ff;
  border: 1px solid #00f2ff;
}

/* Affiliate Band */
.affiliate-band {
  background: #0d0d12;
  border-top: 1px solid var(--border);
  padding: 0.35rem 1.5rem;
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── FULL SCREEN NAV MENU ────────────────────────── */
.nav-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 300;
  opacity: 1;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: flex-end; /* Slides in from right */
}

.nav-menu-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.nav-menu-panel {
  width: 100%;
  max-width: 380px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-menu-overlay.hidden .nav-menu-panel {
  transform: translateX(100%);
}

.nav-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.nav-menu-title {
  color: #00f2ff;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.nav-menu-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.nav-menu-auth {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.nav-menu-user {
  background: var(--bg-input);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.nav-user-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.nav-user-email {
  font-size: 0.9rem;
  color: var(--blue);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-menu-section {
  margin-bottom: 2rem;
}

.nav-menu-section h3 {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.nav-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-menu-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.nav-menu-link:hover, .nav-menu-link:active {
  background: rgba(255, 255, 255, 0.05);
  border-color: #00f2ff;
  color: #00f2ff;
}

.nav-pro-badge {
  margin-left: auto;
  font-size: 0.55rem;
  background: #00f2ff;
  color: #000;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-weight: 800;
}

/* ── BUTTONS ──────────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-search, .btn-plan, .btn-plan--primary, .btn-plan--orange, .btn-plan--green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.btn-primary {
  background: #00f2ff;
  border-color: #00f2ff;
  color: #000;
  font-weight: 800;
}

.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
  box-shadow: 0 0 20px var(--orange-glow);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.btn-search {
  background: var(--blue);
  border-color: var(--blue);
  color: #000;
  font-weight: 800;
  padding: 0 2rem;
  font-size: 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  flex-shrink: 0;
}

.btn-search:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 20px var(--blue-glow);
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: color var(--transition);
  font-family: var(--font-ui);
}

.link-btn:hover { color: #00f2ff; }

/* ── SCANNER HERO ─────────────────────────────────── */
.scanner-hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 1.5rem 3rem;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(14,165,233,0.04) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-scanner) 100%);
}

.scan-sweep {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  box-shadow: 0 0 12px var(--blue);
  animation: sweep 4s ease-in-out infinite;
  opacity: 0.4;
  pointer-events: none;
}

@keyframes sweep {
  0%   { top: -4px; opacity: 0; }
  5%   { opacity: 0.6; }
  95%  { opacity: 0.6; }
  100% { top: 100%; opacity: 0; }
}

.scanner-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

/* Scanner Display Panel — looks like a physical device screen */
.scanner-display-panel {
  background: var(--bg-panel);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(14,165,233,0.1),
    0 24px 48px rgba(0,0,0,0.6),
    0 0 60px rgba(14,165,233,0.06);
  margin-bottom: 1.5rem;
}

.scanner-display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.2rem;
  background: #0d0d16;
  border-bottom: 1px solid var(--border);
}

.sdh-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sdh-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00f2ff;
  box-shadow: 0 0 8px #00f2ff;
  animation: blink-led 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink-led {
  0%, 90%, 100% { opacity: 1; }
  95%           { opacity: 0.2; }
}

.sdh-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sdh-version {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--green);
  letter-spacing: 0.15em;
}

.scanner-display-body {
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}

/* Hero Text */
.hero-headline {
  font-family: var(--font-hud);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  text-transform: none;
}

.highlight-orange {
  color: #00f2ff;
  text-shadow: 0 0 30px var(--orange-glow);
}

.hero-subtext {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.65;
  font-weight: 400;
}

/* ── SEARCH PANEL ─────────────────────────────────── */
.search-panel {
  position: relative;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

.search-field-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--blue);
  margin-bottom: 0.5rem;
  text-align: left;
  font-family: var(--font-mono);
}

.search-row {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--blue);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-input);
  box-shadow: 0 0 30px var(--blue-glow), inset 0 0 20px rgba(14,165,233,0.04);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.search-row:focus-within {
  border-color: #fff;
  box-shadow: 0 0 40px var(--blue-glow);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 1rem;
  gap: 0.75rem;
}

.search-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  opacity: 0.5;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 400;
  padding: 1rem 0;
  letter-spacing: 0.05em;
}

.search-input::placeholder {
  color: #2a2a38;
  font-size: 0.9rem;
}

.search-input:-webkit-autofill,
.search-input:-webkit-autofill:hover,
.search-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--bg-input) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ── SEARCH DROPDOWN ──────────────────────────────── */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0d0d16;
  border: 2px solid var(--blue);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 40;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,0.6);
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.search-dropdown-item:hover {
  background: var(--blue-dim);
}

.sdi-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #00f2ff;
  width: 5.5rem;
  flex-shrink: 0;
}

.sdi-title {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sdi-sev {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── QUICK CODE CHIPS ─────────────────────────────── */
.quick-codes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quick-codes-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.code-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #0d0d16;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.code-chip:hover {
  color: #00f2ff;
  border-color: #00f2ff;
  background: var(--orange-dim);
}

/* ── STATS ROW ────────────────────────────────────── */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem 1rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-hud);
  font-size: 1.8rem;
  font-weight: 800;
  color: #00f2ff;
  line-height: 1;
  display: block;
}

.stat-open { color: var(--green); }

.stat-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.4rem;
  font-weight: 600;
}

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

/* ── FILTER / CATEGORY BAR ────────────────────────── */
.filter-bar {
  position: sticky;
  top: 64px; /* height of navbar */
  z-index: 30;
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.filter-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.filter-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  font-family: var(--font-ui);
}

.filter-tab:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.02);
}

.filter-tab.active {
  color: #00f2ff;
  border-bottom-color: #00f2ff;
  background: var(--orange-dim);
}

.tab-icon { font-size: 0.85rem; }

.pro-tag {
  font-size: 0.5rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  background: #00f2ff;
  color: #000;
  border-radius: 3px;
  letter-spacing: 0.05em;
  margin-left: 0.2rem;
}

/* ── SECTION HEADER ───────────────────────────────── */
.section-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
}

.section-header-inner h2 {
  font-family: var(--font-hud);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.section-header-inner p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* ── RESULTS GRID ─────────────────────────────────── */
.results-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  min-height: 80vh; /* Prevents scroll-to-bottom jumping when grid empties */
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* Code Cards */
.code-card-hud {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.code-card-hud::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--border);
  transition: background var(--transition);
}

.code-card-hud:hover {
  border-color: var(--blue);
  background: #14141e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px var(--blue-glow);
}

.code-card-hud:hover::before {
  background: var(--blue);
}

.code-card-hud .code {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: #00f2ff;
  font-weight: 700;
  display: block;
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}

.code-card-hud .title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.severity-hud {
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  border: 1px solid currentColor;
}

/* ── SEVERITY LEVELS ──────────────────────────────── */
.severity--critical { color: #fff; background: rgba(239,68,68,0.2); border-color: var(--red); }
.severity--high     { color: #00f2ff; background: var(--orange-dim); border-color: #00f2ff; }
.severity--medium   { color: #0099ff; background: rgba(245,196,0,0.1); border-color: #0099ff; }
.severity--low      { color: var(--green); background: var(--green-dim); border-color: var(--green); }
.severity--info     { color: var(--blue); background: var(--blue-dim); border-color: var(--blue); }

/* ── LOADING STATE ────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2300f2ff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="12" y1="2" x2="12" y2="8"></line><line x1="12" y1="16" x2="12" y2="22"></line><line x1="2" y1="12" x2="8" y2="12"></line><line x1="16" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  animation: spin 1.2s linear infinite;
}

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

/* ── PAGINATION ───────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ── UPGRADE BANNER ───────────────────────────────── */
.upgrade-banner {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--orange-dim), transparent 60%);
  padding: 3rem 1.5rem;
  margin: 2rem 0;
}

.upgrade-banner-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.upgrade-banner-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.upgrade-banner-text {
  flex: 1;
  min-width: 200px;
}

.upgrade-banner-text h3 {
  font-family: var(--font-hud);
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.upgrade-banner-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── MODALS ───────────────────────────────────────── */
.modal-overlay:not(.hidden) {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;          /* above nav (50) and scanlines (1) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;      /* lets the overlay itself scroll if panel is too tall */
}

.modal-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;      /* hard cap — always scrollable */
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-ui);
}

.modal-close:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ── DTC DETAIL MODAL CONTENT ─────────────────────── */
.dtc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* .dtc-code-block — container for dtc code + title */

.dtc-code {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: #00f2ff;
  line-height: 1;
  display: block;
}

.dtc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.4rem;
  line-height: 1.3;
}

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

.dtc-meta-cell {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.dtc-meta-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
}

.dtc-meta-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dtc-section-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dtc-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--blue-dim);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.dtc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.dtc-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.dtc-list li .li-marker {
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-weight: 700;
}

.dtc-save-bar {
  margin-bottom: 1.5rem;
}

/* ── AUTH MODAL ───────────────────────────────────── */
.auth-modal {
  max-width: 440px !important;
}

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

.auth-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.auth-title {
  font-family: var(--font-hud);
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

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

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--red);
  font-weight: 600;
}

.auth-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-footer {
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

/* ── PRICING MODAL ────────────────────────────────── */
.pricing-modal {
  max-width: 1080px !important;
  padding: 2rem !important;
}

.pricing-inner {
  padding: 0.5rem;
}

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

.pricing-title {
  font-family: var(--font-hud);
  font-size: 1.6rem;
  color: #fff;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.pricing-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Billing Toggle */
.billing-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.billing-toggle {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
}

.billing-btn {
  padding: 0.45rem 1.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
  font-family: var(--font-ui);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.billing-btn.active {
  background: #fff;
  color: #000;
}

.billing-btn:not(.active):hover { color: var(--text-primary); }

.save-badge {
  padding: 0.1rem 0.35rem;
  background: var(--green);
  color: #000;
  font-size: 0.55rem;
  font-weight: 800;
  border-radius: 3px;
}

/* Plans Grid — always 4 columns above mobile, 2 on tablet, 1 on phone */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.plan-card--highlighted {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue-glow);
}

.plan-card--pro {
  border-color: #00f2ff;
  box-shadow: 0 0 0 1px var(--orange-glow);
}

.plan-card--shop {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green-glow);
}

.plan-recommended {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: #00f2ff;
  color: #000;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.75rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.plan-header {
  margin-bottom: 1.25rem;
  padding-top: 0.5rem;
}

.plan-badge {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.plan-badge--basic    { background: var(--blue-dim); color: var(--blue); border: 1px solid var(--blue); }
.plan-badge--standard { background: var(--blue-dim); color: var(--blue); border: 1px solid var(--blue); }
.plan-badge--pro      { background: var(--orange-dim); color: #00f2ff; border: 1px solid #00f2ff; }
.plan-badge--shop     { background: var(--green-dim); color: var(--green); border: 1px solid var(--green); }

.plan-price-row {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.plan-price {
  font-family: var(--font-hud);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.plan-period {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.plan-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.plan-features {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.plan-features li {
  font-size: 0.78rem;
  font-weight: 500;
}

.feature-on  { color: var(--text-secondary); }
.feature-off { color: var(--text-muted); }

/* Plan Buttons */
.btn-plan {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition);
  font-family: var(--font-ui);
}

.btn-plan:hover {
  border-color: var(--text-secondary);
  color: #fff;
}

.btn-plan--primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #000;
}

.btn-plan--primary:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 16px var(--blue-glow);
}

.btn-plan--orange {
  background: #00f2ff;
  border-color: #00f2ff;
  color: #000;
}

.btn-plan--orange:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 16px var(--orange-glow);
}

.btn-plan--green {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

.btn-plan--green:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 16px var(--green-glow);
}

/* ── FOOTER ───────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: #07070a;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.footer-brand-name {
  font-family: var(--font-hud);
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.footer-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-heading {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links li,
.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-bottom p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-disclaimer { font-style: italic; }

/* ── TOAST ────────────────────────────────────────── */
.toast-hud {
  background: var(--bg-panel) !important;
  border: 1px solid var(--blue) !important;
  border-radius: var(--radius-md) !important;
  color: #fff !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
  padding: 1rem 1.5rem !important;
  font-size: 0.85rem !important;
  pointer-events: auto !important;
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 768px) {
  .stats-row { flex-wrap: wrap; }
  .stat-divider { display: none; }
  .stat-item { flex: 0 0 50%; border-bottom: 1px solid var(--border); }
  .nav-status { display: none; }
  .footer-cols { grid-template-columns: 1fr; gap: 2rem; }
  .auth-buttons { grid-template-columns: 1fr; }
  .dtc-meta-row { grid-template-columns: 1fr 1fr; }
  .modal-panel { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .nav-actions .btn-primary { display: none; }
  .hero-headline { font-size: 1.5rem; }
  .scanner-display-body { padding: 1.5rem 1rem; }
  .plans-grid { grid-template-columns: 1fr; }
}

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

/* Spinner for buttons */
.spinner-sm {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Tailwind compat overrides */
/* .btn-hud — legacy HUD button wrapper (kept for JS compatibility) */
.btn-hud--primary         { background: var(--blue) !important; border-color: var(--blue) !important; color: #000 !important; }
.btn-hud--orange          { background: #00f2ff !important; border-color: #00f2ff !important; color: #000 !important; }
 
  
 / *   � " � � " � � " �   L I B R A R Y   H U B   � " � � " � � " �   * /  
 . l i b r a r y - h u b   {  
     p a d d i n g :   4 . 5 r e m   1 . 5 r e m ;  
     m a x - w i d t h :   1 2 4 0 p x ;  
     m a r g i n :   0   a u t o ;  
     p o s i t i o n :   r e l a t i v e ;  
     z - i n d e x :   1 0 ;  
 }  
  
 . h u b - h e a d e r   {  
     t e x t - a l i g n :   c e n t e r ;  
     m a r g i n - b o t t o m :   4 r e m ;  
 }  
  
 . h u b - t i t l e   {  
     f o n t - f a m i l y :   v a r ( - - f o n t - h u d ) ;  
     f o n t - s i z e :   1 . 7 5 r e m ;  
     c o l o r :   v a r ( - - y e l l o w ) ;  
     t e x t - t r a n s f o r m :   u p p e r c a s e ;  
     l e t t e r - s p a c i n g :   0 . 2 5 e m ;  
     m a r g i n - b o t t o m :   1 r e m ;  
 }  
  
 . h u b - s u b t i t l e   {  
     c o l o r :   v a r ( - - t e x t - s e c o n d a r y ) ;  
     f o n t - s i z e :   1 r e m ;  
     m a x - w i d t h :   6 5 0 p x ;  
     m a r g i n :   0   a u t o ;  
     o p a c i t y :   0 . 8 ;  
     l i n e - h e i g h t :   1 . 6 ;  
 }  
  
 . h u b - g r i d   {  
     d i s p l a y :   g r i d ;  
     g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( a u t o - f i t ,   m i n m a x ( 2 3 0 p x ,   1 f r ) ) ;  
     g a p :   2 r e m ;  
 }  
  
 . h u b - c a r d   {  
     b a c k g r o u n d :   r g b a ( 1 9 ,   1 9 ,   2 6 ,   0 . 6 ) ;  
     b a c k d r o p - f i l t e r :   b l u r ( 1 5 p x ) ;  
     - w e b k i t - b a c k d r o p - f i l t e r :   b l u r ( 1 5 p x ) ;  
     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 6 ) ;  
     b o r d e r - r a d i u s :   2 0 p x ;  
     p a d d i n g :   3 . 5 r e m   2 r e m ;  
     t e x t - a l i g n :   c e n t e r ;  
     c u r s o r :   p o i n t e r ;  
     t r a n s i t i o n :   a l l   0 . 5 s   c u b i c - b e z i e r ( 0 . 1 6 5 ,   0 . 8 4 ,   0 . 4 4 ,   1 ) ;  
     p o s i t i o n :   r e l a t i v e ;  
     o v e r f l o w :   h i d d e n ;  
     d i s p l a y :   f l e x ;  
     f l e x - d i r e c t i o n :   c o l u m n ;  
     a l i g n - i t e m s :   c e n t e r ;  
     b o x - s h a d o w :   0   1 0 p x   4 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 4 ) ;  
 }  
  
 . h u b - c a r d : : b e f o r e   {  
     c o n t e n t :   ' ' ;  
     p o s i t i o n :   a b s o l u t e ;  
     t o p :   0 ;   l e f t :   0 ;   r i g h t :   0 ;   b o t t o m :   0 ;  
     b a c k g r o u n d :   r a d i a l - g r a d i e n t ( c i r c l e   a t   t o p   r i g h t ,   r g b a ( 2 4 5 ,   1 9 6 ,   0 ,   0 . 1 5 ) ,   t r a n s p a r e n t   6 0 % ) ;  
     o p a c i t y :   0 ;  
     t r a n s i t i o n :   o p a c i t y   0 . 5 s ;  
 }  
  
 . h u b - c a r d : h o v e r   {  
     t r a n s f o r m :   t r a n s l a t e Y ( - 1 5 p x ) ;  
     b o r d e r - c o l o r :   r g b a ( 2 4 5 ,   1 9 6 ,   0 ,   0 . 4 ) ;  
     b a c k g r o u n d :   r g b a ( 2 5 ,   2 5 ,   3 5 ,   0 . 8 5 ) ;  
     b o x - s h a d o w :   0   3 0 p x   6 0 p x   - 2 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 6 ) ,   0   0   2 0 p x   r g b a ( 2 4 5 ,   1 9 6 ,   0 ,   0 . 1 ) ;  
 }  
  
 . h u b - c a r d : h o v e r : : b e f o r e   {  
     o p a c i t y :   1 ;  
 }  
  
 . h u b - c a r d - i c o n   {  
     f o n t - s i z e :   3 . 7 5 r e m ;  
     m a r g i n - b o t t o m :   2 r e m ;  
     f i l t e r :   d r o p - s h a d o w ( 0   0   2 0 p x   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 1 ) ) ;  
     t r a n s i t i o n :   t r a n s f o r m   0 . 6 s   c u b i c - b e z i e r ( 0 . 1 7 5 ,   0 . 8 8 5 ,   0 . 3 2 ,   1 . 2 7 5 ) ;  
 }  
  
 . h u b - c a r d : h o v e r   . h u b - c a r d - i c o n   {  
     t r a n s f o r m :   s c a l e ( 1 . 1 5 )   r o t a t e ( 8 d e g ) ;  
 }  
  
 . h u b - c a r d - n a m e   {  
     f o n t - f a m i l y :   v a r ( - - f o n t - h u d ) ;  
     f o n t - s i z e :   1 . 1 5 r e m ;  
     c o l o r :   # f f f ;  
     m a r g i n - b o t t o m :   1 r e m ;  
     t e x t - t r a n s f o r m :   u p p e r c a s e ;  
     l e t t e r - s p a c i n g :   0 . 1 2 e m ;  
 }  
  
 . h u b - c a r d - d e s c   {  
     f o n t - s i z e :   0 . 8 5 r e m ;  
     c o l o r :   # a 0 a 0 b 8 ;  
     l i n e - h e i g h t :   1 . 6 ;  
     m a r g i n - b o t t o m :   1 . 7 5 r e m ;  
     f l e x - g r o w :   1 ;  
 }  
  
 . h u b - c a r d - a c t i o n   {  
     f o n t - s i z e :   0 . 7 5 r e m ;  
     c o l o r :   v a r ( - - y e l l o w ) ;  
     t e x t - t r a n s f o r m :   u p p e r c a s e ;  
     l e t t e r - s p a c i n g :   0 . 1 5 e m ;  
     f o n t - w e i g h t :   7 0 0 ;  
     b o r d e r - t o p :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ;  
     p a d d i n g - t o p :   1 . 2 5 r e m ;  
     w i d t h :   1 0 0 % ;  
     d i s p l a y :   f l e x ;  
     a l i g n - i t e m s :   c e n t e r ;  
     j u s t i f y - c o n t e n t :   c e n t e r ;  
     g a p :   0 . 5 r e m ;  
 }  
  
 . h u b - c a r d - a c t i o n : : a f t e r   {  
     c o n t e n t :   ' �    ' ;  
     t r a n s i t i o n :   t r a n s f o r m   0 . 3 s ;  
 }  
  
 . h u b - c a r d : h o v e r   . h u b - c a r d - a c t i o n : : a f t e r   {  
     t r a n s f o r m :   t r a n s l a t e X ( 5 p x ) ;  
 }  
  
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   {  
     . l i b r a r y - h u b   {   p a d d i n g :   3 . 5 r e m   1 . 5 r e m ;   }  
     . h u b - g r i d   {   g r i d - t e m p l a t e - c o l u m n s :   1 f r ;   g a p :   1 . 5 r e m ;   }  
     . h u b - c a r d   {   p a d d i n g :   3 r e m   2 r e m ;   }  
     . h u b - t i t l e   {   f o n t - s i z e :   1 . 4 r e m ;   }  
 }  
 

/* ═══ PREMIUM RESULT CARDS ═══ */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  padding: 1.5rem 0;
}

.code-card-premium {
  background: rgba(19, 19, 26, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 2.25rem 1.75rem;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.code-card-premium::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 5px;
  background: #0099ff;
  opacity: 0.2;
  transition: all 0.4s;
}

.code-card-premium:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(25, 25, 35, 0.75);
  border-color: rgba(245, 196, 0, 0.35);
  box-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.7), 0 0 15px rgba(245, 196, 0, 0.1);
}

.code-card-premium:hover::before {
  opacity: 1;
  width: 7px;
}

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

.card-dtc {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.08em;
  text-shadow: 0 0 15px rgba(255,255,255,0.15);
}

.card-title-text {
  font-family: var(--font-hud);
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 1.25rem;
  line-height: 1.45;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.card-desc-preview {
  font-size: 0.85rem;
  color: #a0a0b8;
  line-height: 1.7;
  opacity: 0.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2.25rem;
}

.card-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.card-tag-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #808098;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  letter-spacing: 0.1em;
  transition: all 0.3s;
}

.code-card-premium:hover .card-tag-pill {
  border-color: rgba(245, 196, 0, 0.3);
  color: #b0b0c8;
  background: rgba(245, 196, 0, 0.08);
}

@media (max-width: 640px) {
  .results-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .code-card-premium { padding: 2rem 1.5rem; }
}
