:root {
    --bg-primary: #0b1020;
    --bg-secondary: #131a2f;
    --card-bg: rgba(19, 26, 47, 0.88);
    --text-main: #eaf0ff;
    --text-sub: #9fb0d9;
    --accent: #5eead4;
    --accent-2: #7c83ff;
    --danger: #ff5f6d;
    --success: #3ddc84;
    --border: rgba(159, 176, 217, 0.25);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --glow: 0 0 0 1px rgba(94, 234, 212, 0.25), 0 14px 40px rgba(94, 234, 212, 0.14),
        0 10px 28px rgba(124, 131, 255, 0.16);
    --ig: #f59e0b;
    --fb: #1877f2;
    --gh: rgba(234, 240, 255, 0.9);
    --spotify: #1db954;
}

html {
    background: #0b1020;
    height: 100%;
    overscroll-behavior-y: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 18% 12%, rgba(124, 131, 255, 0.22) 0%, rgba(124, 131, 255, 0) 45%),
        radial-gradient(circle at 78% 18%, rgba(94, 234, 212, 0.16) 0%, rgba(94, 234, 212, 0) 42%),
        radial-gradient(circle at 20% 15%, #1b2340 0%, #0b1020 52%, #090d19 100%);
    min-height: 100vh;
    line-height: 1.6;
    padding: calc(24px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right))
        calc(24px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
    -webkit-tap-highlight-color: transparent;
    background-color: #0b1020;
    position: relative;
    isolation: isolate;
}

.container h1 {
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.container p {
    font-size: clamp(0.98rem, 1.7vw, 1.05rem);
}

.container {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent-2);
    object-fit: cover;
    box-shadow: 0 0 0 6px rgba(124, 131, 255, 0.16);
    animation: avatarPulse 2.6s ease-in-out infinite;
}

.subtitle {
    color: var(--text-sub);
    margin-top: 8px;
}

.bio {
    margin-top: 14px;
    color: #d5def6;
}

.section-title {
    font-size: 1.1rem;
    margin-bottom: 14px;
    color: var(--accent);
    letter-spacing: 0.3px;
    background: linear-gradient(90deg, var(--accent), #9fb0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-actions {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.prefs {
    display: grid;
    gap: 14px;
}

.prefs-panel {
    position: fixed;
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: min(380px, calc(100vw - 24px));
    max-height: min(72vh, 560px);
    overflow: auto;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(159, 176, 217, 0.24);
    background: rgba(11, 16, 32, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.45);
    z-index: 30;
}

.prefs-panel[hidden] {
    display: none !important;
}

.settings-fab {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 46px;
    min-height: 46px;
    height: 46px;
    padding: 0;
    border-radius: 999px;
    z-index: 31;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35), 0 8px 18px rgba(94, 234, 212, 0.14);
}

.settings-fab .btn__icon {
    margin-right: 0;
}

.settings-fab.is-active {
    border-color: rgba(94, 234, 212, 0.6);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4), 0 10px 24px rgba(94, 234, 212, 0.22);
}

.prefs__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(159, 176, 217, 0.14);
    background: rgba(19, 26, 47, 0.22);
    border-radius: 14px;
    padding: 12px;
}

