/* status.php - Status Dashboard specific styles */
:root {
    --bg: #050508;
    --surface: rgba(13, 14, 18, 0.7);
    --surface-hover: rgba(20, 22, 28, 0.9);
    --border: rgba(255, 26, 26, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --operational: #00ff88;
    --operational-bg: rgba(0, 255, 136, 0.05);
    --degraded: #ffaa00;
    --degraded-bg: rgba(255, 170, 0, 0.05);
    --down: #ff1a1a;
    --down-bg: rgba(255, 26, 26, 0.15);
    --down-glow: rgba(255, 26, 26, 0.5);
    --ac: #ff1a1a;
    --ac-glow: rgba(255, 26, 26, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    background-color: var(--bg); 
    color: var(--text-primary); 
    font-family: 'Outfit', sans-serif; 
    line-height: 1.6;
    background-image: radial-gradient(circle at 50% 0%, rgba(255, 26, 26, 0.05) 0%, transparent 60%);
}

a { text-decoration: none; color: inherit; }
.container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }

/* Header */
header { display: flex; justify-content: space-between; align-items: center; padding: 30px 0; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.logo { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -1px; display: flex; align-items: center; gap: 12px; }
.logo-icon { background: var(--ac); padding: 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 15px var(--ac-glow); }
.logo-icon i { width: 18px; height: 18px; color: #fff; }
.logo span { color: var(--text-secondary); font-weight: 400; margin-left: -4px; }
.back-link { font-size: 14px; font-weight: 500; color: var(--text-secondary); transition: 0.2s; display: flex; align-items: center; gap: 6px; }
.back-link:hover { color: #fff; }

/* Global Status Banner */
.global-status {
    padding: 30px 40px; border-radius: 12px; margin-bottom: 40px;
    display: flex; align-items: center; justify-content: space-between;
    border: 1px solid transparent; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideDown 0.5s ease-out;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.global-status.operational i { animation: heartbeat 2s ease-in-out infinite; }
.global-status.degraded { background: var(--degraded-bg); border-color: var(--degraded); color: var(--degraded); box-shadow: 0 0 20px rgba(245, 158, 11, 0.2); }
.global-status.down { 
    background: var(--down-bg); 
    border-color: var(--down); 
    color: #fff; 
    box-shadow: 0 0 40px var(--down-glow);
    animation: criticalPulse 1.5s infinite;
}

@keyframes criticalPulse {
    0% { transform: scale(1); box-shadow: 0 0 20px var(--down-glow); }
    50% { transform: scale(1.01); box-shadow: 0 0 50px var(--down-glow); }
    100% { transform: scale(1); box-shadow: 0 0 20px var(--down-glow); }
}

.global-status-text { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; display: flex; align-items: center; gap: 16px; }
.global-status-text i { stroke-width: 2.5px; }
.refresh-text { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; font-weight: 500; }

/* Section Titles */
.section-title { font-size: 20px; font-weight: 600; margin-bottom: 24px; color: #fff; letter-spacing: -0.5px; display: flex; align-items: center; gap: 10px; }

/* Services List */
.services-list { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 60px; }
.service-item { padding: 24px 30px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; }
.service-item:last-child { border-bottom: none; }
.service-header { display: flex; justify-content: space-between; align-items: flex-start; }
.service-info { display: flex; align-items: center; gap: 16px; }
.service-info i { color: var(--text-secondary); }
.service-name { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.service-desc { font-size: 13px; color: var(--text-secondary); }
.service-status { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 50px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-operational { background: var(--operational); box-shadow: 0 0 10px var(--operational); }
.dot-degraded { background: var(--degraded); box-shadow: 0 0 10px var(--degraded); animation: heartbeat 2s infinite; }
.dot-down { background: var(--down); box-shadow: 0 0 15px var(--down); animation: criticalPulse 1s infinite; }

/* Uptime Bar */
.uptime-tracker { display: flex; flex-direction: column; gap: 8px; }
.uptime-bars { display: flex; gap: 4px; height: 32px; align-items: stretch; }
.bar { flex: 1; border-radius: 2px; opacity: 0.85; transition: 0.2s; cursor: crosshair; }
.bar:hover { opacity: 1; transform: scaleY(1.1); }
.bar.operational { background: var(--operational); }
.bar.degraded { background: var(--degraded); }
.bar.down { background: var(--down); }
.uptime-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); font-weight: 500; }

/* Metrics Grid */
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 60px; }
.metric-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.metric-title { font-size: 13px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 16px; }
.metric-value { font-size: 32px; font-weight: 700; color: #fff; margin-bottom: 12px; font-family: 'JetBrains Mono', monospace; }
.gauge-bg { width: 100%; height: 4px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.gauge-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 1s; }

/* Nodes Table */
.nodes-container { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { padding: 16px 24px; text-align: left; font-size: 12px; color: var(--text-secondary); text-transform: uppercase; font-weight: 600; border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.2); }
td { padding: 16px 24px; border-bottom: 1px solid var(--border); font-size: 14px; }
tr:last-child td { border-bottom: none; }
.node-id { font-family: 'JetBrains Mono', monospace; color: var(--text-secondary); font-size: 12px; }

/* Footer */
footer { margin-top: 80px; padding: 40px 0; border-top: 1px solid var(--border); text-align: center; color: var(--text-secondary); font-size: 13px; }

/* Spin & Heartbeat animations */
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes heartbeat {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.global-status.operational i { animation: heartbeat 2s ease-in-out infinite; }
.metric-card { 
    background: var(--surface); 
    border: 1px solid var(--border); 
    border-radius: 20px; 
    padding: 28px;
    transition: 0.3s;
    backdrop-filter: blur(10px);
}
.metric-card:hover { background: var(--surface-hover); transform: translateY(-5px); border-color: rgba(255, 26, 26, 0.2); }

@media (max-width: 768px) {
    .metrics-grid { grid-template-columns: 1fr; }
    .global-status { flex-direction: column; text-align: center; gap: 16px; padding: 24px; }
    .global-status-text { flex-direction: column; gap: 12px; }
}
