/* ═══════════════════════════════════════════
   LA MAFIA SPY — CSS v2.0
   Dark Crimson × Gold × Glassmorphism
═══════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #06000a;
  --bg2: #0d0010;
  --card: rgba(20, 0, 10, 0.75);
  --card-hover: rgba(30, 0, 18, 0.9);
  --border: rgba(139, 0, 0, 0.2);
  --border-hov: rgba(180, 0, 0, 0.5);
  --red: #8b0000;
  --red2: #c0392b;
  --red-glow: rgba(139, 0, 0, 0.35);
  --gold: #d4af37;
  --gold2: #f0d060;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --text: #f5eded;
  --text-muted: #b09090;
  --text-dim: #7a5a5a;
  --success: #10b981;
  --warn: #d4af37;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(139, 0, 0, 0.12);
  --tr: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  background-image:
    radial-gradient(ellipse 100% 60% at 50% -5%, rgba(139, 0, 0, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 90%, rgba(100, 0, 50, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 90% 80%, rgba(70, 0, 30, 0.1) 0%, transparent 50%);
  overflow-x: hidden;
}

/* ─── SCANLINES ─────────────────────────────────── */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.06) 2px, rgba(0, 0, 0, 0.06) 4px);
  animation: scanlines-drift 8s linear infinite;
}

@keyframes scanlines-drift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 0 100px;
  }
}

/* ─── HEADER ───────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 36px;
  background: rgba(6, 0, 10, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(139, 0, 0, 0.15);
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.logo-eye {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 0 10px rgba(139, 0, 0, 0.7));
  animation: eye-pulse 4s ease-in-out infinite;
}

.logo-eye img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes eye-pulse {

  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(139, 0, 0, 0.6));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 18px rgba(180, 0, 0, 0.9));
    transform: scale(1.05);
  }
}

.logo-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--gold), var(--gold2), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ─── TABS NAV ─────────────────────────────────── */
.tabs-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
}

.tab-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(139, 0, 0, 0.08);
}

.tab-btn.active {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(139, 0, 0, 0.3);
  color: #fca5a5;
  border: 1px solid rgba(139, 0, 0, 0.4);
}

.badge.danger {
  background: var(--red);
  color: white;
  animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.4);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(139, 0, 0, 0);
  }
}

/* ─── STATUS ───────────────────────────────────── */
.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 100px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  flex-shrink: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: .5;
    transform: scale(.8)
  }
}

.header-status.offline {
  background: rgba(139, 0, 0, 0.1);
  border-color: rgba(139, 0, 0, 0.3);
  color: #fca5a5;
}

.header-status.offline .status-dot {
  background: var(--red2);
}

/* ─── CONTAINER ─────────────────────────────────── */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  position: relative;
  z-index: 1;
}

/* ─── TAB PANES ─────────────────────────────────── */
.tab-pane {
  display: none;
  animation: fadeUp 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── GLASS CARD ────────────────────────────────── */
.glass-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(24px);
  padding: 32px 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
}

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

.row-actions {
  display: flex;
  gap: 8px;
}

/* ─── SECTION TITLES ─────────────────────────────── */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #f5eded, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  -webkit-text-fill-color: unset;
  color: var(--red2);
}

.section-sub {
  color: var(--text-dim);
  font-size: 0.84rem;
}

/* ─── FORM FIELDS ────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.field-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}

.field-input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: var(--tr);
}

.field-input::placeholder {
  color: var(--text-dim);
}

.field-input:focus {
  border-color: var(--red);
  background: rgba(139, 0, 0, 0.06);
  box-shadow: 0 0 0 3px var(--red-glow);
}

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

.field-select {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.84rem;
  outline: none;
  cursor: pointer;
  transition: var(--tr);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%237a5a5a'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  padding-right: 36px;
}

.field-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.field-select option {
  background: #1a000d;
}

.field-select.mini {
  width: auto;
  padding: 8px 32px 8px 12px;
  font-size: 0.78rem;
}

.fields-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.fields-row.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.fields-row.five-col {
  grid-template-columns: repeat(5, 1fr);
}

/* ─── COPIES SLIDER ──────────────────────────────── */
.copies-group {
  margin-bottom: 26px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.slider-min,
.slider-max {
  font-size: 0.72rem;
  color: var(--text-dim);
  min-width: 18px;
}

.slider {
  -webkit-appearance: none;
  flex: 1;
  height: 5px;
  border-radius: 100px;
  background: rgba(139, 0, 0, 0.15);
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red2));
  cursor: pointer;
  box-shadow: 0 0 10px var(--red-glow);
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: transform .1s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.copies-badge {
  background: linear-gradient(135deg, var(--red), var(--red2));
  padding: 7px 14px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 70px;
  justify-content: center;
  box-shadow: 0 0 12px var(--red-glow);
}

