:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --text-primary: #eee;
    --text-secondary: #aaa;
    --accent-asleep: #4a90e2;
    --accent-awake: #f39c12;
    --success: #27ae60;
    --error: #e74c3c;
    --border: #2c3e50;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.dashboard {
    width: 100%;
    max-width: 500px;
}

.status-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    border: 2px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
}

.status-asleep {
    border-color: var(--accent-asleep);
}

.status-awake {
    border-color: var(--accent-awake);
}

.status-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.status-card h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.certainty-bar {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.certainty-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-asleep), var(--accent-awake));
    transition: width 0.5s ease;
}

.certainty-text {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.metadata {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.metadata p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.badge.stale {
    background: var(--error);
    color: white;
}

.auto-refresh {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.loading {
    text-align: center;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-asleep);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-card {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid var(--error);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
}

.error-card h2 {
    color: var(--error);
    margin-bottom: 1rem;
}

.error-card button {
    background: var(--error);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.error-card button:hover {
    background: #c0392b;
}

.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 2rem;
    }

    .status-card {
        padding: 2rem;
    }

    .status-card h2 {
        font-size: 2rem;
    }
}
