:root {
    --bg: #050307;
    --bg-soft: #0b0710;
    --panel: rgba(18, 12, 24, 0.76);
    --panel-strong: rgba(28, 17, 37, 0.9);
    --brand: #a349a4;
    --brand-hot: #d865da;
    --brand-bright: #f09df2;
    --brand-soft: #7a2e84;
    --brand-deep: #37113f;
    --text: #f4edf7;
    --muted: #b9a7c1;
    --line: rgba(211, 107, 214, 0.22);
    --ok: #57e389;
    --warn: #ff9f43;
    --bad: #ff5f7e;
    --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html {
    scrollbar-color: var(--brand) #07040a;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 8%, rgba(163, 73, 164, 0.22), transparent 28rem),
        radial-gradient(circle at 86% 28%, rgba(89, 22, 110, 0.18), transparent 30rem),
        linear-gradient(135deg, #030204 0%, #09060d 48%, #050207 100%);
    font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
}

body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: #07040a;
}

body::-webkit-scrollbar-thumb {
    border: 3px solid #07040a;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand), var(--brand-soft));
}

body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--brand-bright), var(--brand));
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -3;
    content: "";
    background-image:
        linear-gradient(rgba(163, 73, 164, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(163, 73, 164, 0.07) 1px, transparent 1px);
    background-size: 58px 58px;
    pointer-events: none;
}

button { font: inherit; cursor: pointer; }

#ambient-canvas { position: fixed; inset: 0; z-index: -4; width: 100%; height: 100%; }

.hidden { display: none !important; }

.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

/* Standardized Card (Glassmorphism) */
.card {
    position: relative;
    padding: 30px;
    overflow: hidden;
    border: 1px solid rgba(211, 107, 214, 0.23);
    border-radius: 30px;
    background:
        radial-gradient(circle at 50% 30%, rgba(240, 157, 242, 0.15), transparent 32%),
        linear-gradient(145deg, rgba(26, 17, 34, 0.93), rgba(10, 6, 14, 0.96));
    box-shadow: var(--shadow);
    transition: border-color 240ms ease, box-shadow 240ms ease;
}

.card::before {
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 28%, rgba(163, 73, 164, 0.09)),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.075), transparent 22%);
    opacity: 0.85;
}

.card:hover {
    border-color: rgba(240, 157, 242, 0.5);
    box-shadow:
        0 32px 108px rgba(0, 0, 0, 0.58),
        0 0 82px rgba(163, 73, 164, 0.2);
}

.stat-card { width: min(100%, 1000px); padding: 40px; }

/* Typography Standard */
h1 {
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 650;
    letter-spacing: -0.035em;
    text-transform: none;
    color: #f4edf7;
    text-shadow: 0 0 26px rgba(163, 73, 164, 0.24);
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    line-height: 1.15;
}

h2 {
    margin-bottom: 14px;
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.brand-text {
    color: var(--brand-bright);
    text-shadow: 0 0 24px rgba(240, 157, 242, 0.4);
}

/* Header Elements */
.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.titles { flex: 1; min-width: 0; }
.subtitle { margin: 0; color: var(--muted); font-size: 1.05rem; font-weight: 600; line-height: 1.6; }

.api-status-wrapper { flex-shrink: 0; }
.api-status {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, 0.04); padding: 10px 18px;
    border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1);
}
.status-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 10px currentColor; }
.status-dot.ok { color: var(--ok); background: var(--ok); }
.status-dot.bad { color: var(--bad); background: var(--bad); }
.status-text { font-weight: 800; font-size: 0.95rem; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.text-ok { color: var(--ok); }
.text-bad { color: var(--bad); }

/* Statistics Grid */
.general-stats {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}
.stat-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(211, 107, 214, 0.15);
    padding: 18px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.stat-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.stat-val { font-size: 1.15rem; font-weight: 900; color: var(--text); }

/* Chart Area */
.chart-wrapper {
    position: relative; z-index: 1; width: 100%; height: 400px;
    padding: 16px; background: var(--panel); border-radius: 20px;
    border: 1px solid rgba(240, 157, 242, 0.15); margin-bottom: 30px;
}

/* Standardized Buttons */
.primary, .secondary {
    position: relative; z-index: 1; min-height: 50px; border-radius: 18px; padding: 0 26px; color: #fff; font-weight: 900;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, filter 220ms ease;
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.primary {
    border: 1px solid rgba(240, 157, 242, 0.32);
    background: linear-gradient(135deg, rgba(163, 73, 164, 0.98), rgba(93, 34, 111, 0.98)),
                radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.18), transparent 55%);
    box-shadow: 0 18px 48px rgba(163, 73, 164, 0.22);
    font-size: 1.1rem;
}
.secondary {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.34);
    font-size: 1.05rem;
}
.primary:hover {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 24px 64px rgba(163, 73, 164, 0.34), 0 0 44px rgba(216, 101, 218, 0.3);
    transform: translateY(-2px);
    outline: none;
}
.secondary:hover {
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.48), 0 0 36px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    outline: none;
}
.center-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* Modals */
.modal {
    position: fixed; inset: 0; z-index: 50;
    background: var(--bg);
    background-image:
        radial-gradient(circle at 18% 8%, rgba(163, 73, 164, 0.22), transparent 28rem),
        linear-gradient(135deg, #030204 0%, #09060d 48%, #050207 100%);
    overflow-y: auto;
}
.modal-fullscreen {
    width: 100%; min-height: 100vh; padding: 40px 24px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; max-width: 900px; margin: 0 auto;
}
.modal-fullscreen h2 { color: var(--brand-bright); }
.modal-fullscreen p { position: relative; z-index: 1; margin: 0 0 20px; color: var(--muted); line-height: 1.8; font-size: 1.15rem; }
.modal-fullscreen strong { color: var(--text); font-weight: 700;}

/* Forms */
.verify-form-container { width: min(100%, 460px); display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 1; }
.input-group { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.input-group label { color: var(--muted); font-size: .86rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.input-group input {
    width: 100%; height: 54px; border: 1px solid rgba(240, 157, 242, 0.26); border-radius: 16px;
    padding: 0 16px; color: var(--text); background: rgba(255, 255, 255, 0.045); outline: none; transition: border-color .2s, box-shadow .2s;
    font-family: inherit; font-size: 1rem;
}
.input-group input:focus { border-color: rgba(240, 157, 242, 0.78); box-shadow: 0 0 0 4px rgba(216, 101, 218, 0.12); }

/* Results */
.verify-result-box {
    margin-top: 24px; padding: 24px; border-radius: 18px; width: min(100%, 460px); text-align: center;
    border: 1px solid currentColor; position: relative; z-index: 1; font-weight: 700; line-height: 1.6;
}
.res-clean { color: var(--ok); background: rgba(87, 227, 137, 0.06); }
.res-banned { color: var(--bad); background: rgba(255, 95, 126, 0.06); }
.res-linked_banned { color: var(--warn); background: rgba(255, 159, 67, 0.06); }
.res-not_found { color: var(--muted); background: rgba(255, 255, 255, 0.03); border-color: rgba(211, 107, 214, 0.25); }

@media (max-width: 768px) {
    .stat-header { flex-direction: column; }
    .api-status-wrapper { width: 100%; }
    .api-status { justify-content: center; }
    .titles h1 { font-size: 1.8rem; text-align: center; }
    .subtitle { text-align: center; }
    .general-stats { grid-template-columns: 1fr; }
    .chart-wrapper { height: 320px; }
}