.prefs__controls {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.prefs__btn.is-active {
    border-color: rgba(94, 234, 212, 0.55);
    box-shadow: 0 10px 26px rgba(94, 234, 212, 0.12), 0 8px 18px rgba(124, 131, 255, 0.1);
}

.btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.14) 0%, rgba(124, 131, 255, 0.14) 100%);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px; /* touch target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.98rem;
}

.btn--primary {
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.22) 0%, rgba(124, 131, 255, 0.22) 100%);
    border-color: rgba(94, 234, 212, 0.4);
}

.btn--ghost {
    background: rgba(19, 26, 47, 0.25);
}

.btn__icon {
    display: inline-flex;
    width: 1.1em;
    justify-content: center;
    margin-right: 8px;
    transform-origin: 50% 50%;
}

.btn.is-spinning .btn__icon {
    animation: spin 900ms linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.7;
    cursor: progress;
}

.btn:focus-visible,
.social-btn:focus-visible {
    outline: 3px solid rgba(94, 234, 212, 0.55);
    outline-offset: 3px;
}

.social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-btn {
    text-decoration: none;
    color: var(--text-main);
    background: linear-gradient(135deg, #1b2340 0%, #242d52 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px; /* touch target */
}

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        border-color: rgba(94, 234, 212, 0.55);
        box-shadow: var(--glow);
        transform: translateY(-2px);
    }

    .server-card:hover {
        border-color: rgba(94, 234, 212, 0.55);
        box-shadow: var(--glow);
        transform: translateY(-2px);
    }

    .btn:hover {
        border-color: rgba(94, 234, 212, 0.6);
        box-shadow: 0 10px 26px rgba(94, 234, 212, 0.18), 0 8px 20px rgba(124, 131, 255, 0.14);
        transform: translateY(-1px);
    }

    .social-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 26px rgba(94, 234, 212, 0.18), 0 8px 20px rgba(124, 131, 255, 0.14);
        border-color: rgba(94, 234, 212, 0.65);
    }

    .social-btn.brand-ig:hover {
        border-color: color-mix(in srgb, var(--ig) 70%, transparent);
        box-shadow: 0 10px 26px color-mix(in srgb, var(--ig) 28%, transparent),
            0 8px 20px rgba(236, 72, 153, 0.16);
    }

    .social-btn.brand-fb:hover {
        border-color: color-mix(in srgb, var(--fb) 70%, transparent);
        box-shadow: 0 10px 26px color-mix(in srgb, var(--fb) 26%, transparent),
            0 8px 20px rgba(37, 99, 235, 0.12);
    }

    .social-btn.brand-gh:hover {
        border-color: rgba(234, 240, 255, 0.45);
        box-shadow: 0 10px 26px rgba(234, 240, 255, 0.14), 0 8px 20px rgba(0, 0, 0, 0.25);
    }

    .social-btn.brand-spotify:hover {
        border-color: color-mix(in srgb, var(--spotify) 65%, transparent);
        box-shadow: 0 10px 26px color-mix(in srgb, var(--spotify) 22%, transparent),
            0 8px 20px rgba(94, 234, 212, 0.1);
    }

    .status-card:hover {
        /* Only glow on hover, not always on */
        border-color: rgba(94, 234, 212, 0.55);
        box-shadow: var(--glow);
        transform: translateY(-2px);
    }
}

.social-btn:active {
    transform: translateY(1px);
}

.status-card {
    border-left: 4px solid var(--accent);
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.server-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.server-card {
    background: rgba(11, 16, 32, 0.78);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    display: grid;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.server-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.server-title {
    min-width: 0;
}

.server-name-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: copy;
    user-select: none;
}

.server-name-copy::after {
    content: "copy";
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--text-sub);
    opacity: 0.72;
}

.server-name-copy:hover::after,
.server-name-copy:focus-visible::after {
    opacity: 1;
    color: var(--accent);
}

.server-name-copy:focus-visible {
    outline: 2px solid rgba(94, 234, 212, 0.55);
    outline-offset: 3px;
    border-radius: 8px;
}

