/* StatusForge — Generated Status Page */
:root {
    --bg: #f5f5f7;
    --bg2: #ffffff;
    --bg3: #f0f0f2;
    --text: #1d1d1f;
    --text2: #86868b;
    --text3: #aeaeb2;
    --border: #d2d2d7;
    --border2: rgba(0, 0, 0, 0.06);
    --accent: #e63946;
    --accent-glow: rgba(230, 57, 70, 0.15);
    --green: #34c759;
    --yellow: #ffcc00;
    --orange: #ff9500;
    --red: #ff3b30;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    --card-hover: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
    --bg: #000000;
    --bg2: #1c1c1e;
    --bg3: #2c2c2e;
    --text: #f5f5f7;
    --text2: #86868b;
    --text3: #48484a;
    --border: #38383a;
    --border2: rgba(255, 255, 255, 0.06);
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    --card-hover: 0 2px 8px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.5s, color 0.5s;
    -webkit-font-smoothing: antialiased;
}

.bg-glow {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

[data-theme="dark"] .bg-glow {
    opacity: 0.3;
}

.page-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 24px 32px;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.brand-sub {
    font-size: 12px;
    color: var(--text2);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: var(--card-shadow);
}

.theme-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--card-hover);
}

[data-theme="dark"] .theme-icon.sun {
    display: none;
}

[data-theme="dark"] .theme-icon.moon {
    display: inline;
}

[data-theme="light"] .theme-icon.sun {
    display: inline;
}

[data-theme="light"] .theme-icon.moon {
    display: none;
}

/* Overall Status */
.overall-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-radius: 20px;
    background: var(--bg2);
    border: 1px solid var(--border);
    margin-bottom: 32px;
    transition: all 0.5s;
    box-shadow: var(--card-shadow);
}

.overall-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.overall-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text3);
    position: relative;
}

.overall-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.overall-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.overall-uptime {
    text-align: right;
}

.uptime-label {
    display: block;
    font-size: 11px;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.uptime-value {
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.status-operational .overall-dot {
    background: var(--green);
}

.status-degraded .overall-dot {
    background: var(--yellow);
}

.status-major_degraded .overall-dot {
    background: var(--orange);
}

.status-error .overall-dot {
    background: var(--red);
}

.status-operational {
    border-color: rgba(52, 199, 89, 0.25);
}

.status-degraded {
    border-color: rgba(255, 204, 0, 0.25);
}

.status-major_degraded {
    border-color: rgba(255, 149, 0, 0.25);
}

.status-error {
    border-color: rgba(255, 59, 48, 0.25);
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 4px;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text2);
}

.section-count {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 100px;
    background: var(--bg3);
    color: var(--text2);
}

/* Services */
.services-container {
    margin-bottom: 32px;
}

.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-radius: 16px;
    margin-bottom: 8px;
    background: var(--bg2);
    border: 1px solid var(--border2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    gap: 12px;
}

.service-row:hover {
    transform: translateY(-1px);
    box-shadow: var(--card-hover);
    border-color: var(--border);
}

.service-row:last-child {
    margin-bottom: 0;
}

.service-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    min-width: 0;
}

.service-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-heartbeat {
    font-size: 14px;
    color: var(--text3);
}

.service-heartbeat.s-operational {
    color: var(--green);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.service-heartbeat.s-degraded {
    color: var(--yellow);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.service-heartbeat.s-major_degraded {
    color: var(--orange);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.service-heartbeat.s-error {
    color: var(--red);
    animation: heartbeat-fast 0.8s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.25);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(1);
    }
}

@keyframes heartbeat-fast {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.service-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.service-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-response {
    font-size: 11px;
    color: var(--text2);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.service-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.service-bars {
    display: flex;
    gap: 1.5px;
    align-items: flex-end;
    flex-shrink: 1;
    overflow: hidden;
}

.bar {
    width: 3px;
    height: 20px;
    border-radius: 2px;
    background: var(--text3);
    opacity: 0.15;
    transition: all 0.3s;
}

.bar.b-operational {
    background: var(--green);
    opacity: 1;
}

.bar.b-degraded {
    background: var(--yellow);
    opacity: 1;
    height: 14px;
}

.bar.b-major_degraded {
    background: var(--orange);
    opacity: 1;
    height: 10px;
}

.bar.b-error {
    background: var(--red);
    opacity: 1;
    height: 6px;
}

.bar.unknown {
    opacity: 0.08;
    height: 6px;
}

.service-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--bg3);
    color: var(--text2);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.service-status-badge.s-operational {
    background: rgba(52, 199, 89, 0.12);
    color: var(--green);
}

.service-status-badge.s-degraded {
    background: rgba(255, 204, 0, 0.12);
    color: #b8860b;
}

.service-status-badge.s-major_degraded {
    background: rgba(255, 149, 0, 0.12);
    color: var(--orange);
}

.service-status-badge.s-error {
    background: rgba(255, 59, 48, 0.12);
    color: var(--red);
}

[data-theme="dark"] .service-status-badge.s-degraded {
    color: var(--yellow);
}

/* Last check */
.last-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text3);
    margin-bottom: 48px;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-top {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
}

.footer-icon {
    color: var(--accent);
    font-size: 14px;
}

.footer-made {
    font-size: 11px;
    color: var(--text3);
    text-decoration: none;
    letter-spacing: 0.04em;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-made:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .service-bars {
        display: none;
    }
}

@media (max-width: 640px) {
    .page-container {
        padding: 32px 16px 24px;
    }

    .service-row {
        padding: 14px 16px;
        border-radius: 14px;
    }

    .overall-status {
        padding: 20px;
        border-radius: 16px;
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .overall-uptime {
        text-align: left;
    }

    .brand-name {
        font-size: 18px;
    }

    .overall-text {
        font-size: 14px;
    }

    .service-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .service-name {
        font-size: 13px;
    }

    .service-status-badge {
        font-size: 10px;
        padding: 3px 10px;
    }
}