/* ==========================================================================
   DrainerAudit Pro — Web3 Security Forensics Terminal Stylesheet
   ========================================================================== */

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

input, select, textarea {
  min-width: 0;
  font-family: inherit;
}

.lang-switcher {
  flex-shrink: 0;
}

.brand {
  min-width: 0;
}

.brand-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:root {
  --bg-deep: #070a12;
  --bg-card: #0d1220;
  --bg-card-sub: #12192c;
  --bg-surface: #172138;
  --border-dim: #1e2c4a;
  --border-focus: #38bdf8;
  --border-danger: rgba(239, 68, 68, 0.4);
  
  --text-main: #f1f5f9;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  
  --neon-red: #ef4444;
  --neon-red-glow: rgba(239, 68, 68, 0.25);
  --neon-yellow: #f59e0b;
  --neon-yellow-glow: rgba(245, 158, 11, 0.2);
  --neon-green: #10b981;
  --neon-green-glow: rgba(16, 185, 129, 0.2);
  --neon-cyan: #38bdf8;
  --neon-blue: #6366f1;
  --bybit-gold: #f7a600;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(239, 68, 68, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.header {
  border-bottom: 1px solid var(--border-dim);
  background: rgba(13, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(56, 189, 248, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
  flex-shrink: 0;
}

.brand-sub-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 11px;
}

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

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #f1f5f9, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  letter-spacing: 0.05em;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radar-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #34d399;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.quick-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.control-btn:hover {
  border-color: var(--neon-cyan);
  background: rgba(56, 189, 248, 0.1);
}

.lang-switcher {
  display: inline-flex;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface);
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 5px 9px;
  color: var(--text-sub);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  background: var(--neon-cyan);
  color: #041020;
  font-weight: 700;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 80px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

/* ==========================================================================
   Hero Threat Alert Banner
   ========================================================================== */
.threat-alert-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(20, 29, 51, 0.95) 100%);
  border: 1px solid var(--border-danger);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.threat-alert-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--neon-red);
  box-shadow: 0 0 10px var(--neon-red);
}

.threat-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.threat-badge-col {
  flex-shrink: 0;
}

.threat-pulse-icon {
  font-size: 32px;
  animation: alarmShake 3s ease-in-out infinite;
}

@keyframes alarmShake {
  0%, 80%, 100% { transform: scale(1); }
  85% { transform: scale(1.15) rotate(-6deg); }
  90% { transform: scale(1.15) rotate(6deg); }
  95% { transform: scale(1.15) rotate(-3deg); }
}

.threat-content-col {
  flex: 1;
  min-width: 280px;
}

.threat-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 4px;
}

.threat-desc {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.threat-cta-col {
  flex-shrink: 0;
}

.bybit-btn-pulse {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f7a600, #d97706);
  color: #0b0f19;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(247, 166, 0, 0.3);
  transition: all 0.25s ease;
}

.bybit-btn-pulse:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 166, 0, 0.45);
}

.bybit-icon {
  font-size: 20px;
}

.bybit-btn-text {
  display: flex;
  flex-direction: column;
}

.bybit-btn-text .btn-top {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.bybit-btn-text .btn-sub {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  opacity: 0.9;
}

/* ==========================================================================
   Input Card & Sample Presets
   ========================================================================== */
.input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.input-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.input-format-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-surface);
  color: var(--neon-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.mode-pills-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mode-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.mode-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mode-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-pill:hover {
  border-color: var(--neon-cyan);
  color: var(--text-main);
}

.mode-pill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.input-body-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.textarea-wrap {
  position: relative;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: border-color 0.2s ease;
}

.textarea-wrap:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.payload-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 110px;
}

.payload-textarea::placeholder {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  margin-top: 6px;
}

.payload-stat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-text-action:hover {
  color: var(--neon-red);
}

.action-btn-row {
  display: flex;
  justify-content: flex-end;
}

.btn-audit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-audit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

/* Quick Sample Presets */
.samples-wrap {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-dim);
}

.samples-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
}

.samples-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-sub);
}

.samples-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

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

.sample-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.sample-chip:hover {
  border-color: var(--neon-cyan);
  transform: translateY(-2px);
  background: var(--bg-card-sub);
}

.sample-chip.sample-danger {
  border-color: rgba(239, 68, 68, 0.3);
}

