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

/* ── Animations ─────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 5px rgba(0, 232, 162, 0.15); } 50% { box-shadow: 0 0 20px rgba(0, 232, 162, 0.25); } }

.sync-icon.spinning { animation: spin 1s linear infinite; }

/* ── Card Animations ────────────────────────── */
.card-animate {
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.card-animate:nth-child(1) { animation-delay: 0.02s; }
.card-animate:nth-child(2) { animation-delay: 0.06s; }
.card-animate:nth-child(3) { animation-delay: 0.10s; }
.card-animate:nth-child(4) { animation-delay: 0.14s; }
.card-animate:nth-child(5) { animation-delay: 0.18s; }
.card-animate:nth-child(6) { animation-delay: 0.22s; }

/* ── Glass Card ─────────────────────────────── */
.glass {
    background: linear-gradient(135deg, rgba(30, 34, 53, 0.7), rgba(23, 26, 45, 0.5));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.glass:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(30, 34, 53, 0.85), rgba(23, 26, 45, 0.6));
}

/* ── Stat Card Glow ─────────────────────────── */
.stat-glow-green { box-shadow: inset 0 1px 0 rgba(0, 232, 162, 0.1), 0 0 0 1px rgba(0, 232, 162, 0.06); }
.stat-glow-green:hover { box-shadow: inset 0 1px 0 rgba(0, 232, 162, 0.15), 0 0 30px rgba(0, 232, 162, 0.08), 0 0 0 1px rgba(0, 232, 162, 0.12); }
.stat-glow-yellow { box-shadow: inset 0 1px 0 rgba(255, 177, 0, 0.1), 0 0 0 1px rgba(255, 177, 0, 0.06); }
.stat-glow-yellow:hover { box-shadow: inset 0 1px 0 rgba(255, 177, 0, 0.15), 0 0 30px rgba(255, 177, 0, 0.08), 0 0 0 1px rgba(255, 177, 0, 0.12); }
.stat-glow-red { box-shadow: inset 0 1px 0 rgba(255, 77, 106, 0.1), 0 0 0 1px rgba(255, 77, 106, 0.06); }
.stat-glow-red:hover { box-shadow: inset 0 1px 0 rgba(255, 77, 106, 0.15), 0 0 30px rgba(255, 77, 106, 0.08), 0 0 0 1px rgba(255, 77, 106, 0.12); }
.stat-glow-blue { box-shadow: inset 0 1px 0 rgba(59, 130, 246, 0.1), 0 0 0 1px rgba(59, 130, 246, 0.06); }
.stat-glow-blue:hover { box-shadow: inset 0 1px 0 rgba(59, 130, 246, 0.15), 0 0 30px rgba(59, 130, 246, 0.08), 0 0 0 1px rgba(59, 130, 246, 0.12); }
.stat-glow-gray { box-shadow: inset 0 1px 0 rgba(100, 116, 139, 0.1), 0 0 0 1px rgba(100, 116, 139, 0.06); }
.stat-glow-gray:hover { box-shadow: inset 0 1px 0 rgba(100, 116, 139, 0.15), 0 0 30px rgba(100, 116, 139, 0.05), 0 0 0 1px rgba(100, 116, 139, 0.1); }

/* ── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ── Body ───────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #080a12;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 232, 162, 0.03), transparent),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(59, 130, 246, 0.02), transparent);
}

/* ── Table ──────────────────────────────────── */
.data-table tr { transition: background 0.15s ease; }
.data-table tr:hover { background: rgba(255, 255, 255, 0.02); }
.data-table th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.6);
}

/* ── Modal ──────────────────────────────────── */
#modal-overlay > div { animation: fadeUp 0.25s cubic-bezier(0.16, 1, 0.3, 1); }

/* ── Log entries ────────────────────────────── */
#sync-log > div { animation: slideIn 0.3s ease-out; }

/* ── Selection ──────────────────────────────── */
::selection { background: rgba(0, 232, 162, 0.2); color: white; }

/* ── Buttons ────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, rgba(0, 232, 162, 0.15), rgba(0, 232, 162, 0.05));
    border: 1px solid rgba(0, 232, 162, 0.2);
    color: #00e8a2;
    transition: all 0.2s;
}
.btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 232, 162, 0.25), rgba(0, 232, 162, 0.1));
    border-color: rgba(0, 232, 162, 0.35);
    box-shadow: 0 0 20px rgba(0, 232, 162, 0.1);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    transition: all 0.2s;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}
.btn-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    transition: all 0.2s;
}
.btn-blue:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.1));
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

/* ── Distribution Bar ───────────────────────── */
.dist-bar-segment {
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.dist-bar-segment:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e2235;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
}

/* ── Proxy list item ────────────────────────── */
.proxy-item {
    transition: all 0.15s ease;
}
.proxy-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

/* ── Input focus ────────────────────────────── */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(0, 232, 162, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(0, 232, 162, 0.08);
}