.status-meta {
    margin-top: -4px;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-view {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(159, 176, 217, 0.18);
    background: rgba(19, 26, 47, 0.25);
    font-weight: 700;
    font-size: 0.82rem;
    color: rgba(234, 240, 255, 0.86);
}

.server-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.server-actions {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.server-action {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 800;
}

.server-action.is-active {
    border-color: rgba(94, 234, 212, 0.55);
    box-shadow: none;
}

.server-extra {
    border-top: 1px solid rgba(159, 176, 217, 0.12);
    padding-top: 12px;
    display: grid;
    gap: 10px;
}

.server-extra[data-collapsed="true"] {
    display: none;
}

.server-extra__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.kpi--wide {
    grid-column: 1 / -1;
}

.mini-chart {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: 1px solid rgba(159, 176, 217, 0.14);
    background: rgba(19, 26, 47, 0.25);
}

.server-card.is-favorite {
    border-color: var(--border);
    box-shadow: none;
}

.server-card.is-collapsed .server-extra {
    display: none;
}

.server-card.is-loading .kpi,
.server-card.is-loading .server-footer,
.server-card.is-loading .server-extra {
    opacity: 0.88;
}

.server-card.is-loading .server-name-copy::after {
    content: "";
}

.kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.kpi {
    border: 1px solid rgba(159, 176, 217, 0.14);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(19, 26, 47, 0.4);
}

.status-label {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 4px;
}

.status-value {
    font-size: 1rem;
    font-weight: 700;
    word-break: break-word;
}

.badge {
    font-weight: 800;
    letter-spacing: 0.2px;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 0.85rem;
    line-height: 1;
    border: 1px solid rgba(159, 176, 217, 0.25);
    background: rgba(19, 26, 47, 0.55);
    white-space: nowrap;
}

.badge--online {
    border-color: rgba(61, 220, 132, 0.45);
    background: rgba(61, 220, 132, 0.14);
    color: #bff3d2;
}

.badge--offline {
    border-color: rgba(255, 95, 109, 0.5);
    background: rgba(255, 95, 109, 0.12);
    color: #ffd0d5;
}

.badge--unknown {
    border-color: rgba(159, 176, 217, 0.25);
    background: rgba(159, 176, 217, 0.08);
    color: rgba(234, 240, 255, 0.92);
}

.muted {
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-top: 10px;
}

.server-card .muted {
    margin-top: 0;
}

.server-card.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        rgba(234, 240, 255, 0) 0%,
        rgba(234, 240, 255, 0.07) 35%,
        rgba(234, 240, 255, 0) 70%
    );
    transform: translateX(-100%);
    animation: shimmer 1.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px calc(14px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom))
        calc(14px + env(safe-area-inset-left));
    background: rgba(11, 16, 32, 0.78);
    border-top: 1px solid rgba(159, 176, 217, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.bottom-bar__inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.bottom-bar__meta {
    min-width: 0;
}

.bottom-bar__title {
    font-weight: 900;
    letter-spacing: 0.2px;
    font-size: 0.98rem;
}

.bottom-bar__sub {
    color: var(--text-sub);
    font-size: 0.9rem;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    background: rgba(19, 26, 47, 0.92);
    border: 1px solid rgba(159, 176, 217, 0.22);
    border-radius: 14px;
    padding: 10px 12px;
    max-width: min(520px, calc(100vw - 28px));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

@keyframes avatarPulse {
    0%, 100% {
        box-shadow: 0 0 0 6px rgba(124, 131, 255, 0.16), 0 0 0 0 rgba(94, 234, 212, 0.15);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(124, 131, 255, 0.24), 0 0 22px 2px rgba(94, 234, 212, 0.18);
    }
}

.toast--danger {
    border-color: rgba(255, 95, 109, 0.4);
}

.toast--info {
    border-color: rgba(94, 234, 212, 0.35);
}

@media (max-width: 680px) {
    body {
        padding: calc(8px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right))
            calc(14px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
    }

    .card {
        padding: 16px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
    }

    .avatar {
        margin: 0 auto;
    }

    .social-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: initial;
    }

    .social-btn {
        width: 100%;
        justify-content: center;
    }

    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .section-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .settings-fab {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .prefs-panel {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: calc(68px + env(safe-area-inset-bottom));
    }

    .status-meta {
        justify-content: center;
        text-align: center;
    }

    .btn {
        width: 100%;
    }

    .server-cards {
        grid-template-columns: 1fr;
    }

    .muted {
        font-size: 0.92rem;
    }
}

@media (max-width: 380px) {
    .social-list {
        grid-template-columns: 1fr;
    }
    .kpis {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* --- Extra visual polish pack --- */
html {
    scroll-behavior: smooth;
}

body::before {
    content: "";
    position: fixed;
    inset: -20vmax;
    background:
        radial-gradient(circle at 20% 30%, rgba(124, 131, 255, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 75% 20%, rgba(94, 234, 212, 0.1) 0%, transparent 42%),
        radial-gradient(circle at 70% 75%, rgba(61, 220, 132, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
    animation: ambientFloat 18s ease-in-out infinite alternate;
}

.container,
.bottom-bar,
.toast {
    position: relative;
    z-index: 1;
}

@keyframes ambientFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(0, -2%, 0) scale(1.03);
    }
}

.card {
    animation: cardEnter 420ms ease both;
}

.container > .card:nth-child(2) {
    animation-delay: 80ms;
}

.container > .card:nth-child(3) {
    animation-delay: 140ms;
}

.container > .card:nth-child(4) {
    animation-delay: 200ms;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.992);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Custom scrollbar for Chromium/Edge/Safari */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(19, 26, 47, 0.65);
}

*::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 2px solid rgba(19, 26, 47, 0.75);
    background: linear-gradient(180deg, rgba(94, 234, 212, 0.8), rgba(124, 131, 255, 0.8));
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(94, 234, 212, 0.95), rgba(124, 131, 255, 0.95));
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 131, 255, 0.9) rgba(19, 26, 47, 0.7);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f3f6ff;
        --bg-secondary: #e9efff;
        --card-bg: rgba(255, 255, 255, 0.86);
        --text-main: #111a33;
        --text-sub: #4b5a82;
        --accent: #0ea5a5;
        --accent-2: #4f46e5;
        --border: rgba(76, 94, 143, 0.22);
        --shadow: 0 10px 28px rgba(20, 37, 82, 0.12);
        --glow: 0 0 0 1px rgba(79, 70, 229, 0.2), 0 16px 36px rgba(14, 165, 165, 0.12);
        --gh: #1f2937;
    }

    html {
        background: #eff3ff;
    }

    body {
        background:
            radial-gradient(circle at 20% 12%, rgba(124, 131, 255, 0.16) 0%, rgba(124, 131, 255, 0) 45%),
            radial-gradient(circle at 78% 18%, rgba(94, 234, 212, 0.12) 0%, rgba(94, 234, 212, 0) 40%),
            radial-gradient(circle at 20% 15%, #f8faff 0%, #eef3ff 54%, #e8eeff 100%);
        background-color: #eff3ff;
    }

    .bio {
        color: #334265;
    }

    .server-card {
        background: rgba(255, 255, 255, 0.7);
    }

    .kpi {
        background: rgba(240, 244, 255, 0.65);
    }

    .bottom-bar {
        background: rgba(255, 255, 255, 0.78);
        border-top: 1px solid rgba(76, 94, 143, 0.2);
    }

    .toast {
        background: rgba(255, 255, 255, 0.95);
        border-color: rgba(76, 94, 143, 0.24);
        box-shadow: 0 16px 44px rgba(20, 37, 82, 0.18);
    }
}

/* Theme override (user choice via data-theme) */
html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

:root[data-theme="light"] {
    /* Light theme palette (high contrast, airy) */
    /* Slightly warmer + higher contrast to reduce eye strain */
    --bg-primary: #f2f4f8;
    --bg-secondary: #e8edf6;
    --card-bg: rgba(255, 255, 255, 0.94);
    --text-main: #0b1220;
    --text-sub: #334155;
    --accent: #0ea5a5;
    --accent-2: #4f46e5;
    --border: rgba(2, 6, 23, 0.16);
    --shadow: 0 16px 40px rgba(2, 6, 23, 0.12);
    --glow: 0 0 0 1px rgba(79, 70, 229, 0.16), 0 18px 46px rgba(14, 165, 165, 0.14);
    --gh: #0f172a;
}

html[data-theme="light"] body {
    /* Add a tiny ambient tint (dark-mode vibe, but subtle) */
    background:
        radial-gradient(circle at 16% 14%, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0) 46%),
        radial-gradient(circle at 84% 18%, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0) 46%),
        linear-gradient(180deg, #f6f7fb 0%, #eef1f7 100%);
    background-color: var(--bg-primary);
}

