/* Kawaa Status Page - Dark Theme */
:root {
    --primary: #00f5ff;
    --primary-rgb: 0, 245, 255;
    --secondary: #7c3aed;
    --secondary-rgb: 124, 58, 237;
    --bg-dark: #050510;
    --bg-card: rgba(7, 9, 28, 0.75);
    --text-primary: #f5f6ff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.06);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 999px;
    --transition-base: 0.3s ease;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navigation */
.site-nav {
    padding: 16px 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(5, 5, 16, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #aab2ff;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero.status-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(8rem, 14vh, 12rem) 0 clamp(4rem, 8vh, 6rem);
    margin-top: 60px;
    background:
        radial-gradient(circle at top, rgba(0, 245, 255, 0.18), transparent 45%),
        radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.18), transparent 40%),
        linear-gradient(180deg, rgba(10, 14, 20, 0.45), rgba(10, 14, 20, 0.92));
}

.hero.status-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(0, 245, 255, 0.25), transparent 50%);
    filter: blur(120px);
    opacity: 0.65;
    pointer-events: none;
}

.status-hero-surface {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 5vw, 40px) 80px;
}

.hero h1 {
    font-size: clamp(1.75rem, 2.5vw, 2.8rem);
    margin-bottom: 8px;
}

.hero-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.timestamp {
    color: #aab2ff;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.muted {
    color: var(--text-muted);
}

/* Status Icons */
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.status-icon.status-ok {
    color: #00ffa3;
    border-color: rgba(0, 255, 163, 0.4);
    background: rgba(0, 255, 163, 0.1);
}

.status-icon.status-warn {
    color: #ffe066;
    border-color: rgba(255, 224, 102, 0.4);
    background: rgba(255, 224, 102, 0.12);
}

.status-icon.status-critical {
    color: #ff5f7a;
    border-color: rgba(255, 95, 122, 0.45);
    background: rgba(255, 95, 122, 0.12);
}

.status-icon.status-maintenance {
    color: #6e9bff;
    border-color: rgba(110, 155, 255, 0.45);
    background: rgba(110, 155, 255, 0.12);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-full {
    width: 100%;
}

/* Sections */
section {
    margin-bottom: 48px;
}

section h2 {
    font-size: 1.4rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.stack {
    display: grid;
    gap: 16px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    display: grid;
    gap: 8px;
}

.card-body .metric {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.card-body .metric-label {
    color: var(--text-muted);
}

/* Service Cards */
.service-card .service-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

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

.service-card .service-info h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.service-card .service-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: capitalize;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.status-ok {
    color: #00ffa3;
}

.status-warn {
    color: #ffe066;
}

.status-critical {
    color: #ff5f7a;
}

.status-maintenance {
    color: #6e9bff;
}

/* Uptime Heatmap */
.calendar-heatmap {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.uptime-summary {
    display: flex;
    gap: 48px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.uptime-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.uptime-value {
    font-size: 2rem;
    font-weight: 700;
    color: #00ffa3;
}

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

.uptime-bars {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
}

.uptime-bar {
    flex: 1;
    height: 40px;
    border-radius: 4px;
    background: linear-gradient(180deg, #22c55e, #16a34a);
    transition: transform 0.15s ease;
    cursor: pointer;
    position: relative;
}

.uptime-bar:hover {
    transform: scaleY(1.1);
    z-index: 1;
}

.uptime-bar.degraded {
    background: linear-gradient(180deg, #eab308, #ca8a04);
}

.uptime-bar.outage {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

.uptime-bar[title]::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 8px;
}

.uptime-bar:hover[title]::after {
    opacity: 1;
}

.uptime-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Incidents */
.incident {
    cursor: pointer;
}

.incident:hover {
    border-color: rgba(255, 140, 0, 0.25);
    transform: translateY(-2px);
}

.incident.no-incidents {
    cursor: default;
}

.incident.no-incidents:hover {
    transform: none;
    border-color: var(--border-color);
}

.updates {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.updates li {
    display: grid;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 14px;
}

.updates-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.updates-status {
    font-weight: 600;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.85);
}

.tab-btn.active {
    color: #aab2ff;
    border-bottom-color: #aab2ff;
}

/* Metrics */
.metric-card {
    gap: 16px;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

.metric-header span {
    font-size: 0.9rem;
    font-weight: 500;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.metric-chart {
    height: 60px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, rgba(0, 245, 255, 0.6), rgba(0, 245, 255, 0.2));
    border-radius: 3px 3px 0 0;
    min-height: 8px;
}

/* Footer */
.site-footer {
    margin-top: 96px;
    padding: 80px 0 48px;
    background:
        radial-gradient(circle at top, rgba(124, 58, 237, 0.16), transparent 55%),
        rgba(4, 5, 12, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(320px, 2fr);
    gap: 96px;
    align-items: flex-start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-tagline {
    color: var(--text-muted);
    max-width: 22rem;
    line-height: 1.6;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-heading {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 8px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    position: relative;
    background: linear-gradient(145deg, rgba(15, 17, 35, 0.98), rgba(10, 12, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-content {
    padding: 32px;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin: 0 0 8px;
}

.modal-description {
    color: var(--text-muted);
    margin: 0 0 24px;
    line-height: 1.5;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus {
    outline: none;
    border-color: #aab2ff;
    box-shadow: 0 0 0 3px rgba(170, 178, 255, 0.15);
}

.modal-footer-note {
    margin: 16px 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .site-nav {
        padding: 12px 20px;
    }

    .nav-links {
        display: none;
    }

    .page {
        padding: 0 16px 64px;
    }

    .hero.status-hero {
        padding: 7rem 0 3rem;
    }

    .status-hero-surface {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-right {
        width: 100%;
    }

    .hero-right .btn {
        width: 100%;
    }

    .uptime-summary {
        gap: 24px;
    }

    .uptime-value {
        font-size: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
