  /* ── Reset & Base ────────────────────────────────────────────────── */
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --bg-primary:   #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card:      #ffffff;
    --bg-input:     #f8fafc;
    --border:       #e2e8f0;
    --border-focus: #6366f1;
    --text-primary: #1e293b;
    --text-muted:   #64748b;
    --text-dim:     #475569;

    --gold:   #f59e0b;
    --gold-d: #d97706;
    --green:  #10b981;
    --green-d:#059669;
    --red:    #ef4444;
    --red-d:  #dc2626;
    --orange: #f97316;
    --blue:   #6366f1;
    --blue-d: #4f46e5;
    --purple: #8b5cf6;
    --cyan:   #0891b2;
    --teal:   #14b8a6;

    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 20px;
    --shadow:    0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.10);
    --transition: 0.2s ease;
  }

  body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
  }

  /* ── Scrollbar ───────────────────────────────────────────────────── */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg-primary); }
  ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

  /* ── Modal Overlay ───────────────────────────────────────────────── */
  #auth-modal {
    display: none;
    position: fixed; inset: 0;
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.10), rgba(6,182,212,0.08));
    backdrop-filter: blur(12px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }
  #auth-modal.active { display: flex; }
  .modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px;
    width: 440px;
    max-width: 95vw;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .modal-logo {
    text-align: center;
    margin-bottom: 28px;
  }
  .modal-logo .shield-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 12px rgba(99,102,241,0.3));
  }
  .modal-logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
  }
  .modal-logo p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 6px;
  }
  .modal-box label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    margin-top: 20px;
  }
  .modal-box label:first-of-type { margin-top: 0; }

  /* ── Forms / Inputs ──────────────────────────────────────────────── */
  input[type="text"], input[type="url"], textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 11px 16px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
  }
  input[type="text"]:focus,
  input[type="url"]:focus,
  textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  }
  input[type="text"]::placeholder, textarea::placeholder { color: #94a3b8; }
  textarea { resize: vertical; min-height: 80px; }

  /* ── Buttons ─────────────────────────────────────────────────────── */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
  }
  .btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--blue-d));
    color: #fff;
    box-shadow: 0 2px 12px rgba(99,102,241,0.25);
  }
  .btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(99,102,241,0.35);
    transform: translateY(-1px);
  }
  .btn-gold {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: #fff;
    box-shadow: 0 2px 12px rgba(99,102,241,0.25);
  }
  .btn-gold:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(99,102,241,0.35);
    transform: translateY(-1px);
  }
  .btn-ghost {
    background: var(--bg-card);
    color: var(--text-dim);
    border: 1.5px solid var(--border);
  }
  .btn-ghost:hover:not(:disabled) {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: #cbd5e1;
  }
  .btn-danger {
    background: linear-gradient(135deg, var(--red), var(--red-d));
    color: #fff;
  }
  .btn-sm { padding: 7px 14px; font-size: 12px; }
  .btn-full { width: 100%; justify-content: center; }

  /* ── Header ──────────────────────────────────────────────────────── */
  header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }
  .header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
  }
  .logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 6px rgba(99,102,241,0.3));
  }
  .logo-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.3px;
  }
  .logo-sub { font-size: 10px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.3px; }

  .header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
  }
  .status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    animation: blink 2s ease-in-out infinite;
  }
  @keyframes blink {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.4; }
  }
  #header-user {
    font-size: 12px;
    color: var(--cyan);
    display: none;
  }

  /* ── Navigation Tabs ─────────────────────────────────────────────── */
  .nav-tabs {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .tabs-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 2px;
  }
  .tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .tab-btn:hover { color: var(--text-primary); background: rgba(99,102,241,0.04); }
  .tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

  /* ── Main Content ────────────────────────────────────────────────── */
  main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 20px;
  }
  .tab-content { display: none; }
  .tab-content.active { display: block; animation: fadeIn 0.2s ease; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

  /* ── Section Header ──────────────────────────────────────────────── */
  .section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
  }
  .section-icon { font-size: 28px; }
  .section-title { font-size: 22px; font-weight: 700; color: var(--text-primary); }
  .section-sub   { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

  /* ── Search Bar ──────────────────────────────────────────────────── */
  .search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
  }
  .search-bar input { flex: 1; min-width: 200px; font-size: 14px; padding: 12px 16px; }
  .search-bar .btn { padding: 12px 24px; }

  /* ── Stats Row ───────────────────────────────────────────────────── */
  .stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }
  .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
  }
  .stat-card:hover { border-color: #cbd5e1; transform: translateY(-1px); box-shadow: var(--shadow); }
  .stat-num  { font-size: 28px; font-weight: 800; line-height: 1; }
  .stat-label{ font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
  .stat-card.total  .stat-num { color: var(--cyan); }
  .stat-card.piracy .stat-num { color: var(--red); }
  .stat-card.suspicious .stat-num { color: var(--orange); }
  .stat-card.legit  .stat-num { color: var(--green); }
  .stat-card.news   .stat-num { color: var(--blue); }
  .stat-card.time   .stat-num { color: var(--purple); font-size: 20px; }

  /* ── Progress Bar ────────────────────────────────────────────────── */
  .progress-container { margin-bottom: 24px; }
  .progress-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
  .progress-track {
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
  }
  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--purple), var(--cyan));
    background-size: 200% 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
    animation: shimmer 2s linear infinite;
  }
  @keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  .progress-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .progress-step {
    font-size: 11px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 8px;
    color: var(--text-muted);
  }
  .progress-step.active { border-color: var(--blue); color: var(--cyan); }
  .progress-step.done   { border-color: var(--green); color: var(--green); }

  /* ── Scan Queries ─────────────────────────────────────────────────── */
  .queries-section {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
  }
  .queries-title { font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
  .query-tag {
    display: inline-block;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    margin: 3px;
    font-family: monospace;
  }

  /* ── Result Cards ────────────────────────────────────────────────── */
  .results-grid { display: flex; flex-direction: column; gap: 10px; }
  .result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
  }
  .result-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
  }
  .result-card.piracy::before      { background: var(--red); }
  .result-card.suspicious::before  { background: var(--orange); }
  .result-card.legitimate::before  { background: var(--green); }
  .result-card.news::before        { background: var(--blue); }
  .result-card.unknown::before     { background: var(--text-muted); }
  .result-card:hover { border-color: #cbd5e1; transform: translateX(2px); box-shadow: var(--shadow); }
  .result-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .result-title  { font-size: 14px; font-weight: 600; color: var(--text-primary); flex: 1; min-width: 200px; }
  .result-badges { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; align-items: center; }
  .result-domain { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-family: monospace; }
  .result-url    { font-size: 11px; color: var(--blue); word-break: break-all; margin-top: 3px; }
  .result-url a  { color: inherit; text-decoration: none; }
  .result-url a:hover { text-decoration: underline; }
  .result-snippet{ font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
  .result-network{ font-size: 11px; background: #f5f3ff; border: 1px solid #ddd6fe; color: #6d28d9; border-radius: 6px; padding: 3px 8px; display: inline-block; margin-top: 6px; }

  /* ── Badges ──────────────────────────────────────────────────────── */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
  }
  .badge-piracy    { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
  .badge-suspicious{ background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
  .badge-legitimate{ background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
  .badge-news      { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
  .badge-unknown   { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }

  .badge-critical  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
  .badge-high      { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
  .badge-medium    { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
  .badge-low       { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

  /* ── Redirect Tracer ─────────────────────────────────────────────── */
  .chain-timeline { display: flex; flex-direction: column; gap: 0; }
  .chain-hop {
    display: flex;
    gap: 16px;
    position: relative;
  }
  .chain-hop-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
  }
  .hop-dot {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    z-index: 1;
  }
  .hop-dot.origin     { background: #eef2ff; border: 2px solid var(--blue);   color: var(--blue); }
  .hop-dot.url_shortener { background: #fffbeb; border: 2px solid var(--gold); color: var(--gold); }
  .hop-dot.ad_network { background: #fff7ed; border: 2px solid var(--orange); color: var(--orange); }
  .hop-dot.cloaked_redirect { background: #f5f3ff; border: 2px solid var(--purple); color: var(--purple); }
  .hop-dot.landing    { background: #fef2f2; border: 2px solid var(--red);    color: var(--red); }
  .hop-dot.timer_page { background: #ecfeff; border: 2px solid var(--cyan);   color: var(--cyan); }
  .hop-dot.cdn_embed  { background: #ecfdf5; border: 2px solid var(--green);  color: var(--green); }

  .hop-connector {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, var(--border), transparent);
    margin: 4px 0;
    min-height: 20px;
  }
  .hop-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    flex: 1;
    margin-bottom: 8px;
    transition: border-color var(--transition);
  }
  .hop-card:hover { border-color: #cbd5e1; }
  .hop-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
  .hop-url    { font-size: 13px; color: var(--text-primary); font-family: monospace; word-break: break-all; flex: 1; }
  .hop-meta   { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--text-muted); margin-top: 8px; }
  .hop-meta span { display: flex; align-items: center; gap: 4px; }
  .hop-meta .mono { font-family: monospace; color: var(--text-dim); }

  .redirect-arrow {
    text-align: center;
    font-size: 18px;
    color: var(--text-muted);
    margin: -4px 0 4px 0;
    padding-left: 40px;
  }

  .takedown-section { margin-top: 24px; }
  .takedown-title { font-size: 14px; font-weight: 600; color: var(--red); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
  .takedown-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
  .takedown-card {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 14px;
  }
  .takedown-card h4 { font-size: 13px; font-weight: 600; color: var(--red); margin-bottom: 6px; }
  .takedown-card p  { font-size: 12px; color: var(--text-muted); }
  .takedown-card a  { color: var(--blue); font-size: 12px; }

  /* ── Domain Intel ────────────────────────────────────────────────── */
  .intel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
  }
  .intel-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .intel-card-header {
    background: rgba(99,102,241,0.03);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .intel-card-body { padding: 14px 16px; }
  .intel-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(226,232,240,0.8);
  }
  .intel-row:last-child { border-bottom: none; }
  .intel-key { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
  .intel-val { font-size: 12px; color: var(--text-primary); text-align: right; word-break: break-all; font-family: monospace; }
  .intel-val.flag-red   { color: var(--red); }
  .intel-val.flag-gold  { color: var(--gold); }
  .intel-val.flag-green { color: var(--green); }

  /* ── DNS Table ───────────────────────────────────────────────────── */
  .dns-table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .dns-table th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
  .dns-table td { padding: 5px 8px; border-bottom: 1px solid rgba(226,232,240,0.6); font-family: monospace; color: var(--text-dim); }
  .dns-table tr:last-child td { border-bottom: none; }
  .dns-table tr:hover td { background: rgba(99,102,241,0.03); }

  /* ── Movie Tracker ────────────────────────────────────────────────── */
  .filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .filter-bar input { flex: 1; min-width: 180px; }
  .filter-bar select {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    min-width: 140px;
  }
  .filter-bar select:focus { border-color: var(--border-focus); }

  .movies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
  .movie-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
  }
  .movie-card::after {
    content: '';
    position: absolute; top: 0; right: 0;
    width: 4px; height: 100%;
  }
  .movie-card.risk-high::after   { background: var(--red); }
  .movie-card.risk-medium::after { background: var(--gold); }
  .movie-card.risk-low::after    { background: var(--green); }
  .movie-card:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: var(--shadow); }
  .movie-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
  .movie-hero  { font-size: 12px; color: var(--cyan); margin-bottom: 10px; }
  .movie-meta  { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
  .movie-meta span { display: flex; justify-content: space-between; }
  .movie-meta .val { color: var(--text-dim); }
  .movie-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
  .piracy-count { font-size: 14px; font-weight: 700; color: var(--red); }
  .piracy-count span { font-size: 10px; font-weight: 400; color: var(--text-muted); }

  /* ── Pattern Table ────────────────────────────────────────────────── */
  .table-container { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
  table.data-table { width: 100%; border-collapse: collapse; }
  table.data-table th {
    background: rgba(99,102,241,0.04);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }
  table.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(226,232,240,0.6);
    font-size: 13px;
    color: var(--text-dim);
  }
  table.data-table tr:last-child td { border-bottom: none; }
  table.data-table tr:hover td { background: rgba(99,102,241,0.03); }
  .mono { font-family: monospace; }
  .tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
  .tld-tag { background: #ecfeff; border: 1px solid #a5f3fc; color: #0e7490; border-radius: 4px; padding: 2px 6px; font-size: 10px; font-family: monospace; }
  .domain-tag { background: #f5f3ff; border: 1px solid #ddd6fe; color: #6d28d9; border-radius: 4px; padding: 2px 6px; font-size: 10px; font-family: monospace; }

  /* ── OTT Grid ─────────────────────────────────────────────────────── */
  .ott-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
  .ott-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: all var(--transition);
    text-align: center;
  }
  .ott-card:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: var(--shadow); }
  .ott-name  { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
  .ott-domain{ font-size: 11px; color: var(--cyan); font-family: monospace; margin-bottom: 8px; }
  .ott-count { font-size: 22px; font-weight: 800; color: var(--gold); line-height: 1; }
  .ott-count-label { font-size: 10px; color: var(--text-muted); }
  .verified-badge { display: inline-flex; align-items: center; gap: 4px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 600; margin-top: 8px; }

  /* ── Classify Result ─────────────────────────────────────────────── */
  .classify-result {
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 16px;
    display: none;
    animation: fadeIn 0.25s ease;
  }
  .classify-result.show { display: block; }
  .classify-result.legitimate { background: #ecfdf5; border: 1px solid #a7f3d0; }
  .classify-result.piracy     { background: #fef2f2; border: 1px solid #fecaca; }
  .classify-result.unknown    { background: #f8fafc; border: 1px solid #e2e8f0; }
  .classify-big { font-size: 20px; font-weight: 800; }
  .classify-result.legitimate .classify-big { color: var(--green); }
  .classify-result.piracy     .classify-big { color: var(--red); }
  .classify-result.unknown    .classify-big { color: var(--text-muted); }

  /* ── Legal Accordion ─────────────────────────────────────────────── */
  .accordion { display: flex; flex-direction: column; gap: 8px; }
  .accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .accordion-header {
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition);
    user-select: none;
  }
  .accordion-header:hover { background: rgba(99,102,241,0.03); }
  .accordion-header.open  { background: rgba(99,102,241,0.04); border-bottom: 1px solid var(--border); }
  .accordion-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
  .accordion-year  { font-size: 12px; color: var(--text-muted); }
  .accordion-arrow { font-size: 14px; color: var(--text-muted); transition: transform var(--transition); }
  .accordion-header.open .accordion-arrow { transform: rotate(180deg); }
  .accordion-body { display: none; padding: 16px 18px; }
  .accordion-body.open { display: block; }

  .law-sections { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
  .law-section-card {
    background: rgba(99,102,241,0.03);
    border: 1px solid rgba(226,232,240,0.8);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
  }
  .law-section-title { font-size: 13px; font-weight: 600; color: var(--gold); margin-bottom: 4px; }
  .law-section-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
  .law-penalties-text{ font-size: 11px; color: var(--red); margin-top: 6px; display: flex; align-items: center; gap: 4px; }

  /* ── DMCA Copy Block ─────────────────────────────────────────────── */
  .code-block {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    font-family: monospace;
    font-size: 12px;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.6;
  }
  .copy-btn-row { display: flex; justify-content: flex-end; margin-top: 10px; }

  /* ── Pattern Match Result ────────────────────────────────────────── */
  .match-result {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
    display: none;
    animation: fadeIn 0.2s ease;
  }
  .match-result.show { display: block; }

  /* ── Confidence Bar ──────────────────────────────────────────────── */
  .confidence-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
  .conf-track { flex: 1; height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; }
  .conf-fill  { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--green), var(--gold), var(--red)); transition: width 0.5s ease; }
  .conf-val   { font-size: 13px; font-weight: 700; min-width: 40px; text-align: right; }

  /* ── Toast Notifications ─────────────────────────────────────────── */
  #toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
  }
  .toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.3s ease 3.7s forwards;
    border-left: 3px solid var(--blue);
  }
  .toast.success { border-left-color: var(--green); }
  .toast.error   { border-left-color: var(--red); }
  .toast.warning { border-left-color: var(--gold); }
  @keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
  @keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

  /* ── Loading Spinner ─────────────────────────────────────────────── */
  .spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(99,102,241,0.15);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ── Empty State ─────────────────────────────────────────────────── */
  .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
  }
  .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
  .empty-text { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--text-dim); }
  .empty-sub  { font-size: 13px; }

  /* ── Footer ──────────────────────────────────────────────────────── */
  footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    margin-top: 40px;
  }
  .footer-logo  {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
  }
  .footer-tag   { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
  .footer-disc  { font-size: 11px; color: var(--text-muted); max-width: 700px; margin: 0 auto; line-height: 1.5; }
  .footer-disc span { color: var(--orange); }

  /* ── Two-column layout ───────────────────────────────────────────── */
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  @media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

  /* ── Responsive ──────────────────────────────────────────────────── */
  @media (max-width: 640px) {
    .header-inner { padding: 0 14px; }
    main { padding: 16px 14px; }
    .stats-row { grid-template-columns: repeat(3, 1fr); }
    .intel-grid { grid-template-columns: 1fr; }
    .movies-grid { grid-template-columns: 1fr; }
  }

  /* ── Glow effects ────────────────────────────────────────────────── */
  .glow-red   { box-shadow: 0 0 12px rgba(239,68,68,0.15); }
  .glow-gold  { box-shadow: 0 0 12px rgba(245,158,11,0.15); }
  .glow-green { box-shadow: 0 0 12px rgba(16,185,129,0.15); }

  /* ── Two section layout for legal ───────────────────────────────── */
  .legal-two { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
  @media (max-width: 900px) { .legal-two { grid-template-columns: 1fr; } }

  .contacts-table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .contacts-table th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 11px; padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
  .contacts-table td { padding: 7px 10px; border-bottom: 1px solid rgba(226,232,240,0.6); }
  .contacts-table tr:last-child td { border-bottom: none; }
  .contacts-table a { color: var(--blue); text-decoration: none; }
  .contacts-table a:hover { text-decoration: underline; }

  .ott-divider { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 4px; margin-top: 4px; }
  .ott-type-label { grid-column: 1 / -1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); padding: 8px 0 4px; }

  /* ── Deep Scan Threat Bar ─────────────────────────────────────────── */
  .threat-bar {
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  .threat-bar.critical { background: #fef2f2; border: 1px solid #fecaca; }
  .threat-bar.high     { background: #fff7ed; border: 1px solid #fed7aa; }
  .threat-bar.medium   { background: #fffbeb; border: 1px solid #fde68a; }
  .threat-bar.low      { background: #ecfdf5; border: 1px solid #a7f3d0; }
  .threat-label { font-size: 22px; font-weight: 900; letter-spacing: 1px; }
  .threat-bar.critical .threat-label { color: var(--red); }
  .threat-bar.high     .threat-label { color: var(--orange); }
  .threat-bar.medium   .threat-label { color: var(--gold); }
  .threat-bar.low      .threat-label { color: var(--green); }
  .threat-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 14px; }
  .threat-meta span { display: flex; align-items: center; gap: 4px; }

  .recommendation-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
  }

  .source-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
  }
  .source-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
  }
  .source-card .source-icon { font-size: 24px; margin-bottom: 6px; }
  .source-card .source-name { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
  .source-card .source-count { font-size: 26px; font-weight: 800; color: var(--red); line-height: 1; }
  .source-card .source-count.green { color: var(--green); }
  .source-card .source-count.orange { color: var(--orange); }

  /* ── Telegram Channel Cards ──────────────────────────────────────── */
  .tg-channel-card {
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 12px;
  }
  .tg-channel-name { font-weight: 700; color: var(--cyan); margin-bottom: 3px; font-family: monospace; }
  .tg-channel-link { color: var(--text-muted); font-size: 11px; }
  .tg-channel-link a { color: var(--blue); text-decoration: none; }
  .tg-channel-link a:hover { text-decoration: underline; }

  /* ── Social Platform Badges ──────────────────────────────────────── */
  .platform-reddit   { color: #ff4500; }
  .platform-twitter  { color: #1da1f2; }
  .platform-facebook { color: #1877f2; }
  .platform-telegram { color: var(--cyan); }
  .platform-discord  { color: #5865f2; }
  .platform-instagram{ color: #e1306c; }

  /* ── Responsive social tab ───────────────────────────────────────── */
  @media (max-width: 700px) {
    .social-two-col { grid-template-columns: 1fr !important; }
  }

  /* ── Production Polish ─────────────────────────────────────────── */
  .section-header {
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
  }
  .section-icon {
    font-size: 32px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    border-radius: 14px;
    flex-shrink: 0;
  }
  .section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
  }
  .section-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.4;
  }

  .search-bar input {
    font-size: 15px;
    padding: 13px 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }
  .search-bar .btn {
    padding: 13px 28px;
    font-size: 14px;
    border-radius: var(--radius);
  }

  .stat-num {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -1px;
  }
  .stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    margin-top: 6px;
  }

  .empty-state {
    padding: 64px 20px;
  }
  .empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.7;
  }
  .empty-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
  }
  .empty-sub {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
  }

  /* Header user pill */
  #header-user {
    font-size: 12px;
    color: var(--blue);
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
  }

  /* Better result card left border */
  .result-card::before { width: 4px; border-radius: 4px 0 0 4px; }

  /* Card hover lift */
  .movie-card, .ott-card, .intel-card, .hop-card, .source-card {
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
  }
  .movie-card:hover, .intel-card:hover, .hop-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
  }

  /* Progress bar refinement */
  .progress-track {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
  }
  .progress-fill { border-radius: 4px; }
  .progress-step {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
  }

  /* Filter bar polish */
  .filter-bar {
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }

  /* Code block polish */
  .code-block {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  /* Accordion polish */
  .accordion-item {
    box-shadow: var(--shadow-sm);
  }
  .accordion-title {
    font-weight: 700;
  }

  /* Table polish */
  .table-container {
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
    overflow: hidden;
  }
  table.data-table th {
    background: #f8fafc;
    font-size: 11px;
    padding: 14px 16px;
  }
  table.data-table td {
    padding: 12px 16px;
  }

  /* Confidence bar */
  .conf-track {
    background: #e2e8f0;
    border-radius: 6px;
  }

  /* Footer polish */
  footer {
    background: #ffffff;
    border-top: 1px solid var(--border);
    padding: 32px 20px;
    margin-top: 48px;
  }
  .footer-tag { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
  .footer-disc { font-size: 12px; max-width: 640px; }
  .footer-disc span { color: var(--orange); font-weight: 600; }

  /* Auth modal polish */
  .modal-box {
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
  }
  .modal-box input[type="text"] {
    font-size: 15px;
    padding: 14px 18px;
    border-radius: var(--radius);
  }

  /* Selection color */
  ::selection {
    background: rgba(99,102,241,0.15);
    color: var(--text-primary);
  }
