/* ===================================================
   STATUS.CSS — صفحة الحالة
   يُستخدم مع main.css
   =================================================== */

/* ===== STATUS PAGE WRAPPER ===== */
.status-page {
    min-height: 100vh;
    padding-bottom: 80px;
}

/* ===== HERO BANNER ===== */
.status-hero {
    position: relative;
    padding: 140px 6% 70px;
    text-align: center;
    overflow: hidden;
}

/* Subtle background grid */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(235, 235, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(235, 235, 235, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, transparent 70%);
}

.status-hero-inner {
    position: relative;
    z-index: 2;
}

/* Overall operational indicator */
.overall-indicator {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overall-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #22c55e;
    position: relative;
    z-index: 2;
    transition: background 0.4s ease;
}

.overall-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.2);
    animation: outerPulse 2.5s ease-out infinite;
}

@keyframes outerPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.overall-indicator.degraded .overall-dot {
    background: #f59e0b;
}

.overall-indicator.degraded .overall-pulse {
    background: rgba(245, 158, 11, 0.2);
}

.overall-indicator.incident .overall-dot {
    background: #f97316;
}

.overall-indicator.incident .overall-pulse {
    background: rgba(249, 115, 22, 0.2);
}

.overall-indicator.outage .overall-dot {
    background: #ef4444;
}

.overall-indicator.outage .overall-pulse {
    background: rgba(239, 68, 68, 0.2);
}

.status-hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.status-hero-sub {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    padding: 7px 16px;
    border-radius: 50px;
}

.refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.refresh-btn svg {
    width: 15px;
    height: 15px;
}

.refresh-btn.spin {
    animation: rotate 0.5s linear;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.refresh-btn:hover {
    color: var(--text);
}

.refresh-btn.spinning svg {
    animation: spin 0.7s ease;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== CONTAINER ===== */
.status-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 6%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== SUMMARY ROW ===== */
.summary-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.summary-card {
    flex: 1;
    min-width: 110px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-medium);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.summary-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-3px);
}

.summary-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(235, 235, 235, 0.07);
    border-radius: 10px;
    color: var(--text);
}

.summary-icon svg {
    width: 18px;
    height: 18px;
}

.summary-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim);
}

.summary-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #555;
    transition: background 0.4s ease;
}

/* ===== STATUS COLORS ===== */
.summary-status-dot.operational,
.service-dot.operational,
.legend-dot.operational,
.overall-dot.operational {
    background: #22c55e;
}

.summary-status-dot.degraded,
.service-dot.degraded,
.legend-dot.degraded {
    background: #f59e0b;
}

.summary-status-dot.incident,
.service-dot.incident,
.legend-dot.incident {
    background: #f97316;
}

.summary-status-dot.outage,
.service-dot.outage,
.legend-dot.outage {
    background: #ef4444;
}

.summary-status-dot.checking,
.service-dot.checking {
    background: #6b7280;
    animation: blink 1.2s ease infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ===== STATUS SECTION ===== */
.status-section {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-large);
    overflow: hidden;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    transition: all 0.4s ease;
    position: relative;
}

.status-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.status-section:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Section Header */
.section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(235, 235, 235, 0.06);
}

.section-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-icon svg {
    width: 22px;
    height: 22px;
}

/* Icon colors */
.servers-icon {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.database-icon {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.discord-icon-s {
    background: rgba(88, 101, 242, 0.15);
    color: #818cf8;
    border: 1px solid rgba(88, 101, 242, 0.2);
}

.bots-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.apis-icon {
    background: rgba(236, 72, 153, 0.12);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.section-title-s {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 2px;
}

.section-sub {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Section badge */
.section-badge-status {
    margin-right: auto;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.section-badge-status.operational {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.section-badge-status.degraded {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.section-badge-status.incident {
    background: rgba(249, 115, 22, 0.12);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.25);
}

.section-badge-status.outage {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.section-badge-status:not(.operational):not(.degraded):not(.incident):not(.outage) {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

/* ===== SERVICES LIST ===== */
.services-list {
    display: flex;
    flex-direction: column;
}

.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(235, 235, 235, 0.04);
    transition: background 0.2s ease;
    gap: 12px;
}

.service-row:last-child {
    border-bottom: none;
}

.service-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.service-dot {
    width: 9px;
    height: 9px;
    min-width: 9px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.service-name {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.service-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* Discord server link */
.discord-server-link {
    color: #818cf8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.discord-server-link:hover {
    color: #a5b4fc;
}

.service-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.service-ping {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 40px;
    text-align: left;
}

/* Service tags */
.service-tag {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.service-tag.operational {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}

.service-tag.degraded {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.service-tag.incident {
    background: rgba(249, 115, 22, 0.1);
    color: #fb923c;
}

.service-tag.outage {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.service-tag.checking {
    background: rgba(107, 114, 128, 0.12);
    color: #9ca3af;
}

/* ===== LEGEND ===== */
.legend-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    padding: 18px 24px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-medium);
    margin-top: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-dim);
    font-weight: 600;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .status-hero {
        padding: 120px 5% 50px;
    }

    .status-container {
        padding: 0 5%;
    }

    .summary-row {
        gap: 8px;
    }

    .summary-card {
        min-width: 80px;
        padding: 12px 8px;
    }

    .summary-label {
        font-size: 0.7rem;
    }

    .section-head {
        padding: 18px 16px;
        gap: 12px;
    }

    .service-row {
        padding: 14px 16px;
    }

    .service-ping {
        display: none;
    }
}

@media (max-width: 480px) {
    .summary-row {
        gap: 6px;
    }

    .summary-card {
        min-width: 60px;
        padding: 10px 6px;
    }

    .summary-icon {
        width: 28px;
        height: 28px;
    }

    .summary-icon svg {
        width: 14px;
        height: 14px;
    }

    .section-badge-status {
        display: none;
    }

    .legend-bar {
        gap: 16px;
    }
}