/* ═══ LOADING SCREEN ═══ */
.loading-screen {
    position: fixed;
    inset: 0;
    background: #0a0e17;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
}
.loading-screen.fade-out { opacity: 0; pointer-events: none; }
.loading-canvas { position: absolute; inset: 0; }
.loading-content {
    position: relative; z-index: 2;
    text-align: center;
    color: white;
}
.loading-content img { height: 36px; filter: invert(1) brightness(2); margin-bottom: 24px; }
.loading-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px; font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.95);
}
.loading-sub {
    font-size: 13px; font-weight: 400;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 40px;
}
.loading-bar-wrap {
    width: 200px; height: 2px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}
.loading-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #4a9eff, #7bb8ff);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.loading-stat {
    margin-top: 20px;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    font-variant-numeric: tabular-nums;
}

/* ═══ CITATOR ═══ */
.citator { }
.citator-search-wrap {
    display: flex; gap: 12px; margin-bottom: 20px;
}
.citator-input {
    flex: 1; padding: 12px 16px; border: 2px solid var(--border);
    border-radius: 4px; font-size: 15px; font-family: 'Lora', Georgia, serif;
    outline: none; transition: border-color 0.15s;
}
.citator-input:focus { border-color: var(--accent); }
.citator-btn {
    padding: 12px 24px; background: var(--accent); color: white; border: none;
    border-radius: 4px; font-size: 14px; font-weight: 600; font-family: inherit;
    cursor: pointer;
}
.citator-btn:hover { background: #15304d; }
.citator-result {
    background: var(--white); border: 1px solid var(--border); border-radius: 4px;
    overflow: hidden;
}
.citator-header {
    padding: 24px 28px; border-bottom: 1px solid var(--border);
}
.citator-cite {
    font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700;
    color: var(--accent); margin-bottom: 4px;
}
.citator-case-title {
    font-size: 15px; font-weight: 600; color: var(--dark); margin-bottom: 8px;
}
.citator-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.citator-badge {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; padding: 6px 14px;
    border-radius: 4px;
}
.citator-badge.cited-by { background: #e8f5e9; color: #2e7d32; }
.citator-badge.cites { background: var(--accent-light); color: var(--accent); }
.citator-badge .badge-num {
    font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700;
}
.citator-section {
    padding: 20px 28px; border-bottom: 1px solid var(--border-light);
}
.citator-section h4 {
    font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700;
    color: var(--black); margin-bottom: 14px;
}
.citator-case-row {
    display: flex; align-items: baseline; gap: 12px;
    padding: 8px 0; border-bottom: 1px solid var(--border-light);
    cursor: pointer; transition: background 0.1s;
}
.citator-case-row:hover { background: var(--accent-light); margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.citator-case-row:last-child { border-bottom: none; }
.citator-row-cite { font-family: 'Lora', serif; font-weight: 600; color: var(--accent); font-size: 14px; white-space: nowrap; }
.citator-row-title { font-size: 13px; color: var(--mid); flex: 1; }
.citator-row-date { font-size: 12px; color: var(--light-text); white-space: nowrap; }
.citator-top-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px;
    margin-top: 16px;
}
.citator-top-card {
    background: var(--white); border: 1px solid var(--border); border-radius: 4px;
    padding: 16px 20px; cursor: pointer; transition: box-shadow 0.15s;
    display: flex; gap: 14px; align-items: flex-start;
}
.citator-top-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.citator-top-rank {
    font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700;
    color: var(--accent); min-width: 36px; text-align: center;
}
.citator-top-info { flex: 1; }
.citator-top-cite { font-family: 'Lora', serif; font-weight: 600; color: var(--accent); font-size: 14px; }
.citator-top-title { font-size: 12px; color: var(--mid); margin-top: 2px; }
.citator-top-count { font-size: 12px; font-weight: 600; color: var(--green); margin-top: 4px; }

/* ═══ FOOTER ═══ */
.site-footer {
    background: var(--black);
    color: rgba(255,255,255,0.4);
    padding: 28px 36px;
    font-size: 12px;
    margin-left: var(--sidebar-w);
}
.site-footer strong { color: rgba(255,255,255,0.7); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
    .sidebar { width: 60px; }
    .sidebar-nav-item span:not(.nav-icon) { display: none; }
    .sidebar-search, .sidebar-filters, .sidebar-section-label { display: none; }
    .sidebar-nav-item { padding: 14px 0; justify-content: center; }
    .sidebar-nav-item .nav-badge { display: none; }
    .main-content { margin-left: 60px; }
    .site-footer { margin-left: 60px; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .charts-row { grid-template-columns: 1fr; }
    .modal-fields { grid-template-columns: 1fr 1fr; }
}
