:root {
    --bg-main: #0a0a0c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #94A3B8;

    --color-up: #10B981;
    --color-up-bg: rgba(16, 185, 129, 0.1);

    --color-degraded: #F59E0B;
    --color-degraded-bg: rgba(245, 158, 11, 0.1);

    --color-down: #EF4444;
    --color-down-bg: rgba(239, 68, 68, 0.1);

    --glow-primary: rgba(59, 130, 246, 0.15);
    --glow-secondary: rgba(139, 92, 246, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Telegram Subscribe Button */
.telegram-subscribe {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.6rem 1.1rem;
    background: rgba(38, 165, 228, 0.15);
    border: 1px solid rgba(38, 165, 228, 0.3);
    border-radius: 999px;
    color: #26A5E4;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.telegram-subscribe:hover {
    background: rgba(38, 165, 228, 0.25);
    border-color: rgba(38, 165, 228, 0.5);
    box-shadow: 0 0 20px rgba(38, 165, 228, 0.2);
    transform: translateY(-1px);
}

.telegram-icon {
    width: 20px;
    height: 20px;
}

/* Dynamic Ambient Background Glow */
.background-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-primary) 0%, transparent 60%);
    top: -200px;
    left: -200px;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(60px);
}

.background-glow.pos-2 {
    background: radial-gradient(circle, var(--glow-secondary) 0%, transparent 60%);
    bottom: -200px;
    right: -200px;
    top: auto;
    left: auto;
}

.container {
    width: 100%;
    max-width: 1000px;
    padding: 3rem 1.5rem;
    z-index: 10;
    flex: 1;
}

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: 0.5rem;
}

.lens-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.lens-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.4);
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94A3B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Global Status Banner */
.global-status {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-secondary);
}

/* Specific Status Colors */
.global-status.all-up {
    background-color: var(--color-up-bg);
    border-color: rgba(16, 185, 129, 0.3);
}

.global-status.all-up .status-indicator {
    background-color: var(--color-up);
    box-shadow: 0 0 10px var(--color-up);
    animation: pulse 2s infinite;
}

.global-status.all-up .status-text {
    color: var(--color-up);
}

.global-status.issues {
    background-color: var(--color-degraded-bg);
    border-color: rgba(245, 158, 11, 0.3);
}

.global-status.issues .status-indicator {
    background-color: var(--color-degraded);
    box-shadow: 0 0 10px var(--color-degraded);
    animation: pulse 1s infinite;
}

.global-status.issues .status-text {
    color: var(--color-degraded);
}

/* Grid Layout */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Service Card Link Wrapper */
.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Service Card Glassmorphism */
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    animation: fadeInUp 0.5s ease-out backwards;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.provider-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.provider-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 4px;
}

/* Assign Logos directly using some simple svgs/emojis for the icon if no image provided, or background property via JS */

.provider-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* status=UP */
.service-card[data-status="UP"] .status-badge {
    background: var(--color-up-bg);
    color: var(--color-up);
}

.service-card[data-status="UP"] .badge-dot {
    background: var(--color-up);
    box-shadow: 0 0 5px var(--color-up);
}

/* status=DEGRADED */
.service-card[data-status="DEGRADED"] .status-badge {
    background: var(--color-degraded-bg);
    color: var(--color-degraded);
}

.service-card[data-status="DEGRADED"] .badge-dot {
    background: var(--color-degraded);
    box-shadow: 0 0 5px var(--color-degraded);
}

/* status=DOWN */
.service-card[data-status="DOWN"] .status-badge {
    background: var(--color-down-bg);
    color: var(--color-down);
}

.service-card[data-status="DOWN"] .badge-dot {
    background: var(--color-down);
    box-shadow: 0 0 5px var(--color-down);
}

.status-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.last-checked {
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    margin-top: auto;
}

/* Skeletons */
.skeleton .skeleton-header {
    height: 24px;
    width: 40%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.skeleton .skeleton-body {
    height: 14px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 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 pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}