:root {
    --bg-main: #36393f;
    --bg-secondary: #2f3136;
    --bg-elevated: #202225;
    --text-primary: #dcddde;
    --text-muted: #8e9297;
    --color-success: #3ba55c;
    --color-danger: #ed4245;
    --color-warning: #faa61a;
    --color-border: rgba(255, 255, 255, 0.05);
    --font-family: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Scrollbar Theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4f545c;
}

a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
}

.header .logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.subscribe-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-family);
}
.subscribe-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: #fff;
}

.main-content {
    flex: 1;
}

.alert-banner {
    padding: 20px 24px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.alert-banner.success { background-color: var(--color-success); }
.alert-banner.danger { background-color: var(--color-danger); }
.alert-banner.warning { background-color: var(--color-warning); }
.alert-banner.loading { background-color: var(--bg-secondary); color: var(--text-muted); border: 1px solid var(--color-border); }

.uptime-summary {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.components {
    background-color: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-bottom: 40px;
}

.component-item {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}
.component-item:last-child {
    border-bottom: none;
}

.component-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.component-name {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

.component-status {
    font-size: 14px;
    font-weight: 500;
}
.status-operational { color: var(--color-success); }
.status-outage { color: var(--color-danger); }

.history-section {
    margin-top: 10px;
    margin-bottom: 30px;
}
.history-section:last-child {
    margin-bottom: 10px;
}
.history-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.uptime-bars {
    display: flex;
    gap: 3px;
    height: 46px;
    width: 100%;
}

.uptime-bar {
    flex: 1;
    border-radius: 2px;
    background-color: var(--bg-main);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
.uptime-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.15);
}

.uptime-bar.nodata {
    background-color: var(--color-border);
}
.uptime-bar.nodata:hover {
    opacity: 1;
    cursor: default;
    transform: none;
}

.uptime-bar.operational { background-color: var(--color-success); }
.uptime-bar.outage { background-color: var(--color-danger); }

.past-incidents {
    margin-top: 60px;
}

.past-incidents h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
}

.incident-day {
    margin-bottom: 40px;
}
.incident-date {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 24px;
}
.incident-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.incident-card:last-child {
    margin-bottom: 0;
}
.incident-update {
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.mt-update {
    margin-top: 20px;
}
.incident-status {
    font-weight: 700;
}
.status-active { color: var(--color-danger); font-weight: 700; font-size: 15px; }
.status-resolved { color: var(--color-success); font-weight: 700; font-size: 15px; }
.incident-time {
    font-size: 13.5px;
    color: var(--text-muted);
}
.no-incidents {
    color: var(--text-muted);
    font-size: 15px;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-top: 1px solid var(--color-border);
    margin-top: 40px;
    font-size: 14px;
}

.footer .links {
    display: flex;
    gap: 20px;
}

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

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background-color: var(--bg-elevated);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(10px) translateX(-50%);
    text-align: center;
    line-height: 1.4;
}
.tooltip.visible {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
}
.tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--bg-elevated) transparent transparent transparent;
}