/* Remove animated ambient layer in light mode (can cause fatigue) */
html[data-theme="light"] body::before {
    opacity: 0.26;
    animation: none;
    filter: saturate(0.8);
}

html[data-theme="light"] .bio {
    color: rgba(2, 6, 23, 0.7);
}

/* Make headings readable (avoid gradient text in light mode) */
html[data-theme="light"] .section-title {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    color: color-mix(in srgb, var(--accent) 82%, #0b1220);
}

/* Stronger secondary text for contrast */
html[data-theme="light"] .muted,
html[data-theme="light"] .status-label {
    color: rgba(11, 18, 32, 0.72);
}

/* Cards */
html[data-theme="light"] .card,
html[data-theme="light"] .prefs-panel {
    border-color: rgba(15, 23, 42, 0.12);
}

/* Light-mode interactions: only glow border on hover */
@media (hover: hover) and (pointer: fine) {
    html[data-theme="light"] .card:hover,
    html[data-theme="light"] .server-card:hover {
        border-color: rgba(245, 158, 11, 0.38);
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
        transform: translateY(-1px);
    }

    html[data-theme="light"] .btn:hover,
    html[data-theme="light"] .social-btn:hover {
        border-color: rgba(14, 165, 165, 0.26);
        box-shadow: 0 14px 32px rgba(2, 6, 23, 0.14);
        transform: translateY(-1px);
    }
}

html[data-theme="light"] .btn:focus-visible,
html[data-theme="light"] .social-btn:focus-visible,
html[data-theme="light"] .server-name-copy:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.28);
    outline-offset: 3px;
}

