/* ═══════════════════════════════════════════
   SOKOL API — Backend Status Page
   ═══════════════════════════════════════════ */

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

:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface2: #1a1a26;
    --border: #2a2a3a;
    --text: #e4e4ef;
    --text-muted: #6b6b80;
    --accent: #E11D48;
    --accent-glow: rgba(225, 29, 72, 0.15);
    --green: #22c55e;
    --blue: #3b82f6;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Menlo', monospace;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Racing stripe accent */
.racing-stripe {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, #f43f5e 50%, var(--accent) 100%);
    z-index: 100;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* ─── Header ─── */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 0 40px;
    gap: 16px;
    flex-wrap: wrap;
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon svg {
    width: 48px;
    height: 48px;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
    line-height: 1;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
}

.header-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.env-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(225, 29, 72, 0.12);
    color: #f43f5e;
    border: 1px solid rgba(225, 29, 72, 0.25);
}

.version-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--surface2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
}

/* ─── Status Card ─── */
.status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), rgba(34, 197, 94, 0.02));
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--green);
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.pulse {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.status-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--green);
}

.status-uptime {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ─── Terminal ─── */
.terminal-window {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.terminal-header {
    background: var(--surface2);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-close { background: #ff5f56; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #27c93f; }

.terminal-title {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.log-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-time {
    color: #4a4a5a;
    min-width: 70px;
}

.log-label {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 48px;
    text-align: center;
    letter-spacing: 0.03em;
}

.log-label.info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.log-label.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.log-text {
    color: #b0b0c0;
}

.log-port {
    color: var(--accent);
    font-weight: 600;
}

.log-cursor-line {
    margin-top: 4px;
}

.log-cursor {
    color: var(--accent);
    animation: blink 1.2s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ─── Metrics ─── */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.metric-card:hover {
    border-color: rgba(225, 29, 72, 0.3);
    transform: translateY(-2px);
}

.metric-icon {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.metric-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-mono);
}

.metric-value.green {
    color: var(--green);
}

/* ─── Info Banner ─── */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.info-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.info-banner strong {
    color: #fff;
    font-size: 0.9rem;
}

.info-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.info-desc a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.info-desc a:hover {
    color: #f43f5e;
    text-decoration: underline;
}

/* ─── Footer ─── */
footer {
    margin-top: 40px;
    text-align: center;
}

.footer-line {
    height: 1px;
    background: var(--border);
    margin-bottom: 20px;
}

footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .page-wrapper {
        padding: 24px 16px;
    }
    header {
        flex-direction: column;
        padding: 12px 0 28px;
    }
    h1 {
        font-size: 1.6rem;
    }
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .terminal-body {
        font-size: 0.75rem;
        padding: 14px;
    }
    .log-time {
        min-width: 60px;
        font-size: 0.7rem;
    }
    .status-card {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}
