/* ===== CSS Variables ===== */
:root {
    --gold-primary: #D4AF37;
    --gold-dim: #A68A29;
    --gold-glow: rgba(212, 175, 55, 0.3);
    --bg-main: #0a0a0a;
    --surface: #121212;
    --card-bg: #1a1a1a;
    --border-color: #2a2a2a;
    --text-main: #f0f0f0;
    --text-dim: #888888;
    --accent-color: #D4AF37;
}

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

body {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
}

.wrapper {
    max-width: 720px;
    width: 100%;
}

/* ===== HEADER ===== */
.section.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

.header-logo img {
    height: 32px;
    width: auto;
    border-radius: 6px;
}

.header-logo .logo-text .gold {
    color: var(--gold-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-status {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.4rem 1.2rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-status:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.btn-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34D399;
    display: inline-block;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

.btn-follow {
    background: var(--gold-primary);
    color: #0a0a0a;
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-follow:hover {
    background: #c4a032;
    transform: scale(1.02);
}

/* ===== CURRENT STATUS BANNER ===== */
.section.current-status.status-banner {
    margin-bottom: 2rem;
}

.top-level-status {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: border-color 0.3s ease;
}

.top-level-status:hover {
    border-color: var(--gold-primary);
}

.top-level-status .status-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.top-level-status .status-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.top-level-status .status-title.ok {
    color: #34D399;
}

.top-level-status .top-level-status-details {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.top-level-status .top-level-status-details a {
    color: var(--gold-primary);
    text-decoration: none;
}

.top-level-status .top-level-status-details a:hover {
    text-decoration: underline;
}

/* ===== PERIOD SELECTOR ===== */
.period-selector {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.period-selector span {
    cursor: default;
}

.period-selector .arrow {
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.period-selector .arrow:hover {
    background: var(--card-bg);
    color: var(--text-main);
}

.period-selector .arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== SERVICES SECTION ===== */
.section.services {
    margin: 2rem 0;
}

.block-name {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.section.block {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.service-row {
    border-bottom: 1px solid var(--border-color);
}

.service-row:last-child {
    border-bottom: none;
}

.service-row-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.2rem;
    transition: background 0.2s ease;
}

.service-row-container:hover {
    background: rgba(212, 175, 55, 0.04);
}

.service-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

.service-name .service-status-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.service-status-icon.hp-up {
    color: #34D399;
}

.snapshot-uptime {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
}

.uptime-wrapper {
    padding: 0 1.2rem 0.8rem;
}

.snapshots {
    display: flex;
    gap: 2px;
    width: 100%;
    height: 20px;
}

.snapshots .snapshot {
    flex: 1;
    border-radius: 2px;
    background: var(--gold-primary);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.snapshots .snapshot:hover {
    opacity: 1;
}

.snapshots .snapshot.no-data {
    background: var(--border-color);
    opacity: 0.3;
}

.uptime-periods {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 4px;
    letter-spacing: 0.02em;
}

/* ===== RECENT NOTICES ===== */
.section.past-incidents-container {
    margin: 2rem 0;
}

.section.past-incidents-container .text-color {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    font-weight: 600;
    display: block;
    margin-bottom: 0.8rem;
}

.incident-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.incident {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.incident:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

.incident-type {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 4px;
}

.incident-type svg {
    width: 14px;
    height: 14px;
}

.incident-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.incident .update {
    display: flex;
    gap: 0.8rem;
    padding: 0.4rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 0.6rem;
    padding-top: 0.8rem;
}

.incident .update:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.update-timeline {
    min-width: 2.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.update-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-primary);
    margin-top: 4px;
}

.update-type-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-primary);
}

.update-text {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.update-date {
    font-size: 0.7rem;
    color: var(--text-dim);
    opacity: 0.6;
    margin-top: 2px;
}

.affected-service {
    display: inline-block;
    background: var(--card-bg);
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-dim);
    border: 1px solid var(--border-color);
}

.incident-history {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.incident-history:hover {
    border-color: var(--gold-primary);
    color: var(--text-main);
}

.flex.justify-content-center {
    display: flex;
    justify-content: center;
}

/* ===== FOOTER ===== */
.section.footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0 1rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.footer-left .copyright {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

.footer-left .copyright .gold {
    color: var(--gold-primary);
}

.footer-links {
    display: flex;
    gap: 1.2rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

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

.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-right .powered {
    font-size: 0.65rem;
    color: var(--text-dim);
    opacity: 0.5;
    text-decoration: none;
}

.footer-right .powered:hover {
    opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .section.header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .top-level-status {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .service-row-container {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    .service-name {
        font-size: 0.85rem;
    }
    .snapshot-uptime {
        font-size: 0.75rem;
    }
    .incident {
        padding: 1rem;
    }
    .section.footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 400px) {
    body {
        padding: 0.8rem;
    }
    .top-level-status {
        padding: 1rem;
    }
    .service-row-container {
        padding: 0.7rem 0.8rem;
    }
    .uptime-wrapper {
        padding: 0 0.8rem 0.6rem;
    }
}

/* ===== COLOR OVERRIDES ===== */
.hp-status-icon.hp-up {
    color: #34D399;
}
.hp-status-icon.hp-incident {
    color: #FBBF24;
}
.hp-status-icon.hp-maintenance {
    color: #60A5FA;
}

.status-title.ok {
    color: #34D399;
}
.status-title.incident {
    color: #FBBF24;
}
.status-title.maintenance {
    color: #60A5FA;
}

.color-accent {
    color: var(--gold-primary);
}

.gap-05em { gap: 0.5em; }
.gap-1em { gap: 1em; }
.mt-05em { margin-top: 0.5em; }
.mb-1em { margin-bottom: 1em; }
.flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-space-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.text-color { color: var(--text-main); }
.color-text-secondary { color: var(--text-dim); }
.font-weight-400 { font-weight: 400; }
.font-size-14px { font-size: 14px; }
.font-size-15px { font-size: 15px; }
.hoverable { cursor: pointer; }
.transition { transition: all 0.3s ease; }
.hover-color-text:hover { color: var(--text-main); }
.bg-muted { background: var(--card-bg); }
.br-6px { border-radius: 6px; }
.padding-035em { padding: 0.35em; }
.pl-1em { padding-left: 1em; }
.mr-1em { margin-right: 1em; }
.width-100 { width: 100%; }
.no-line { display: none; }
