/* ═══════════════════════════════════════════
   KeyRanking v1.0 — Premium Neon Dark Theme
   Matching KeySEO Crawler Design System
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-primary: #0A0A0A;
    --bg-secondary: #111111;
    --bg-card: rgba(20, 20, 20, 0.85);
    --bg-card-hover: rgba(30, 30, 30, 0.95);
    --bg-card-solid: #141414;
    --bg-surface: rgba(35, 35, 35, 0.7);
    --bg-input: rgba(12, 12, 12, 0.9);
    --bg-glass: rgba(20, 20, 20, 0.6);

    --border: rgba(60, 55, 40, 0.35);
    --border-hover: rgba(245, 166, 35, 0.4);
    --border-glow: rgba(245, 166, 35, 0.3);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;

    --accent-blue: #F5A623;
    --accent-indigo: #E09500;
    --accent-purple: #F5A623;
    --accent-green: #22c55e;
    --accent-emerald: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --accent-cyan: #F5A623;
    --accent-pink: #FFD175;
    --accent-teal: #E09500;

    --gradient-hero: linear-gradient(135deg, #F5A623, #E09500, #FFD175);
    --gradient-primary: linear-gradient(135deg, #F5A623 0%, #E09500 50%, #D4880A 100%);
    --gradient-success: linear-gradient(135deg, #22c55e, #10b981);
    --gradient-danger: linear-gradient(135deg, #ef4444, #f97316);
    --gradient-purple: linear-gradient(135deg, #F5A623, #FFD175);
    --gradient-card: linear-gradient(145deg, rgba(20, 20, 20, 0.9), rgba(30, 30, 30, 0.6));
    --gradient-ai: linear-gradient(135deg, #F5A623, #E09500, #FFD175);

    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --radius-full: 9999px;

    --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow-blue: 0 0 30px rgba(245, 166, 35, 0.15);
    --shadow-glow-purple: 0 0 30px rgba(245, 166, 35, 0.15);
    --shadow-glow-ai: 0 0 40px rgba(245, 166, 35, 0.2);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(at 20% 20%, rgba(245, 166, 35, 0.04) 0px, transparent 50%),
        radial-gradient(at 80% 80%, rgba(245, 166, 35, 0.03) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(245, 166, 35, 0.02) 0px, transparent 50%);
    background-attachment: fixed;
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.5); }

/* ═══ ANIMATIONS ═══ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 20px rgba(245, 166, 35, 0.2); } 50% { box-shadow: 0 0 40px rgba(245, 166, 35, 0.4); } }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes countUp { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes bounceIn { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); } 70% { transform: scale(0.9); } 100% { transform: scale(1); opacity: 1; } }

.fade-in { animation: fadeInUp 0.5s ease-out; }
.slide-down { animation: slideDown 0.3s ease-out; }

/* ═══ SPINNER ═══ */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

/* ═══ LAYOUT ═══ */
.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

/* ═══ HEADER ═══ */
.app-header {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-hero);
    opacity: 0.4;
}

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

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-hero);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: var(--shadow-glow-blue);
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    border-radius: inherit;
}

.logo h1 {
    font-size: 24px;
    font-weight: 900;
    background: var(--gradient-hero);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.header-right { display: flex; align-items: center; gap: 16px; }
.header-stats { display: flex; gap: 12px; }

.header-stat {
    text-align: right;
    padding: 10px 18px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.header-stat:hover { border-color: var(--border-hover); transform: translateY(-1px); }

.header-stat-value {
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ═══ TABS ═══ */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    padding: 5px;
    border-radius: var(--radius);
    margin-bottom: 28px;
    border: 1px solid var(--border);
    overflow-x: auto;
    backdrop-filter: blur(10px);
}

.tab {
    padding: 11px 22px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 7px;
    position: relative;
}

.tab:hover { color: var(--text-primary); background: var(--bg-surface); }
.tab.active { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-glow-blue); }
.tab.tab-report { background: transparent; }
.tab.tab-report.active { background: var(--gradient-success); box-shadow: 0 0 30px rgba(34, 197, 94, 0.2); }
.tab.tab-schema { background: transparent; }
.tab.tab-schema.active { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 0 30px rgba(245, 158, 11, 0.2); }

.tab-badge {
    font-size: 10px;
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    min-width: 22px;
    text-align: center;
    font-weight: 700;
}

.tab.active .tab-badge { background: rgba(255, 255, 255, 0.25); }

/* ═══ PANELS ═══ */
.panel { display: none; }
.panel.active { display: block; animation: fadeIn 0.3s ease-out; }

/* ═══ CARDS ═══ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

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

.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-lg); }

.card-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

/* ═══ CONTROL PANEL ═══ */
.control-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 28px;
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.control-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-hero);
    opacity: 0.6;
}

