:root {
    --bg-color: #0b0e14;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent-ok: #00ffa3;
    --accent-warn: #ffcc00;
    --accent-crit: #ff4d4d;
    --glass-blur: 15px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

/* Background Animated Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #4facfe;
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: #00f2fe;
    bottom: -200px;
    left: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: #7028e4;
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.1); }
}

/* Container */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.status-badge {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    backdrop-filter: blur(var(--glass-blur));
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-badge span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--card-border);
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.section-count {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Metrics Grid */
.charts-grid,
.status-grid {
    display: grid;
    gap: 1.5rem;
    flex-grow: 1;
}

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

.status-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 24px;
    backdrop-filter: blur(var(--glass-blur));
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.metric-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
}

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

.status-ok { color: var(--accent-ok); background-color: var(--accent-ok); }
.status-warn { color: var(--accent-warn); background-color: var(--accent-warn); }
.status-crit { color: var(--accent-crit); background-color: var(--accent-crit); }

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Status Card specifics - smaller, more compact */
.status-grid .metric-card {
    padding: 1.25rem;
    border-radius: 20px;
}

.status-grid .metric-value {
    font-size: 2rem;
    margin: 0.5rem 0;
}

/* Footer */
footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#timer {
    font-weight: 600;
    color: var(--text-primary);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

/* Chart Specifics */
.chart-card {
    width: 100%;
}

.charts-grid .metric-card {
    flex-direction: row;
    flex-wrap: wrap;
}

.charts-grid .metric-header {
    width: 100%;
    margin-bottom: 0.5rem;
}

.charts-grid .metric-label {
    width: 100%;
    margin-top: 0.5rem;
}

.chart-container {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-container img {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: lighten;
    transition: opacity 0.3s ease;
}

.chart-container img:hover {
    opacity: 0.9;
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    background: var(--card-bg);
    border: 1px dashed var(--card-border);
    border-radius: 24px;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .status-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
}