.copies-lbl {
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.8;
}

.copies-hint {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 9px;
}

.copies-hint strong {
  color: var(--red2);
}

/* ─── FORM ACTIONS ───────────────────────────────── */
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ─── BUTTONS ────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--red), var(--red2));
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  flex: 1;
  max-width: 280px;
  box-shadow: 0 4px 20px var(--red-glow), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: .2s;
}

.btn-primary:hover::before {
  opacity: 1;
}

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

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

.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary.small {
  padding: 10px 20px;
  font-size: 0.82rem;
  max-width: none;
  flex: none;
}

.btn-icon-wrap svg {
  width: 17px;
  height: 17px;
}

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  display: none;
}

.btn-loader.spinning {
  display: block;
  animation: spin .7s linear infinite;
}

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

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr);
}

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

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.16);
  transform: translateY(-1px);
}

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
}

.btn-ghost svg {
  width: 15px;
  height: 15px;
}

.btn-ghost:hover {
  border-color: var(--border-hov);
  color: var(--text);
  background: rgba(139, 0, 0, 0.08);
}

.btn-ghost.small {
  padding: 7px 14px;
  font-size: 0.78rem;
}

/* ─── RESULTS TOOLBAR ─────────────────────────────── */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.results-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.results-count {
  font-size: 1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red2), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: rgba(139, 0, 0, 0.12);
  border: 1px solid rgba(139, 0, 0, 0.3);
  border-radius: 100px;
  color: var(--red2);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--tr);
}

.pill-link svg {
  width: 12px;
  height: 12px;
}

.pill-link:hover {
  background: rgba(139, 0, 0, 0.22);
  transform: translateY(-1px);
}

/* ─── AD CARDS GRID ──────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.results-grid.list-view {
  grid-template-columns: 1fr;
}

/* AD CARD */
.ad-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: all .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.ad-card:hover {
  border-color: var(--border-hov);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 0, 0, 0.1);
}