.control-field { flex: 1; min-width: 200px; }

.control-field label,
.control-panel>div>label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.control-input {
    width: 100%;
    padding: 13px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.control-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15), var(--shadow-glow-blue);
}

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

.control-select {
    padding: 13px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    min-width: 150px;
    transition: var(--transition);
}

.control-select:focus { outline: none; border-color: var(--accent-blue); }

/* ═══ BUTTONS ═══ */
.btn {
    padding: 13px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

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

.btn:hover::after { opacity: 1; }

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow-blue);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245, 166, 35, 0.3); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-danger { background: var(--gradient-danger); color: white; }
.btn-danger:hover { transform: translateY(-2px); }

.btn-ai {
    background: var(--gradient-ai);
    color: white;
    box-shadow: var(--shadow-glow-ai);
}

.btn-ai:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245, 166, 35, 0.4); }
.btn-ai:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-sm { padding: 7px 14px; font-size: 11px; }

/* ═══ PROGRESS ═══ */
.progress-bar {
    width: 100%;
    height: 5px;
    background: var(--bg-surface);
    border-radius: 3px;
    overflow: hidden;
    margin: 14px 0;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.5);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
    background-size: 200% 100%;
}

.crawl-status {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

/* ═══ GRID LAYOUTS ═══ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }

@media (max-width: 1200px) {
    .grid-5, .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .control-panel { flex-direction: column; }
    .control-field { min-width: 100%; }
}

/* ═══ STAT CARDS ═══ */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 18px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.5px;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 8px;
    letter-spacing: 0.8px;
    font-weight: 700;
}

/* ═══ SCORE WIDGET ═══ */
.score-widget {
    text-align: center;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--bg-card-solid);
}

.score-value {
    font-size: 36px;
    font-weight: 900;
    position: relative;
    z-index: 1;
    letter-spacing: -1px;
    font-family: 'JetBrains Mono', monospace;
}

.score-label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

.score-good .score-circle { background: var(--gradient-success); box-shadow: 0 0 30px rgba(34, 197, 94, 0.2); }
.score-good .score-value { color: var(--accent-green); }
.score-mid .score-circle { background: linear-gradient(135deg, var(--accent-orange), #ea580c); box-shadow: 0 0 30px rgba(245, 158, 11, 0.2); }
.score-mid .score-value { color: var(--accent-orange); }
.score-bad .score-circle { background: var(--gradient-danger); box-shadow: 0 0 30px rgba(239, 68, 68, 0.2); }
.score-bad .score-value { color: var(--accent-red); }

/* ═══ TABLE ═══ */
.table-wrapper { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: var(--bg-card-solid);
    z-index: 5;
}

.data-table th:hover { color: var(--accent-purple); }

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ═══ FILTER BAR ═══ */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition);
}

