body {
    min-height: 100vh;
}

/* Dark theme (default) */
body[data-theme="dark"] {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

body[data-theme="dark"] .glass {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

/* Light theme */
body[data-theme="light"] {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
}

body[data-theme="light"] .glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body[data-theme="light"] .text-white {
    color: #1e293b !important;
}

body[data-theme="light"] .text-slate-200 {
    color: #475569 !important;
}

body[data-theme="light"] .text-slate-300,
body[data-theme="light"] .text-slate-400 {
    color: #64748b !important;
}

body[data-theme="light"] .text-slate-500 {
    color: #94a3b8 !important;
}

body[data-theme="light"] .border-slate-700 {
    border-color: #cbd5e1 !important;
}

body[data-theme="light"] .border-slate-700\/50 {
    border-color: rgba(203, 213, 225, 0.5) !important;
}

body[data-theme="light"] .bg-slate-800,
body[data-theme="light"] .bg-slate-900 {
    background-color: #f8fafc !important;
}

body[data-theme="light"] .bg-slate-700 {
    background-color: #e2e8f0 !important;
}

body[data-theme="light"] .bg-slate-700\/50 {
    background-color: rgba(226, 232, 240, 0.5) !important;
}

body[data-theme="light"] .divide-slate-700\/30 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(203, 213, 225, 0.3) !important;
}

body[data-theme="light"] .hover\:bg-slate-800\/30:hover {
    background-color: rgba(241, 245, 249, 0.5) !important;
}

/* ================================
   Animations
   ================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out both;
}

/* Staggered fade-in for monitor cards */
.monitor-card {
    animation: fadeIn 0.4s ease-out both;
}

.monitor-card:nth-child(1) { animation-delay: 0s; }
.monitor-card:nth-child(2) { animation-delay: 0.06s; }
.monitor-card:nth-child(3) { animation-delay: 0.12s; }
.monitor-card:nth-child(4) { animation-delay: 0.18s; }
.monitor-card:nth-child(5) { animation-delay: 0.24s; }
.monitor-card:nth-child(6) { animation-delay: 0.3s; }
.monitor-card:nth-child(7) { animation-delay: 0.36s; }
.monitor-card:nth-child(8) { animation-delay: 0.42s; }
.monitor-card:nth-child(9) { animation-delay: 0.48s; }
.monitor-card:nth-child(10) { animation-delay: 0.54s; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ================================
   Status colors - both themes
   ================================ */

body[data-theme="dark"] .status-operational { color: #10b981; }
body[data-theme="light"] .status-operational { color: #059669; }

body[data-theme="dark"] .status-degraded { color: #fbbf24; }
body[data-theme="light"] .status-degraded { color: #d97706; }

body[data-theme="dark"] .status-partial { color: #fb923c; }
body[data-theme="light"] .status-partial { color: #ea580c; }

body[data-theme="dark"] .status-major { color: #f87171; }
body[data-theme="light"] .status-major { color: #dc2626; }

body[data-theme="dark"] .status-unknown { color: #94a3b8; }
body[data-theme="light"] .status-unknown { color: #475569; }

/* ================================
   Status banner tinted backgrounds
   ================================ */

.status-banner-operational {
    border-color: rgba(16, 185, 129, 0.2) !important;
}
body[data-theme="dark"] .status-banner-operational {
    background: rgba(16, 185, 129, 0.05);
}
body[data-theme="light"] .status-banner-operational {
    background: rgba(16, 185, 129, 0.08);
}

.status-banner-degraded {
    border-color: rgba(251, 191, 36, 0.3) !important;
}
body[data-theme="dark"] .status-banner-degraded {
    background: rgba(251, 191, 36, 0.06);
}
body[data-theme="light"] .status-banner-degraded {
    background: rgba(251, 191, 36, 0.1);
}

.status-banner-partial {
    border-color: rgba(249, 115, 22, 0.3) !important;
}
body[data-theme="dark"] .status-banner-partial {
    background: rgba(249, 115, 22, 0.06);
}
body[data-theme="light"] .status-banner-partial {
    background: rgba(249, 115, 22, 0.1);
}

.status-banner-major {
    border-color: rgba(239, 68, 68, 0.3) !important;
}
body[data-theme="dark"] .status-banner-major {
    background: rgba(239, 68, 68, 0.06);
}
body[data-theme="light"] .status-banner-major {
    background: rgba(239, 68, 68, 0.1);
}

/* ================================
   Theme toggle button
   ================================ */

.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 24px;
    border: none;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* ================================
   Monitor cards - hover glow
   ================================ */

.monitor-card {
    transition: all 0.3s ease;
}

body[data-theme="dark"] .monitor-card:hover {
    border-color: rgba(148, 163, 184, 0.25) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(148, 163, 184, 0.08);
}

body[data-theme="light"] .monitor-card:hover {
    border-color: rgba(148, 163, 184, 0.4) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(148, 163, 184, 0.1);
}

/* ================================
   Uptime bars
   ================================ */

.uptime-bar {
    min-width: 3px;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.uptime-bar:hover {
    transform: scaleY(1.15);
    filter: brightness(1.15);
}

/* ================================
   Tooltip styles
   ================================ */

.tooltip {
    position: relative;
}

.tooltip .tooltip-text {
    visibility: hidden;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    border: 1px solid #334155;
    pointer-events: none;
}

body[data-theme="light"] .tooltip .tooltip-text {
    background-color: #334155;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ================================
   Monitor type badges
   ================================ */

.monitor-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ================================
   Empty state
   ================================ */

.empty-state-icon {
    opacity: 0.15;
}

body[data-theme="light"] .empty-state-icon {
    opacity: 0.25;
}
