:root {
    --gate-bg: #0f172a;
    --gate-surface: rgba(15, 23, 42, 0.88);
    --gate-surface-border: rgba(148, 163, 184, 0.2);
    --gate-text: #e2e8f0;
    --gate-text-dim: #94a3b8;
    --gate-accent: #f59e0b;
    --gate-accent-strong: #d97706;
    --gate-success: #10b981;
    --gate-danger: #ef4444;
    --gate-shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Outfit, system-ui, sans-serif;
    color: var(--gate-text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 26%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.15), transparent 28%),
        var(--gate-bg);
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.gate-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.gate-card {
    width: min(540px, 100%);
    background: var(--gate-surface);
    border: 1px solid var(--gate-surface-border);
    border-radius: 24px;
    box-shadow: var(--gate-shadow);
    padding: 2rem;
    backdrop-filter: blur(18px);
}

.gate-eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gate-accent);
    margin-bottom: 0.75rem;
}

.gate-card h1 {
    margin: 0;
    font-size: 2rem;
}

.gate-description {
    margin: 0.85rem 0 1.25rem 0;
    color: var(--gate-text-dim);
    line-height: 1.55;
}

.gate-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--gate-text);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.gate-status-pill[data-tone="starting"] {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
}

.gate-status-pill[data-tone="online"] {
    background: rgba(16, 185, 129, 0.14);
    color: #a7f3d0;
}

.gate-status-pill[data-tone="error"] {
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
}

.gate-form {
    display: grid;
    gap: 0.75rem;
}

.gate-form label {
    font-size: 0.9rem;
    color: var(--gate-text-dim);
}

.gate-form input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.65);
    color: var(--gate-text);
    padding: 0.95rem 1rem;
    font: inherit;
}

.gate-form button,
.gate-actions button {
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gate-accent), var(--gate-accent-strong));
    color: white;
    font: inherit;
    font-weight: 600;
    padding: 0.95rem 1.1rem;
    cursor: pointer;
}

.gate-form button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.gate-error {
    min-height: 1.25rem;
    font-size: 0.88rem;
    color: #fecaca;
}

.gate-loading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.7);
}

.gate-spinner {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 3px solid rgba(148, 163, 184, 0.25);
    border-top-color: var(--gate-accent);
    animation: gate-spin 0.8s linear infinite;
}

.gate-loading-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gate-loading-text {
    font-size: 0.92rem;
    color: var(--gate-text-dim);
}

.gate-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 1rem;
}

@keyframes gate-spin {
    to {
        transform: rotate(360deg);
    }
}