/* Card media */
.card-media {
  height: 180px;
  background: rgba(139, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media .no-media-icon {
  font-size: 2.5rem;
  opacity: 0.2;
}

.card-media .play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.card-media .play-badge svg {
  width: 18px;
  height: 18px;
  color: white;
  margin-left: 2px;
}

/* Card body */
.card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-page {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65%;
}

.card-status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  white-space: nowrap;
}

.card-status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.card-status-badge.inactive {
  background: rgba(100, 100, 100, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(100, 100, 100, 0.3);
}

.card-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Score bar */
.score-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.score-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-num {
  font-size: 0.82rem;
  font-weight: 800;
}

.score-bar-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 100px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width .6s ease;
}

.score-num.scaling,
.score-bar-fill.scaling {
  color: #fbbf24;
  background: linear-gradient(90deg, #b45309, #fbbf24);
}

.score-num.growing {
  color: #34d399;
}

.score-bar-fill.growing {
  background: linear-gradient(90deg, #059669, #34d399);
}

.score-num.stable {
  color: #94a3b8;
}

.score-bar-fill.stable {
  background: linear-gradient(90deg, #475569, #94a3b8);
}

.score-num.testing {
  color: #f87171;
}

.score-bar-fill.testing {
  background: linear-gradient(90deg, #991b1b, #f87171);
}

/* Trend badge */
.trend-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 100px;
}

.trend-badge.scaling {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.trend-badge.growing {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.trend-badge.stable {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.trend-badge.testing {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

/* Stats row */
.card-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
}

.stat-key {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.card-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--tr);
  font-family: inherit;
  text-decoration: none;
}

.card-btn.red {
  background: rgba(139, 0, 0, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(139, 0, 0, 0.3);
}

.card-btn.red:hover {
  background: rgba(139, 0, 0, 0.35);
}

.card-btn.gold {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.card-btn.gold:hover {
  background: rgba(212, 175, 55, 0.22);
}

.card-btn.green {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.card-btn.green:hover {
  background: rgba(16, 185, 129, 0.22);
}

.card-btn.grey {
  background: rgba(100, 100, 100, 0.12);
  color: #9ca3af;
  border: 1px solid rgba(100, 100, 100, 0.2);
}

.card-btn.grey:hover {
  background: rgba(100, 100, 100, 0.22);
}

.card-btn svg {
  width: 11px;
  height: 11px;
}

/* Platform chips */
.platform-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.platform-chip {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
}

.platform-chip.fb {
  background: rgba(59, 89, 152, 0.2);
  color: #93c5fd;
}

.platform-chip.ig {
  background: rgba(225, 48, 108, 0.15);
  color: #f9a8d4;
}

.platform-chip.ms {
  background: rgba(0, 153, 255, 0.15);
  color: #67e8f9;
}

.platform-chip.an {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
}

/* ─── WATCHLIST GRID ─────────────────────────────── */
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.folder-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.folder-tab {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--tr);
  font-family: inherit;
}

.folder-tab.active {
  background: rgba(139, 0, 0, 0.15);
  border-color: rgba(139, 0, 0, 0.4);
  color: var(--red2);
}

/* Watchlist item */
.wl-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--tr);
}

.wl-card:hover {
  border-color: var(--border-hov);
}

.wl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wl-page {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-folder-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.2);
  white-space: nowrap;
}

/* Mini sparkline */
.sparkline {
  height: 36px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.spark-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  transition: height .4s;
}

.wl-stats {
  display: flex;
  gap: 16px;
}

/* ─── ALERTS ─────────────────────────────────────── */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.alert-form {
  background: rgba(139, 0, 0, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  transition: var(--tr);
}

.alert-item:hover {
  border-color: var(--border-hov);
}

.alert-keyword {
  font-weight: 700;
  font-size: 0.9rem;
  flex: 1;
}

.alert-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  flex: 1;
}

.alert-count {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(139, 0, 0, 0.15);
  color: var(--red2);
  border: 1px solid rgba(139, 0, 0, 0.3);
  white-space: nowrap;
}

/* ─── MODAL ──────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.modal {
  background: #0f000a;
  border: 1px solid rgba(139, 0, 0, 0.3);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 760px;
  width: 100%;
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9), 0 0 50px rgba(139, 0, 0, 0.15);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp .25s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.modal.small-modal {
  max-width: 420px;
  padding: 28px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--tr);
  font-family: inherit;
}

.modal-close:hover {
  background: rgba(139, 0, 0, 0.2);
  color: white;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--gold);
}

/* Modal detail */
.modal-media {
  height: 240px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
  background: rgba(139, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-media img,
.modal-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.modal-page {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-text {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.modal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.modal-stat {
  background: rgba(139, 0, 0, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.modal-stat .val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.modal-stat .key {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-top: 3px;
}

.modal-history {
  margin-top: 20px;
}

.modal-history-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.history-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
}

.history-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  background: rgba(139, 0, 0, 0.3);
  position: relative;
  cursor: default;
}

.history-bar:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1a000d;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.65rem;
  white-space: nowrap;
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ─── EMPTY STATE ─────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  animation: fadeUp .4s ease;
}

.empty-eye {
  font-size: 3rem;
  margin-bottom: 14px;
  filter: grayscale(0.3);
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.empty-desc {
  font-size: 0.84rem;
  color: var(--text-dim);
}

/* ─── TOAST ──────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  background: #1a000d;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  transform: translateY(100px);
  opacity: 0;
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
  max-width: 340px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: rgba(16, 185, 129, .4);
  background: rgba(16, 185, 129, .08);
  color: #6ee7b7;
}

.toast.error {
  border-color: rgba(139, 0, 0, .5);
  background: rgba(139, 0, 0, .1);
  color: #fca5a5;
}

.toast.info {
  border-color: rgba(212, 175, 55, .3);
  background: rgba(212, 175, 55, .07);
  color: var(--gold);
}

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

/* ─── RESPONSIVE ────────────────────────────────── */
@media (max-width: 900px) {
  .header {
    padding: 12px 18px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .tabs-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .container {
    padding: 20px 14px 60px;
  }

  .glass-card {
    padding: 22px 18px;
  }

  .fields-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-grid {
    grid-template-columns: 1fr;
  }
}

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

  .tabs-nav {
    flex-wrap: wrap;
  }
}
/* ─── LIBRARIES SECTION ──────────────────────────── */
.libraries-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }

.library-card {
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px 20px;
  transition: var(--tr);
}
.library-card:hover { border-color: var(--border-hov); }
.lib-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.lib-label { font-weight: 800; font-size: 0.95rem; flex: 1; }
.lib-url { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.lib-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.lib-sparkline { height: 32px; display: flex; align-items: flex-end; gap: 2px; margin: 8px 0; }
.lib-spark-bar { flex: 1; border-radius: 2px 2px 0 0; min-height: 3px; background: rgba(139,0,0,0.4); }

/* ─── INSIGHTS PANEL ────────────────────────────── */
.insights-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.insight-stat {
  background: rgba(139,0,0,0.08); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; text-align: center;
}
.insight-stat .val { font-size: 1.2rem; font-weight: 900; color: var(--text); line-height: 1; }
.insight-stat .key { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-top: 4px; }

.insights-section { margin-top: 18px; }
.insights-section-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-bottom: 10px; }

.trigger-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.trigger-item { display: flex; align-items: center; gap: 6px; padding: 5px 12px; background: rgba(139,0,0,0.12); border: 1px solid rgba(139,0,0,0.25); border-radius: 100px; font-size: 0.75rem; }
.trigger-count { font-weight: 800; color: var(--red2); }

.hooks-list { display: flex; flex-direction: column; gap: 8px; }
.hook-item {
  background: rgba(212,175,55,0.05); border: 1px solid rgba(212,175,55,0.15); border-radius: 10px;
  padding: 10px 14px; font-size: 0.82rem; font-style: italic; color: var(--text-muted); position: relative;
}
.hook-item::before { content: '"'; font-size: 2rem; color: rgba(212,175,55,0.2); position: absolute; top: -2px; left: 10px; line-height: 1; }
.hook-score { font-size: 0.68rem; font-weight: 700; color: var(--gold); margin-top: 4px; display: block; }

.recommendation-box {
  background: rgba(139,0,0,0.08); border: 1px solid rgba(139,0,0,0.25); border-radius: var(--radius-sm);
  padding: 14px 18px; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 18px;
  border-left: 3px solid var(--red2);
}

/* ─── SWIPE FILE GRID ───────────────────────────── */
.swipe-filters { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.mini-input {
  flex: 1; padding: 10px 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: 0.84rem; outline: none;
  transition: var(--tr);
}
.mini-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }

.swipefile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 8px; }

.swipe-item {
  background: rgba(212,175,55,0.04); border: 1px solid rgba(212,175,55,0.12); border-radius: var(--radius-sm);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; position: relative; transition: var(--tr);
}
.swipe-item:hover { border-color: rgba(212,175,55,0.3); background: rgba(212,175,55,0.08); }
.swipe-cat-tag {
  font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 2px 8px; border-radius: 6px; align-self: flex-start;
  background: rgba(212,175,55,0.12); color: var(--gold); border: 1px solid rgba(212,175,55,0.25);
}
.swipe-text { font-size: 0.84rem; color: var(--text); line-height: 1.6; }
.swipe-source { font-size: 0.7rem; color: var(--text-dim); }
.swipe-actions { display: flex; gap: 6px; margin-top: 4px; }
.swipe-delete { position: absolute; top: 10px; right: 10px; background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.8rem; padding: 4px; opacity: 0; transition: .2s; }
.swipe-item:hover .swipe-delete { opacity: 1; }
.swipe-delete:hover { color: var(--red2); }

/* ─── CARD TRIGGERS ─────────────────────────────── */
.card-triggers { display: flex; flex-wrap: wrap; gap: 4px; }
.trigger-chip { font-size: 0.62rem; padding: 2px 7px; border-radius: 6px; background: rgba(139,0,0,0.12); color: #fca5a5; border: 1px solid rgba(139,0,0,0.2); }

/* ─── HOOK BADGE ────────────────────────────────── */
.hook-line { font-size: 0.76rem; color: var(--gold); font-style: italic; border-left: 2px solid rgba(212,175,55,0.4); padding-left: 8px; }

/* ─── RESPONSIVE UPDATES ─────────────────────────── */
@media (max-width: 1100px) { .fields-row.five-col { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .fields-row.five-col { grid-template-columns: repeat(2, 1fr); }
  .insights-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .fields-row.five-col { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════
   V2.2 REDESIGN — Cards & Modal
═══════════════════════════════════════════ */

/* ─── REDESIGNED AD CARD ─────────────────────── */
.ad-card {
  background: linear-gradient(160deg, rgba(25,0,15,0.92), rgba(12,0,8,0.97));
  border: 1px solid rgba(139,0,0,0.18);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: pointer;
  display: flex; flex-direction: column;
  box-shadow: 0 6px 28px rgba(0,0,0,0.6);
  position: relative;
}
.ad-card:hover {
  transform: translateY(-4px);
  border-color: rgba(180,0,0,0.45);
  box-shadow: 0 18px 52px rgba(0,0,0,0.75), 0 0 24px rgba(139,0,0,0.12);
}

/* media area — taller, richer */
.card-media {
  height: 210px; position: relative; overflow: hidden;
  background: #0a000a; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.card-media img { width:100%; height:100%; object-fit:cover; display:block; }
.card-media video { width:100%; height:100%; object-fit:cover; display:block; }
.card-media .no-media-icon { font-size:3rem; opacity:.2; }

/* video badge overlay */
.media-type-badge {
  position:absolute; top:10px; left:10px;
  background: rgba(0,0,0,0.75); border-radius:8px; padding:3px 8px;
  font-size:.65rem; font-weight:700; color:white; backdrop-filter:blur(4px);
  display:flex; align-items:center; gap:4px;
}
.media-type-badge.video-badge { border:1px solid rgba(251,191,36,.4); color:#fbbf24; }
.media-type-badge.image-badge { border:1px solid rgba(52,211,153,.4); color:#6ee7b7; }

/* domain tag (destination) */
.dest-domain-tag {
  position:absolute; bottom:10px; left:10px;
  background: rgba(0,0,0,0.75); border:1px solid rgba(255,255,255,.1); border-radius:8px;
  padding:3px 9px; font-size:.62rem; font-weight:700; color:var(--text-muted);
  backdrop-filter:blur(4px); display:flex; align-items:center; gap:4px; max-width:180px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* score pill on media */
.score-pill {
  position:absolute; top:10px; right:10px;
  padding:4px 10px; border-radius:12px; font-size:.72rem; font-weight:900;
  backdrop-filter:blur(8px); display:flex; align-items:center; gap:4px;
}
.score-pill.scaling { background:rgba(251,191,36,.22); border:1px solid rgba(251,191,36,.4); color:#fbbf24; }
.score-pill.growing  { background:rgba(52,211,153,.18); border:1px solid rgba(52,211,153,.35); color:#34d399; }
.score-pill.stable   { background:rgba(148,163,184,.15); border:1px solid rgba(148,163,184,.30); color:#94a3b8; }
.score-pill.testing  { background:rgba(248,113,113,.15); border:1px solid rgba(248,113,113,.30); color:#f87171; }

/* Card body redesign */
.card-body { padding:16px 18px 14px; display:flex; flex-direction:column; gap:9px; flex:1; }

.card-top-row { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.card-page { font-weight:800; font-size:.95rem; line-height:1.2; flex:1; }
.card-status-badge.active  { background:rgba(16,185,129,.12); color:#6ee7b7; border:1px solid rgba(16,185,129,.28); font-size:.62rem; font-weight:800; padding:3px 8px; border-radius:100px; white-space:nowrap; }
.card-status-badge.inactive{ background:rgba(100,100,100,.12); color:#9ca3af; border:1px solid rgba(100,100,100,.22); font-size:.62rem; font-weight:800; padding:3px 8px; border-radius:100px; white-space:nowrap; }

.hook-line { font-size:.8rem; color:var(--gold); font-style:italic; border-left:2px solid rgba(212,175,55,.4); padding:4px 10px; background:rgba(212,175,55,.04); border-radius:0 8px 8px 0; line-height:1.45; }

.card-text { font-size:.78rem; color:var(--text-muted); line-height:1.55; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* Stat bar */
.stat-bar { display:flex; gap:6px; padding:9px 0; border-top:1px solid rgba(255,255,255,.04); border-bottom:1px solid rgba(255,255,255,.04); }
.stat-item { display:flex; flex-direction:column; align-items:center; flex:1; padding:6px 4px; background:rgba(255,255,255,.02); border-radius:10px; border:1px solid rgba(255,255,255,.05); }
.stat-item .sv { font-size:.92rem; font-weight:900; color:var(--text); }
.stat-item .sk { font-size:.58rem; text-transform:uppercase; letter-spacing:.07em; color:var(--text-dim); margin-top:2px; }
.stat-item.highlight { background:rgba(139,0,0,.12); border-color:rgba(139,0,0,.22); }
.stat-item.highlight .sv { color:var(--red2); }

/* card footer row */
.card-footer { display:flex; align-items:center; justify-content:space-between; gap:6px; flex-wrap:wrap; }
.card-plat-row { display:flex; gap:4px; flex-wrap:wrap; }

.platform-chip.fb { background:rgba(59,89,152,.2); color:#93c5fd; font-size:.6rem; font-weight:700; padding:2px 7px; border-radius:6px; }
.platform-chip.ig { background:rgba(225,48,108,.15); color:#f9a8d4; font-size:.6rem; font-weight:700; padding:2px 7px; border-radius:6px; }
.platform-chip.ms { background:rgba(0,153,255,.15); color:#67e8f9; font-size:.6rem; font-weight:700; padding:2px 7px; border-radius:6px; }
.platform-chip.an { background:rgba(139,92,246,.15); color:#c4b5fd; font-size:.6rem; font-weight:700; padding:2px 7px; border-radius:6px; }

/* card action buttons */
.card-actions { display:flex; gap:5px; flex-wrap:wrap; margin-top:2px; }
.card-btn { display:inline-flex; align-items:center; gap:4px; padding:6px 11px; border-radius:10px; font-size:.7rem; font-weight:700; border:none; cursor:pointer; transition:all .15s; font-family:inherit; text-decoration:none; white-space:nowrap; }
.card-btn.red   { background:rgba(139,0,0,.2); color:#fca5a5; border:1px solid rgba(139,0,0,.3); }
.card-btn.red:hover   { background:rgba(139,0,0,.35); transform:translateY(-1px); }
.card-btn.gold  { background:rgba(212,175,55,.12); color:var(--gold); border:1px solid rgba(212,175,55,.25); }
.card-btn.gold:hover  { background:rgba(212,175,55,.22); transform:translateY(-1px); }
.card-btn.green { background:rgba(16,185,129,.12); color:#6ee7b7; border:1px solid rgba(16,185,129,.25); }
.card-btn.green:hover { background:rgba(16,185,129,.22); transform:translateY(-1px); }
.card-btn.grey  { background:rgba(100,100,100,.12); color:#9ca3af; border:1px solid rgba(100,100,100,.2); }
.card-btn.grey:hover  { background:rgba(100,100,100,.22); transform:translateY(-1px); }
.card-btn.blue  { background:rgba(59,130,246,.12); color:#93c5fd; border:1px solid rgba(59,130,246,.25); }
.card-btn.blue:hover  { background:rgba(59,130,246,.22); transform:translateY(-1px); }
.card-btn.small { padding:4px 8px; font-size:.65rem; }

/* triggers row */
.card-triggers { display:flex; flex-wrap:wrap; gap:4px; }
.trigger-chip  { font-size:.6rem; padding:2px 7px; border-radius:8px; background:rgba(139,0,0,.12); color:#fca5a5; border:1px solid rgba(139,0,0,.2); }

/* ─── FULLSCREEN MODAL REDESIGN ─────────────── */
.modal-backdrop { position:fixed; inset:0; z-index:500; background:rgba(0,0,0,.92); backdrop-filter:blur(12px); display:flex; align-items:center; justify-content:center; padding:16px; animation:fadeIn .2s ease; }
.modal { background:#0d0008; border:1px solid rgba(139,0,0,.28); border-radius:24px; padding:0; max-width:920px; width:100%; position:relative; box-shadow:0 50px 120px rgba(0,0,0,.95), 0 0 60px rgba(139,0,0,.15); max-height:95vh; overflow-y:auto; animation:slideUp .25s ease; }
.modal.small-modal { max-width:440px; padding:28px; overflow:hidden; }

/* modal creative — fullscreen at top */
.modal-creative {
  width:100%; aspect-ratio:16/9; overflow:hidden; border-radius:24px 24px 0 0;
  background:#06000a; display:flex; align-items:center; justify-content:center;
  position:relative; max-height:480px;
}
.modal-creative img, .modal-creative video { width:100%; height:100%; object-fit:contain; background:#000; }
.modal-creative .no-media-icon { font-size:4rem; opacity:.15; }

/* modal content area */
.modal-content { padding:28px 32px 28px; }
.modal-close { position:absolute; top:14px; right:14px; z-index:10; background:rgba(0,0,0,.6); border:1px solid rgba(139,0,0,.3); border-radius:50%; width:36px; height:36px; cursor:pointer; color:var(--text-muted); font-size:.9rem; display:flex; align-items:center; justify-content:center; transition:var(--tr); font-family:inherit; backdrop-filter:blur(8px); }
.modal-close:hover { background:rgba(139,0,0,.3); color:white; }

/* header row */
.modal-header { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.modal-page-name { font-size:1.3rem; font-weight:900; line-height:1.2; }
.modal-badges { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

/* modal stats grid */
.modal-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:16px 0; }
.modal-stat { background:rgba(139,0,0,.08); border:1px solid rgba(139,0,0,.18); border-radius:14px; padding:14px 10px; text-align:center; }
.modal-stat .val { font-size:1.15rem; font-weight:900; color:var(--text); }
.modal-stat .key { font-size:.6rem; text-transform:uppercase; letter-spacing:.07em; color:var(--text-dim); margin-top:3px; }
.modal-stat.gold-stat { background:rgba(212,175,55,.07); border-color:rgba(212,175,55,.2); }
.modal-stat.gold-stat .val { color:var(--gold); }
.modal-stat.green-stat { background:rgba(16,185,129,.06); border-color:rgba(16,185,129,.2); }
.modal-stat.green-stat .val { color:#6ee7b7; }

/* modal section block */
.modal-section { margin:18px 0; }
.modal-section-title { font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--text-dim); margin-bottom:10px; display:flex; align-items:center; gap:7px; }
.modal-section-title::before { content:''; display:block; width:3px; height:14px; background:var(--red2); border-radius:2px; }

/* hook box */
.modal-hook-box { background:rgba(212,175,55,.05); border:1px solid rgba(212,175,55,.15); border-left:3px solid var(--gold); border-radius:0 12px 12px 0; padding:12px 16px; font-size:.88rem; color:var(--gold); font-style:italic; line-height:1.6; }
.modal-hook-box::before { content:'"'; font-size:1.6rem; color:rgba(212,175,55,.3); line-height:.5; display:block; margin-bottom:4px; font-style:normal; }

/* ad copy text box */
.modal-ad-text { background:rgba(255,255,255,.02); border:1px solid rgba(255,255,255,.06); border-radius:12px; padding:14px 16px; font-size:.84rem; color:var(--text-muted); line-height:1.7; white-space:pre-wrap; }

/* platform chips */
.modal-platforms { display:flex; gap:6px; flex-wrap:wrap; }
.modal-platform-chip { padding:4px 12px; border-radius:8px; font-size:.72rem; font-weight:700; }

/* history bars */
.modal-history-bars { display:flex; align-items:flex-end; gap:3px; height:64px; background:rgba(255,255,255,.02); border-radius:10px; padding:6px; }
.history-bar { flex:1; border-radius:3px 3px 0 0; min-height:4px; background:rgba(139,0,0,.35); position:relative; cursor:default; transition:background .15s; }
.history-bar:hover { background:rgba(180,0,0,.7); }
.history-bar:hover::after { content:attr(data-tip); position:absolute; bottom:calc(100%+4px); left:50%; transform:translateX(-50%); background:#1a000d; border:1px solid var(--border); border-radius:8px; padding:4px 8px; font-size:.64rem; white-space:nowrap; color:var(--text); pointer-events:none; z-index:10; }

/* action buttons area */
.modal-actions { display:flex; gap:8px; flex-wrap:wrap; padding-top:18px; border-top:1px solid rgba(255,255,255,.05); margin-top:6px; }
.modal-actions .card-btn { padding:10px 18px; font-size:.8rem; }

/* similar pages panel */
.similar-panel { margin-top:16px; background:rgba(59,130,246,.05); border:1px solid rgba(59,130,246,.18); border-radius:14px; padding:16px; }
.similar-panel-title { font-size:.75rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:#93c5fd; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.similar-results { display:flex; flex-direction:column; gap:8px; }
.similar-item { display:flex; align-items:center; justify-content:space-between; gap:10px; background:rgba(255,255,255,.02); border:1px solid rgba(255,255,255,.05); border-radius:10px; padding:10px 14px; }
.similar-item-name { font-weight:700; font-size:.84rem; flex:1; }
.similar-item-meta { font-size:.7rem; color:var(--text-dim); }

/* ─── RESPONSIVE MODAL ───────────────────────── */
@media (max-width:700px) {
  .modal { max-width:100%; border-radius:16px; }
  .modal-creative { aspect-ratio:4/3; border-radius:16px 16px 0 0; }
  .modal-content { padding:18px; }
  .modal-stats { grid-template-columns:repeat(2,1fr); }
}

/* ═══════════════════════════════════════════════
   USER MENU (header avatar + dropdown)
═══════════════════════════════════════════════ */
.user-menu { position: relative; margin-left: 12px; flex-shrink: 0; }

.user-avatar-btn {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(139,0,0,0.2);
  border-radius: 50px; cursor: pointer; color: var(--text); font-family: inherit;
  transition: var(--tr);
}
.user-avatar-btn:hover { background: rgba(255,255,255,0.07); border-color: rgba(139,0,0,0.35); }

.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--red), #5a0000);
  border: 1.5px solid rgba(212,175,55,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800; color: #ffd5d5;
}
.user-avatar.large { width: 42px; height: 42px; font-size: .9rem; }

.user-info { text-align: left; }
.user-name { font-size: .78rem; font-weight: 700; line-height: 1.2; }
.user-plan { font-size: .62rem; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }

.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #0e000c; border: 1px solid rgba(139,0,0,0.3); border-radius: 16px;
  min-width: 240px; padding: 8px; z-index: 600;
  box-shadow: 0 24px 60px rgba(0,0,0,0.8);
  animation: fadeIn .15s ease;
}
.user-dropdown-user { display: flex; align-items: center; gap: 12px; padding: 12px 10px 14px; }
.user-dropdown-name { font-size: .88rem; font-weight: 700; }
.user-dropdown-email { font-size: .72rem; color: var(--text-dim); margin-top: 2px; }
.user-dropdown-divider { height: 1px; background: rgba(255,255,255,.05); margin: 4px 0 6px; }
.user-dropdown-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: transparent; border: none; border-radius: 10px; cursor: pointer;
  color: var(--text-muted); font-family: inherit; font-size: .82rem; font-weight: 600;
  transition: var(--tr); text-align: left;
}
.user-dropdown-item svg { width: 16px; height: 16px; opacity: .7; }
.user-dropdown-item:hover { background: rgba(139,0,0,0.15); color: #fca5a5; }
