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

:root {
    --bg:           #0d1117;
    --surface:      #161b22;
    --border:       #30363d;
    --text:         #c9d1d9;
    --text-muted:   #8b949e;
    --accent:       #58a6ff;
    --green:        #3fb950;
    --orange:       #d29922;
    --red:          #f85149;
    --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
}

html, body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 4rem 1.5rem 3rem;
}

/* ── Hero ── */

.hero {
    margin-bottom: 4rem;
}

.hero-prompt {
    font-size: 13px;
    margin-bottom: 1.2rem;
    opacity: 0.7;
}

.prompt-user  { color: var(--green); }
.prompt-sep   { color: var(--text-muted); }
.prompt-host  { color: var(--accent); }
.prompt-colon { color: var(--text-muted); }
.prompt-path  { color: var(--accent); }
.prompt-dollar { color: var(--text-muted); margin-left: 2px; }

.prompt-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--text);
    vertical-align: text-bottom;
    animation: blink 1.1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 0 40px rgba(88, 166, 255, 0.25);
    line-height: 1.1;
    margin-bottom: 0.6rem;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Section ── */

.section-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
}

.section-hash {
    color: var(--accent);
    margin-right: 0.3em;
}

/* ── Service Grid ── */

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

.service-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    cursor: pointer;
}

.service-card:hover {
    border-color: var(--accent);
    background: #1c2230;
    transform: translateY(-2px);
}

.service-card--planned {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.service-card--planned:hover {
    transform: none;
    border-color: var(--border);
    background: var(--surface);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.service-name {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
}

.service-desc {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
}

.service-url {
    font-size: 11px;
    color: var(--accent);
    opacity: 0.7;
    margin-top: 0.2rem;
}

/* ── Status Dot ── */

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--border);
    transition: background 0.3s;
}

.status-dot[data-status="checking"] {
    background: var(--text-muted);
    animation: pulse 1.2s ease-in-out infinite;
}

.status-dot[data-status="online"] {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.status-dot[data-status="offline"] {
    background: var(--red);
}

.status-dot[data-status="planned"] {
    background: var(--orange);
}

.status-dot[data-status="restricted"] {
    background: var(--orange);
}

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

/* ── Footer ── */

footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.sep {
    margin: 0 0.5em;
    opacity: 0.4;
}

/* ── Access Denied Overlay ── */

.access-denied {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.access-denied[hidden] {
    display: none;
}

.access-denied-inner {
    background: var(--surface);
    border: 1px solid var(--red);
    border-radius: 8px;
    padding: 1.5rem 1.8rem;
    max-width: 380px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.access-denied-line {
    font-size: 13px;
    color: var(--text);
}

.access-denied-cmd {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 0.2rem;
}

.access-denied-err {
    color: var(--red);
    font-weight: 600;
}

.access-denied-hint {
    color: var(--text-muted);
    font-size: 12px;
}

.access-denied-btn {
    align-self: flex-end;
    margin-top: 0.6rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 0.3rem 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.access-denied-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Responsive ── */

@media (max-width: 500px) {
    main {
        padding: 2.5rem 1rem 2rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }
}