/* Server cards + KPI tiles */
html[data-theme="light"] .server-card {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(2, 6, 23, 0.14);
}

html[data-theme="light"] .kpi {
    background: rgba(241, 245, 255, 0.9);
    border-color: rgba(2, 6, 23, 0.12);
}

html[data-theme="light"] .mini-chart {
    background: rgba(241, 245, 255, 0.85);
    border-color: rgba(15, 23, 42, 0.1);
}

/* Buttons */
html[data-theme="light"] .btn {
    background: linear-gradient(135deg, rgba(14, 165, 165, 0.08) 0%, rgba(79, 70, 229, 0.08) 100%);
    border-color: rgba(2, 6, 23, 0.16);
    color: var(--text-main);
}

html[data-theme="light"] .btn--primary {
    background: linear-gradient(135deg, rgba(14, 165, 165, 0.14) 0%, rgba(79, 70, 229, 0.14) 100%);
    border-color: rgba(14, 165, 165, 0.28);
}

html[data-theme="light"] .btn--ghost {
    background: rgba(255, 255, 255, 0.75);
}

/* Social buttons: make them clearly light */
html[data-theme="light"] .social-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(238, 243, 255, 0.95) 100%);
    border-color: rgba(2, 6, 23, 0.16);
    color: var(--text-main);
}

/* Light-mode brand hovers (match dark-mode vibe, but on light) */
@media (hover: hover) and (pointer: fine) {
    html[data-theme="light"] .social-btn.brand-ig:hover {
        border-color: color-mix(in srgb, var(--ig) 78%, transparent);
        box-shadow:
            0 0 0 3px color-mix(in srgb, var(--ig) 18%, transparent),
            0 14px 32px color-mix(in srgb, var(--ig) 22%, transparent);
    }

    html[data-theme="light"] .social-btn.brand-fb:hover {
        border-color: color-mix(in srgb, var(--fb) 78%, transparent);
        box-shadow:
            0 0 0 3px color-mix(in srgb, var(--fb) 16%, transparent),
            0 14px 32px color-mix(in srgb, var(--fb) 20%, transparent);
    }

    html[data-theme="light"] .social-btn.brand-gh:hover {
        border-color: rgba(15, 23, 42, 0.28);
        box-shadow:
            0 0 0 3px rgba(15, 23, 42, 0.12),
            0 14px 32px rgba(2, 6, 23, 0.16);
    }

    html[data-theme="light"] .social-btn.brand-spotify:hover {
        border-color: color-mix(in srgb, var(--spotify) 74%, transparent);
        box-shadow:
            0 0 0 3px color-mix(in srgb, var(--spotify) 14%, transparent),
            0 14px 32px color-mix(in srgb, var(--spotify) 18%, transparent);
    }
}

html[data-theme="light"] .status-view {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.68);
    color: rgba(15, 23, 42, 0.82);
}

/* Badges: tune for light background */
html[data-theme="light"] .badge {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: rgba(15, 23, 42, 0.82);
}

html[data-theme="light"] .badge--online {
    border-color: rgba(22, 163, 74, 0.35);
    background: rgba(22, 163, 74, 0.12);
    color: #14532d;
}

html[data-theme="light"] .badge--offline {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
    color: #7f1d1d;
}

/* Toast + prefs panel polish */
html[data-theme="light"] .toast {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .prefs-panel {
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
}

@media (max-width: 820px) {
    .container {
        gap: clamp(14px, 3vw, 20px);
    }

    .server-card {
        padding: 12px;
    }
}