.sample-chip.sample-danger:hover {
  border-color: var(--neon-red);
  box-shadow: 0 4px 15px var(--neon-red-glow);
}

.sample-chip.sample-clean {
  border-color: rgba(16, 185, 129, 0.3);
}

.sample-chip.sample-clean:hover {
  border-color: var(--neon-green);
  box-shadow: 0 4px 15px var(--neon-green-glow);
}

.chip-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.chip-badge.red {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.chip-badge.green {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.chip-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.chip-sub {
  font-size: 0.72rem;
  color: var(--text-sub);
}

/* ==========================================================================
   Results HUD Container
   ========================================================================== */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.35s ease;
}

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

/* Verdict Banner */
.verdict-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(13, 18, 32, 0.95) 100%);
  border: 1px solid var(--neon-red);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 8px 30px var(--neon-red-glow);
  flex-wrap: wrap;
}

.verdict-banner.safe-mode {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(13, 18, 32, 0.95) 100%);
  border-color: var(--neon-green);
  box-shadow: 0 8px 30px var(--neon-green-glow);
}

.verdict-banner.suspicious-mode {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(13, 18, 32, 0.95) 100%);
  border-color: var(--neon-yellow);
  box-shadow: 0 8px 30px var(--neon-yellow-glow);
}

.verdict-banner-left {
  flex: 1;
  min-width: 280px;
}

.verdict-grade-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.verdict-icon {
  font-size: 38px;
}

.verdict-text-group {
  display: flex;
  flex-direction: column;
}

.verdict-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.verdict-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--neon-red);
}

.verdict-banner.safe-mode .verdict-title {
  color: var(--neon-green);
}

.verdict-banner.suspicious-mode .verdict-title {
  color: var(--neon-yellow);
}

.verdict-summary {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.6;
  max-width: 680px;
}

/* Radial Threat Gauge */
.verdict-score-gauge {
  flex-shrink: 0;
}

.score-radial-wrap {
  width: 120px;
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.score-circle-bar {
  fill: none;
  stroke: var(--neon-red);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 314.159;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.8s ease, stroke 0.4s ease;
}

.score-number-box {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.score-val {
  font-size: 1.7rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  line-height: 1;
}

.score-max {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.score-lbl {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--neon-red);
  margin-top: 2px;
}

/* ==========================================================================
   4 Key Forensic Pillars Grid
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
}

.metric-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.metric-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-icon {
  font-size: 18px;
}

.metric-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-sub);
}

.metric-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  align-self: flex-start;
}

.metric-status-badge .status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.badge-danger .status-indicator {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.badge-warning .status-indicator {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.badge-safe {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.badge-safe .status-indicator {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.metric-address-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-deep);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-addr-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.btn-copy-mini {
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.2s;
}

.btn-copy-mini:hover {
  color: var(--text-main);
}

.metric-number-highlight {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.danger-text {
  color: var(--neon-red);
}

.warning-text {
  color: var(--neon-yellow);
}

.safe-text {
  color: var(--neon-green);
}

.info-text {
  color: var(--neon-cyan);
}

.metric-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   Threat Checklist & Red Flags Grid
   ========================================================================== */
.forensic-breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.card-heading-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-heading-group h3, .card-heading-group h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.threat-counter-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  color: var(--neon-red);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.flags-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.flag-item {
  background: var(--bg-surface);
  border-left: 3px solid var(--neon-red);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flag-item.flag-warning {
  border-left-color: var(--neon-yellow);
}

.flag-item.flag-safe {
  border-left-color: var(--neon-green);
}

.flag-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flag-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.flag-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.flag-tag.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.flag-tag.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.flag-tag.safe {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

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

/* ==========================================================================
   Dual Grid: Decoded Tree & Exploit Simulation
   ========================================================================== */
.forensic-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 860px) {
  .forensic-dual-grid {
    grid-template-columns: 1fr;
  }
}

.forensic-subcard {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.btn-copy-mini-text {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  color: var(--text-sub);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.btn-copy-mini-text:hover {
  color: var(--text-main);
  border-color: var(--neon-cyan);
}

.tree-table-wrap {
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-top: 10px;
}

.tree-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.tree-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tree-table tr:last-child {
  border-bottom: none;
}

.tree-table td {
  padding: 10px 14px;
  vertical-align: top;
}

.tree-key {
  font-family: var(--font-mono);
  color: var(--text-sub);
  font-weight: 600;
  width: 32%;
  white-space: nowrap;
}

.tree-val {
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  word-break: break-all;
}

/* Attack Simulation Flow */
.sim-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  color: var(--neon-red);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.simulation-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.sim-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  position: relative;
}

.sim-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-sub);
  flex-shrink: 0;
}

.sim-step.active-exploit .sim-step-num {
  border-color: var(--neon-red);
  color: var(--neon-red);
  box-shadow: 0 0 8px var(--neon-red-glow);
}

.sim-step-content {
  flex: 1;
}

.sim-step-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.sim-step-desc {
  font-size: 0.75rem;
  color: var(--text-sub);
  line-height: 1.4;
}

/* ==========================================================================
   Remediation & 1-Click Action Hub
   ========================================================================== */
.remediation-section {
  background: linear-gradient(135deg, rgba(13, 18, 32, 0.95) 0%, rgba(20, 29, 51, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.remediation-header {
  margin-bottom: 20px;
}

.remediation-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.remediation-shield {
  font-size: 32px;
  line-height: 1;
}

.remediation-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.remediation-title-wrap p {
  font-size: 0.82rem;
  color: var(--text-sub);
}

.remediation-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  gap: 14px;
  transition: all 0.2s ease;
}

.action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.action-card.highlight-card {
  border-color: rgba(247, 166, 0, 0.5);
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.08) 0%, var(--bg-surface) 100%);
}

.action-card-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.action-card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.bybit-card-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--bybit-gold);
  letter-spacing: 0.06em;
}

