/* Base Reset & Variables */
:root {
    --bg-dark: #0a0510;
    --bg-card: rgba(20, 15, 30, 0.6);
    --bg-card-hover: rgba(30, 20, 45, 0.8);
    --border-color: rgba(120, 60, 255, 0.2);
    --border-hover: rgba(150, 80, 255, 0.5);

    --text-main: #f0f0f5;
    --text-muted: #a09cb0;

    --accent-primary: #8a2be2;
    --accent-glow: rgba(138, 43, 226, 0.4);

    --status-online: #2ecc71;
    --status-offline: #e74c3c;
    --status-warning: #f1c40f;
    --status-loading: #3498db;

    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 15s infinite alternate ease-in-out;
}

.glow-1 {
    top: -200px;
    left: -100px;
}

.glow-2 {
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.glow-3 {
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    opacity: 0.3;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 30px) scale(1.1);
    }
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    flex-grow: 1;
    width: 100%;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff, var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.refresh-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

.refresh-btn i {
    font-size: 0.8rem;
}

/* Global Status */
.global-status {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.global-status:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.1);
}

.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 0 15px currentColor;
}

.status-indicator.loading {
    color: var(--status-loading);
    background: var(--status-loading);
    animation: pulse 1.5s infinite;
}

.status-indicator.online {
    color: var(--status-online);
    background: var(--status-online);
}

.status-indicator.offline {
    color: var(--status-offline);
    background: var(--status-offline);
}

.status-indicator.warning {
    color: var(--status-warning);
    background: var(--status-warning);
}

.global-status h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.global-status p {
    color: var(--text-muted);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto 4rem auto;
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.service-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--status-loading);
    transition: background 0.3s;
}

.service-card.online::before {
    background: var(--status-online);
}

.service-card.offline::before {
    background: var(--status-offline);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: var(--bg-card-hover);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-info {
    flex-grow: 1;
}

.service-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.service-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
}

.service-status-badge {
    font-size: 1.2rem;
}

.service-status-badge.status-loading {
    color: var(--status-loading);
}

.service-status-badge.status-online {
    color: var(--status-online);
}

.service-status-badge.status-offline {
    color: var(--status-offline);
}

.service-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Incidents Section */
.incidents-section {
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.incidents-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.incident-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.incident-card.empty p {
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
    animation: fadeIn 1s ease-out 1s backwards;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-divider {
    color: rgba(255, 255, 255, 0.1);
    margin: 0 0.5rem;
    font-size: 0.8rem;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}