/* ============================================
   FLEXBIO.LINK - Status Page CSS
   System status monitoring page - Blue Theme
   ============================================ */

:root {
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --accent-light: #7289da;
    --accent-glow: rgba(88, 101, 242, 0.5);
    --gradient-primary: linear-gradient(135deg, #4752c4 0%, #5865f2 50%, #7289da 100%);
    --gradient-card: linear-gradient(145deg, rgba(17, 19, 32, 0.95), rgba(8, 10, 18, 0.98));
    --glass-bg: rgba(12, 14, 24, 0.9);
    --glass-border: rgba(88, 101, 242, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #b9bbbe;
    --text-muted: #72767d;
    --dark-bg: #0a0c14;
    --success: #3ba55c;
    --error: #ed4245;
    --warning: #faa61a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background */
.status-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.status-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(88, 101, 242, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(71, 82, 196, 0.1) 0%, transparent 50%);
    animation: bgMove 25s ease-in-out infinite;
}

@keyframes bgMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(2%, 2%); }
}

/* Main container */
.status-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 2rem;
}

.status-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.status-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.status-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.status-logo i {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-logo span {
    font-size: 1.5rem;
    font-weight: 800;
}

.status-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #e4e4e7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Overall status banner */
.overall-status {
    background: var(--gradient-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.status-icon.operational {
    background: rgba(59, 165, 92, 0.15);
    color: var(--success);
    box-shadow: 0 0 30px rgba(59, 165, 92, 0.3);
}

.status-icon.degraded {
    background: rgba(250, 166, 26, 0.15);
    color: var(--warning);
    box-shadow: 0 0 30px rgba(250, 166, 26, 0.3);
}

.status-icon.outage {
    background: rgba(237, 66, 69, 0.15);
    color: var(--error);
    box-shadow: 0 0 30px rgba(237, 66, 69, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.status-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.status-text p {
    color: var(--text-secondary);
}

.status-text .last-updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Services list */
.services-section {
    margin-bottom: 2rem;
}

.services-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.service-card {
    background: var(--gradient-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
    animation-fill-mode: both;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.15s; }
.service-card:nth-child(3) { animation-delay: 0.2s; }
.service-card:nth-child(4) { animation-delay: 0.25s; }
.service-card:nth-child(5) { animation-delay: 0.3s; }

.service-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s;
}

.service-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-info i {
    font-size: 1.25rem;
    color: var(--accent);
    width: 36px;
    text-align: center;
}

.service-info h4 {
    font-size: 1rem;
    font-weight: 600;
}

.service-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.service-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-badge {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.operational {
    background: rgba(59, 165, 92, 0.15);
    color: var(--success);
    border: 1px solid rgba(59, 165, 92, 0.3);
}

.status-badge.degraded {
    background: rgba(250, 166, 26, 0.15);
    color: var(--warning);
    border: 1px solid rgba(250, 166, 26, 0.3);
}

.status-badge.outage {
    background: rgba(237, 66, 69, 0.15);
    color: var(--error);
    border: 1px solid rgba(237, 66, 69, 0.3);
}

.status-badge.maintenance {
    background: rgba(88, 101, 242, 0.15);
    color: var(--accent);
    border: 1px solid rgba(88, 101, 242, 0.3);
}

/* Uptime bar */
.uptime-bar {
    display: flex;
    gap: 2px;
    padding: 0 1.5rem 1.25rem;
}

.uptime-day {
    flex: 1;
    height: 28px;
    border-radius: 3px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}

.uptime-day:hover {
    transform: scaleY(1.1);
}

.uptime-day.up {
    background: var(--success);
}

.uptime-day.degraded {
    background: var(--warning);
}

.uptime-day.down {
    background: var(--error);
}

.uptime-day.no-data {
    background: rgba(255, 255, 255, 0.1);
}

.uptime-day::after {
    content: attr(data-date);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 0.6rem;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 100;
}

.uptime-day:hover::after {
    opacity: 1;
    visibility: visible;
}

.uptime-stats {
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Incidents section */
.incidents-section {
    margin-bottom: 2rem;
}

.incidents-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.incident-card {
    background: var(--gradient-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 0.75rem;
}

.incident-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.incident-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 0.3rem;
    flex-shrink: 0;
}

.incident-indicator.resolved {
    background: var(--success);
}

.incident-indicator.investigating {
    background: var(--warning);
    animation: pulse 2s ease-in-out infinite;
}

.incident-indicator.identified {
    background: var(--accent);
}

.incident-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.incident-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.incident-updates {
    margin-left: 1.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 1rem;
}

.incident-update {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.incident-update:last-child {
    border-bottom: none;
}

.incident-update .update-status {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.incident-update .update-status.resolved { color: var(--success); }
.incident-update .update-status.monitoring { color: var(--accent); }
.incident-update .update-status.investigating { color: var(--warning); }
.incident-update .update-status.identified { color: var(--warning); }

.incident-update .update-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.incident-update .update-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.no-incidents {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.no-incidents i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.no-incidents h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.no-incidents p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer */
.status-footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 2rem;
}

.status-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.status-footer a {
    color: var(--accent);
    text-decoration: none;
}

.status-footer a:hover {
    text-decoration: underline;
}

/* Subscribe button */
.subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: 1rem;
}

.subscribe-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .status-wrapper {
        padding: 1rem;
    }
    
    .status-header h1 {
        font-size: 2rem;
    }
    
    .overall-status {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .service-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .service-status {
        width: 100%;
        justify-content: space-between;
    }
    
    .uptime-bar {
        display: none;
    }
}