.action-card-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.action-card-content p {
  font-size: 0.78rem;
  color: var(--text-sub);
  line-height: 1.45;
  margin-bottom: 6px;
}

.btn-action-primary {
  display: inline-block;
  background: var(--neon-cyan);
  color: #041020;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: background 0.2s;
  align-self: flex-start;
}

.btn-action-primary:hover {
  background: #7dd3fc;
}

.btn-action-secondary {
  display: inline-block;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: all 0.2s;
  align-self: flex-start;
}

.btn-action-secondary:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.btn-bybit-action {
  display: inline-block;
  background: linear-gradient(135deg, #f7a600, #d97706);
  color: #0b0f19;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  box-shadow: 0 4px 12px rgba(247, 166, 0, 0.3);
  transition: all 0.2s;
  align-self: flex-start;
}

.btn-bybit-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(247, 166, 0, 0.45);
}

.report-export-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.btn-export {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  color: var(--text-sub);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-export:hover {
  color: var(--text-main);
  border-color: var(--neon-cyan);
  background: rgba(56, 189, 248, 0.1);
}

/* ==========================================================================
   Sticky Bottom CTA Bar
   ========================================================================== */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 18, 32, 0.95);
  border-top: 1px solid rgba(247, 166, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 18px;
  z-index: 99;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.sticky-cta-bar.hidden {
  transform: translateY(100%);
}

.sticky-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.sticky-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sticky-shield {
  font-size: 20px;
}

.sticky-text {
  font-size: 0.8rem;
  color: #e2e8f0;
}

.sticky-action {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sticky-btn {
  background: linear-gradient(135deg, #f7a600, #d97706);
  color: #0b0f19;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.sticky-btn:hover {
  transform: translateY(-1px);
}

.sticky-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.2s;
}

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

/* ==========================================================================
   Portal Footer & Disclaimer
   ========================================================================== */
.portal-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-dim);
  padding: 24px 20px 48px 20px;
  background: rgba(7, 10, 18, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.portal-backlink-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

.portal-backlink {
  color: var(--neon-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.portal-backlink:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

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

.portal-sub {
  color: var(--text-sub);
}

.portal-disclaimer {
  max-width: 860px;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 10px 16px;
  background: rgba(18, 25, 44, 0.6);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Toast Notification Box
   ========================================================================== */
.toast-box {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  border: 1px solid var(--neon-cyan);
  color: #f8fafc;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 1000;
}

.toast-box.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .threat-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .verdict-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .action-btn-row {
    width: 100%;
  }
  .btn-audit {
    width: 100%;
    justify-content: center;
  }
  .report-export-bar {
    justify-content: stretch;
  }
  .btn-export {
    flex: 1;
    justify-content: center;
  }
}
