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

:root {
    --status-operational: #10b981;
    --status-degraded: #f59e0b;
    --status-down: #ef4444;
    --status-maintenance: #6366f1;
    --theme-primary-color: rgba(251, 242, 233, 1);
    --theme-secondary-color: rgba(0, 25, 87, 1);
    --theme-blue-color: rgba(6, 88, 229, 1);
    --theme-dark-blue-color: rgba(1, 51, 137, 1);
    --theme-dark-blue-lt-color: rgba(0, 25, 87, 1);
    --theme-box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.25), -2px -2px 3px 0px #fff;
}

body {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(170.24deg, rgba(251, 242, 233, 1) 0%, rgba(255, 228, 214, 1) 100%);
    color: var(--theme-secondary-color);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
}

.logo {
    width: 60px;
    height: auto;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--theme-dark-blue-lt-color);
}

.subtitle {
    color: var(--theme-secondary-color);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Overall Status */
.overall-status {
    background: var(--theme-primary-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--theme-box-shadow);
    border: 0;
}

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

.status-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--status-operational);
    box-shadow: 0 0 20px currentColor;
    animation: pulse 2s infinite;
}

.status-dot.degraded {
    background: var(--status-degraded);
}

.status-dot.down {
    background: var(--status-down);
}

.status-dot.maintenance {
    background: var(--status-maintenance);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.status-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--theme-dark-blue-lt-color);
}

.last-updated {
    color: var(--theme-secondary-color);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Sections */
section {
    background: var(--theme-primary-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--theme-box-shadow);
    border: 0;
}

section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 25, 87, 0.1);
    color: var(--theme-dark-blue-lt-color);
}

/* Service List */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: transform 0.2s;
}

.service-item:hover {
    transform: translateX(5px);
}

.service-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--theme-dark-blue-lt-color);
}

.service-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.service-status.operational {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-operational);
}

.service-status.degraded {
    background: rgba(245, 158, 11, 0.1);
    color: var(--status-degraded);
}

.service-status.down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-down);
}

.service-status.maintenance {
    background: rgba(99, 102, 241, 0.1);
    color: var(--status-maintenance);
}

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

.environment-card {
    background: rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--status-operational);
}

.environment-card.degraded {
    border-left-color: var(--status-degraded);
}

.environment-card.down {
    border-left-color: var(--status-down);
}

.environment-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--theme-dark-blue-lt-color);
}

.environment-details {
    color: var(--theme-secondary-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Incidents */
.incident-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.no-incidents {
    text-align: center;
    color: var(--theme-secondary-color);
    padding: 20px;
    opacity: 0.7;
}

.incident-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    border-left: 4px solid var(--status-degraded);
}

.incident-item.resolved {
    border-left-color: var(--status-operational);
}

.incident-item.critical {
    border-left-color: var(--status-down);
}

.incident-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--theme-dark-blue-lt-color);
}

.incident-time {
    color: var(--theme-secondary-color);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Uptime */
.uptime-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.uptime-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.uptime-label {
    min-width: 150px;
    font-weight: 600;
    color: var(--theme-dark-blue-lt-color);
}

.uptime-bar-container {
    flex: 1;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.uptime-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--status-operational), #059669);
    transition: width 0.3s ease;
}

.uptime-percentage {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: var(--theme-dark-blue-lt-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--theme-secondary-color);
    opacity: 0.7;
}

.refresh-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--theme-blue-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    font-family: "Montserrat", sans-serif;
}

.refresh-btn:hover {
    transform: scale(1.05);
}

.refresh-btn:active {
    transform: scale(0.95);
}

.refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .overall-status {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .environment-grid {
        grid-template-columns: 1fr;
    }

    .service-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .uptime-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .uptime-label {
        min-width: auto;
    }

    .uptime-bar-container {
        width: 100%;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--theme-secondary-color);
    opacity: 0.7;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
