@font-face {
    font-family: 'Clash Grotesk';
    src: url('/shared/fonts/clash/ClashGrotesk-Variable.woff2') format('woff2');
    font-weight: 200 700;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('/shared/fonts/GeistMono-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --bg: var(--surface-dim);
    --bg-elevated: var(--surface-container-low);
    --bg-card: var(--surface-container);
    --bg-hover: var(--surface-container-high);
    --border: var(--outline-variant);
    --border-subtle: var(--surface-container);
    --text-primary: var(--on-surface);
    --text-secondary: var(--on-surface-variant);
    --text-muted: var(--outline);
    --accent: var(--primary);
    --success-dot: var(--primary);
    --danger: var(--error);
    --radius: 14px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Clash Grotesk', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    padding: 24px 32px;
    min-height: 100vh;
}

/* ---------- HEADER ---------- */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.header-left h1 {
    font-size: 1.2em;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.splash-text {
    font-size: 0.8em;
    font-weight: 400;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.splash-text:hover { background: var(--bg-hover); border-color: var(--border); }
.splash-flash { animation: splashFlash 0.6s ease-out; }
@keyframes splashFlash {
    0% { background: var(--accent); color: var(--on-primary); border-color: var(--accent); transform: scale(1.05); }
    100% { background: var(--bg-elevated); color: var(--text-muted); border-color: var(--border-subtle); transform: scale(1); }
}
.sep { color: var(--text-muted); }

.conn-badge {
    font-size: 0.7em;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

#connHost { color: var(--text-secondary); }

.conn-badge .conn-label { display: inline; }

/* Square icon buttons */
.auth-status,
#themeToggle,
.pause-btn {
    width: 34px;
    height: 34px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.auth-status:hover,
#themeToggle:hover,
.pause-btn:hover { border-color: var(--text-primary); }

.auth-status img { width: 16px; height: 16px; opacity: 0.5; transition: opacity 0.2s, transform 0.2s ease; }
.auth-status:hover img { opacity: 0.8; }
.auth-status.unlocked img { opacity: 1; }
#themeToggle img,
.pause-btn img { width: 16px; height: 16px; opacity: 0.6; transition: opacity 0.2s, transform 0.2s ease; }
#themeToggle:hover img,
.pause-btn:hover img { opacity: 0.9; }

.auth-timer {
    font-size: 0.6em;
    font-family: 'Geist Mono', monospace;
    color: var(--accent);
    min-width: 28px;
    text-align: center;
}

/* Icon color filters */
.pause-btn img { filter: var(--tabler-filter); }
#themeToggle img { filter: var(--custom-filter); }
.service-card .card-icon img[src*="tabler-white"] { filter: var(--tabler-filter); }
.service-card .card-icon img[src*="/icons/tabler/"] { filter: var(--custom-filter); }



/* ---------- STATS BAR ---------- */

.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.stat-item {
    --warmth: 0;
    --hue: 0;
    background: var(--bg-card);
    border: 1px solid color-mix(in srgb, var(--border-subtle) calc((1 - var(--warmth)) * 100%), var(--danger) calc(var(--warmth) * 80%));
    border-radius: var(--radius);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    transition: border-color 0.2s;
    box-shadow: 0 0 calc(var(--warmth) * 10px) color-mix(in srgb, transparent calc((1 - var(--warmth)) * 100%), var(--danger) calc(var(--warmth) * 30%));
}



.stat-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.stat-icon img { width: 18px; height: 18px; object-fit: contain; filter: var(--tabler-filter); transition: transform 0.2s ease; }

.stat-body { flex: 1; min-width: 0; }

.stat-value {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.65em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- SERVICE SECTIONS ---------- */

.service-section { margin-bottom: 28px; }

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-header h2 {
    font-size: 0.8em;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.section-count {
    font-size: 0.7em;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

/* ---------- SERVICE CARD ---------- */

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 16px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.service-card:hover { border-color: var(--border); }

.service-card .card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-card .card-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.service-card .card-icon img { width: 20px; height: 20px; object-fit: contain; transition: transform 0.2s ease; }
.service-card .card-info { flex: 1; min-width: 0; }

.service-card .card-label {
    font-size: 0.95em;
    font-weight: 500;
    color: var(--text-primary);
}

.service-card .card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.service-card .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.service-card .status-dot.running { background: var(--success-dot); }
.service-card .status-dot.stopped { background: var(--danger); }

.service-card .status-text {
    font-size: 0.7em;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.service-card.clickable { cursor: pointer; }

.service-card .card-links-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.35;
    transition: opacity 0.2s, transform 0.2s ease;
    padding: 2px;
}

.service-card .card-links-hint img { width: 15px; height: 15px; filter: var(--custom-filter); }
.service-card:hover .card-links-hint { opacity: 0.95; transform: scale(1.15); }

/* ---------- MINECRAFT CARDS ---------- */

#mcCard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.mc-empty {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85em;
    grid-column: 1 / -1;
}

.mc-server-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.2s;
}

.mc-server-card:hover { border-color: var(--border); transform: translateY(-2px); }

.mc-server-card.running { border-left: 3px solid var(--success-dot); grid-column: 1 / -1; }
.mc-server-card.offline { border-left: 3px solid var(--danger); }

.mc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mc-header-left { display: flex; align-items: center; gap: 8px; }
.mc-server-name { font-size: 1.05em; font-weight: 600; color: var(--text-primary); }
.mc-type-icon { width: 18px; height: 18px; display: flex; align-items: center; }
.mc-type-icon img { width: 18px; height: 18px; object-fit: contain; }

.mc-header-right { display: flex; align-items: center; gap: 6px; }
.mc-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.mc-status-dot.running { background: var(--success-dot); animation: pulse 2s ease-in-out infinite; }
.mc-status-dot.stopped { background: var(--danger); }
.mc-status-text { font-size: 0.7em; color: var(--text-muted); letter-spacing: 0.03em; }

.mc-stats-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mc-stat { display: flex; flex-direction: column; gap: 1px; min-width: 50px; }
.mc-stat-value { font-size: 0.95em; font-weight: 600; color: var(--text-primary); font-family: 'Geist Mono', monospace; }
.mc-stat-label { font-size: 0.6em; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.mc-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mc-links .btn {
    font-family: 'Clash Grotesk', sans-serif;
    padding: 6px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7em;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--bg-elevated);
    transition: all 0.15s;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mc-links .btn:hover { border-color: var(--border); color: var(--text-secondary); transform: translateY(-1px); }
.mc-links .btn img { width: 12px; height: 12px; opacity: 0.5; filter: var(--custom-filter); }

/* ---------- LOCAL / FOOTER / TOAST ---------- */

#section-local { display: none; }
#section-local.visible { display: block; }

footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.65em;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-sep { color: var(--text-muted); }
#footerClock { font-family: 'Geist Mono', monospace; }

#toastContainer {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

.toast {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.8em;
    font-family: 'Clash Grotesk', sans-serif;
    animation: toastIn 0.3s ease;
}

.toast.success { background: rgba(74,222,128,0.1); color: #4ade80; border: 1px solid rgba(74,222,128,0.2); }
.toast.error { background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }

@keyframes toastIn {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ======== ANIMATIONS ======== */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


body {
    animation: fadeUp 0.4s ease-out;
}

.first-load .stat-item {
    animation: fadeUp 0.4s ease-out both;
}
.first-load .stat-item:nth-child(1) { animation-delay: 0.02s; }
.first-load .stat-item:nth-child(2) { animation-delay: 0.06s; }
.first-load .stat-item:nth-child(3) { animation-delay: 0.10s; }
.first-load .stat-item:nth-child(4) { animation-delay: 0.14s; }
.first-load .stat-item:nth-child(5) { animation-delay: 0.18s; }
.first-load .stat-item:nth-child(6) { animation-delay: 0.22s; }

.first-load .service-card {
    animation: fadeUp 0.35s ease-out both;
}
.first-load .service-card:nth-child(1) { animation-delay: 0.03s; }
.first-load .service-card:nth-child(2) { animation-delay: 0.06s; }
.first-load .service-card:nth-child(3) { animation-delay: 0.09s; }
.first-load .service-card:nth-child(4) { animation-delay: 0.12s; }
.first-load .service-card:nth-child(5) { animation-delay: 0.15s; }
.first-load .service-card:nth-child(6) { animation-delay: 0.18s; }
.first-load .service-card:nth-child(7) { animation-delay: 0.21s; }
.first-load .service-card:nth-child(8) { animation-delay: 0.24s; }
.first-load .service-card:nth-child(9) { animation-delay: 0.27s; }
.first-load .service-card:nth-child(10) { animation-delay: 0.30s; }

.first-load .mc-server-card {
    animation: fadeUp 0.4s ease-out 0.15s both;
}

.service-card .status-dot.running {
    animation: pulse 2s ease-in-out infinite;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.service-card:hover .card-icon {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.service-card:hover .card-icon img {
    transform: scale(1.15);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.stat-item:hover .stat-icon {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.stat-item:hover .stat-icon img {
    transform: scale(1.15);
}

#mcCard:hover {
    border-color: transparent;
}
.mc-server-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.auth-status:hover,
#themeToggle:hover,
.pause-btn:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.auth-status:hover img,
#themeToggle:hover img,
.pause-btn:hover img {
    transform: scale(1.2);
}

.service-card .card-links-hint {
    transition: all 0.2s ease;
}

.svc-link-btn {
    transition: all 0.2s ease;
}

.svc-link-btn:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.mc-links .btn {
    transition: all 0.2s ease;
}

.mc-links .btn:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: var(--accent);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.mc-links .btn.primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 14px rgba(143, 188, 187, 0.3);
}

/* Smooth theme transitions */
html, body, header, footer, .service-card, .stat-item, #mcCard,
.splash-text, .conn-badge, .auth-status, #themeToggle, .pause-btn,
.service-card .card-icon, .stat-icon, .svc-link-btn, .mc-links .btn {
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.service-card .card-label,
.service-card .status-text,
.stat-value, .stat-label,
.mc-server-name, .mc-stats-row, .mc-header,
header h1, .conn-badge, #connHost,
footer, .section-header h2 {
    transition: color 0.3s ease;
}

/* ======== RESPONSIVE ======== */

@media (max-width: 1100px) {
    .stats-bar { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
    body { padding: 16px 20px; }
    header { gap: 8px; }
    .conn-badge { font-size: 0.65em; padding: 3px 8px; }
    .conn-badge .conn-label { display: none; }
    .header-left { gap: 10px; }
    .header-left h1 { font-size: 1em; }
    .splash-text { max-width: 160px; font-size: 0.7em; padding: 3px 10px; }
    .header-right { gap: 6px; }
    .auth-status, #themeToggle, .pause-btn { width: 32px; height: 32px; }
    .auth-status img, #themeToggle img, .pause-btn img { width: 15px; height: 15px; }
    .auth-timer { font-size: 0.55em; min-width: 24px; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    footer { font-size: 0.6em; gap: 6px; }
}

@media (max-width: 560px) {
    body { padding: 14px 16px; }
    header {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 38px;
        padding-bottom: 10px;
        margin-bottom: 14px;
    }
    .conn-badge { position: absolute; left: 0; font-size: 0.6em; padding: 2px 8px; }
    .header-left { gap: 8px; }
    .header-left h1 { font-size: 0.95em; letter-spacing: 0.08em; }
    .splash-text { max-width: 110px; font-size: 0.65em; padding: 2px 8px; }
    .header-right { position: absolute; right: 0; gap: 5px; }
    .auth-status, #themeToggle, .pause-btn { width: 30px; height: 30px; }
    .auth-status img, #themeToggle img, .pause-btn img { width: 14px; height: 14px; }
    .auth-timer { font-size: 0.5em; min-width: 22px; }

    .stat-item { padding: 10px 14px; gap: 10px; flex-basis: 120px; }
    .stat-icon { width: 28px; height: 28px; }
    .stat-icon img { width: 16px; height: 16px; }
    .stat-value { font-size: 0.95em; }
    .services-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
    .service-card { padding: 14px; }
    .service-card .card-icon { width: 32px; height: 32px; }
    .service-card .card-icon img { width: 18px; height: 18px; }
    .service-card .card-label { font-size: 0.85em; }
    .service-card .card-links-hint img { width: 13px; height: 13px; }
    #mcCard { gap: 8px; }
    .mc-server-card { padding: 14px 16px; gap: 10px; }
    .mc-server-name { font-size: 0.9em; }
    .mc-stats-row { gap: 8px; }
    .mc-stat-value { font-size: 0.85em; }
    .mc-links .btn { font-size: 0.65em; padding: 4px 10px; }
    footer { padding-top: 14px; margin-top: 40px; }
}

@media (max-width: 400px) {
    body { padding: 10px 12px; }
    header { min-height: 34px; padding-bottom: 8px; margin-bottom: 12px; }
    .conn-badge { font-size: 0.5em; padding: 1px 5px; }
    .header-left h1 { font-size: 0.85em; }
    .splash-text { max-width: 80px; font-size: 0.55em; padding: 2px 6px; }
    .header-right { gap: 4px; }
    .auth-status, #themeToggle, .pause-btn { width: 28px; height: 28px; }
    .auth-status img, #themeToggle img, .pause-btn img { width: 13px; height: 13px; }
    .auth-timer { font-size: 0.45em; min-width: 20px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .service-card { padding: 10px; }
    #mcCard { grid-template-columns: 1fr; gap: 6px; }
    .mc-server-card { padding: 12px; gap: 8px; }
    .mc-links .btn { flex: 1; justify-content: center; }
    #toastContainer { bottom: 16px; right: 16px; left: 16px; }
    .toast { font-size: 0.75em; padding: 8px 14px; }
}

/* ======== AUTH OVERLAYS ======== */

.auth-overlay,
.pw-change-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.auth-overlay.active,
.pw-change-overlay.active { display: flex; }

.auth-box,
.pw-change-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    width: 100%;
    max-width: 420px;
    animation: fadeUp 0.3s ease;
}

.auth-box h2,
.pw-change-box h2 {
    font-size: 1.05em;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
    text-align: center;
}

.auth-error {
    font-size: 0.82em;
    color: var(--danger);
    text-align: center;
    margin-bottom: 14px;
    min-height: 1.2em;
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: 'Clash Grotesk', sans-serif;
    font-size: 0.92em;
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 14px;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 18px;
}
.checkbox-row input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }

.btn {
    font-family: 'Clash Grotesk', sans-serif;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8em;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    transition: all 0.15s;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn:hover { border-color: var(--text-primary); color: var(--text-primary); }
.btn.primary {
    width: 100%;
    background: var(--accent);
    color: var(--on-primary);
    border-color: var(--accent);
}
.btn.primary:hover { opacity: 0.85; }
.btn.logout-btn { color: var(--danger); border-color: var(--danger); }
.btn.logout-btn:hover { background: var(--danger); color: var(--on-primary); }

.shake { animation: shake 0.3s ease; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ======== SERVICE LINKS POPUP ======== */

.svc-links-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.svc-links-overlay.active { display: flex; }

.svc-links-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    width: 100%;
    max-width: 380px;
    animation: fadeUp 0.3s ease;
}

.svc-links-box h2 {
    font-size: 1em;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 18px;
    text-align: center;
}

.svc-links-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.svc-link-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9em;
    font-family: 'Clash Grotesk', sans-serif;
    font-weight: 400;
}

.svc-link-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.svc-link-btn img {
    width: 18px;
    height: 18px;
    filter: var(--custom-filter);
    flex-shrink: 0;
}

.svc-link-btn .svc-link-arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 1em;
}

.svc-links-none {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85em;
    padding: 12px 0;
}

.svc-links-authnote {
    margin-top: 12px;
    text-align: center;
    font-size: 0.75em;
    color: var(--text-muted);
}

/* ======== NETWORK & DNS SECTION ======== */

.net-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.net-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.net-card .card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.net-card .card-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.net-card .card-icon img { width: 20px; height: 20px; object-fit: contain; }
.net-card .card-icon img.icon-stroke { filter: var(--custom-filter); }
.net-card .card-info { flex: 1; min-width: 0; }
.net-card .card-label { font-size: 0.95em; font-weight: 500; color: var(--text-primary); }
.net-card .card-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.net-card .status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.net-card .status-dot.running { background: var(--success-dot); animation: pulse 2s ease-in-out infinite; }
.net-card .status-dot.stopped { background: var(--danger); }
.net-card .status-text { font-size: 0.7em; color: var(--text-muted); letter-spacing: 0.03em; }

.net-speeds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.net-speed {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.net-speed .net-val {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--primary);
    font-family: 'Geist Mono', monospace;
}

.net-speed .net-stl {
    font-size: 0.6em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.net-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.net-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    color: var(--text-secondary);
    border-bottom: 1px dashed var(--border-subtle);
    padding-bottom: 4px;
}

.net-row b { font-family: 'Geist Mono', monospace; color: var(--text-primary); font-weight: 500; }

.net-top {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}

.net-top-title {
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.net-top-list {
    margin: 0; padding: 0 0 0 18px;
    font-size: 0.75em;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.net-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85em;
    padding: 18px 0;
}

/* Responsive */
@media (max-width: 560px) {
    .net-grid { grid-template-columns: 1fr; gap: 8px; }
    .net-card { padding: 14px; }
}