.filter-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.filter-pill {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-pill:hover { border-color: var(--border-hover); color: var(--text-primary); }
.filter-pill.active { background: var(--gradient-primary); color: white; border-color: transparent; }

.export-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

/* ═══ EMPTY STATE ═══ */
.empty-state {
    text-align: center;
    padding: 80px 40px;
}

.empty-state-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ═══ POSITION BADGES ═══ */
.pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.pos-top3 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; box-shadow: 0 0 15px rgba(251, 191, 36, 0.3); }
.pos-top10 { background: linear-gradient(135deg, #22c55e, #10b981); color: #fff; box-shadow: 0 0 15px rgba(34, 197, 94, 0.2); }
.pos-top20 { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
.pos-top50 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #fff; }
.pos-top100 { background: rgba(100, 116, 139, 0.3); color: var(--text-secondary); }
.pos-notranked { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); font-size: 10px; letter-spacing: 0.5px; }

/* ═══ CHANGE INDICATOR ═══ */
.change-up { color: #22c55e; font-weight: 700; }
.change-down { color: #ef4444; font-weight: 700; }
.change-stable { color: var(--text-muted); }
.change-new { color: #3b82f6; font-weight: 600; font-size: 10px; }

/* ═══ MODALS ═══ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeSlideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 16px; font-weight: 800; }
.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-surface);
    color: var(--text-muted);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { background: var(--accent-red); color: white; }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ═══ FORMS ═══ */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-textarea { resize: vertical; line-height: 1.8; }

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }

.form-hint {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 6px;
}

/* ═══ ISSUE CARDS ═══ */
.issue-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    transition: var(--transition);
}

.issue-card:hover { transform: translateX(4px); }
.issue-label { font-size: 13px; font-weight: 600; }
.issue-count { font-size: 14px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.issue-critical { background: rgba(239, 68, 68, 0.08); border-left: 3px solid var(--accent-red); }
.issue-warning { background: rgba(245, 158, 11, 0.08); border-left: 3px solid var(--accent-orange); }
.issue-info { background: rgba(59, 130, 246, 0.06); border-left: 3px solid #3b82f6; }
.issue-success { background: rgba(34, 197, 94, 0.06); border-left: 3px solid var(--accent-green); }

/* ═══ PROJECT CARD ═══ */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-hero);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover { border-color: var(--border-hover); }
.project-card:hover::before { opacity: 0.6; }

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

.project-card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.project-card-domain {
    font-size: 12px;
    color: var(--accent-cyan);
    font-weight: 600;
    margin-top: 4px;
}

.project-card-meta {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
}

.project-card-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.kw-tag {
    padding: 4px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 11px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.kw-tag:hover { border-color: var(--accent-purple); color: var(--text-primary); }

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

/* ═══ URL CELL ═══ */
.url-cell {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
    display: inline-block;
    vertical-align: middle;
}

.url-cell:hover { text-decoration: underline; }

/* ═══ CHART BAR ═══ */
.chart-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.chart-bar-label {
    min-width: 60px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

.chart-bar {
    flex: 1;
    height: 24px;
    background: var(--bg-surface);
    border-radius: var(--radius-xs);
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    border-radius: var(--radius-xs);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

.chart-bar-count {
    min-width: 30px;
    font-size: 12px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}

/* ═══ TREND MINI CHART ═══ */
.trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 40px;
    padding: 4px 0;
}

.trend-bar {
    flex: 1;
    min-width: 6px;
    border-radius: 2px 2px 0 0;
    transition: height 0.5s ease;
    cursor: pointer;
    position: relative;
}

.trend-bar:hover { opacity: 0.8; }

.trend-bar::after {
    content: attr(data-value);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.trend-bar:hover::after { opacity: 1; }

/* ═══ HISTORY TABLE ═══ */
.history-entry {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.history-entry:hover { border-color: var(--border-hover); }

.history-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.history-entry-date {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.history-entry-stats {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ═══ REPORT SECTIONS ═══ */
.report-section {
    margin-bottom: 28px;
}

.report-section-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

/* ═══ FOOTER ═══ */
.app-footer {
    text-align: center;
    padding: 40px 0 20px;
}

/* ═══ TOP 10 LIST IN MODAL ═══ */
.top10-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.top10-pos {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.top10-pos.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; }
.top10-pos.silver { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.top10-pos.bronze { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }

.top10-info { flex: 1; min-width: 0; }
.top10-url {
    font-size: 12px;
    color: var(--accent-cyan);
    word-break: break-all;
    margin-bottom: 4px;
}

.top10-title-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.top10-snippet {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.5;
}
