:root {
    --bg-color: #0f1115;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-green: #00ff9d;
    --accent-red: #ff3b3b;
    --accent-blue: #3b82ff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-radius: 16px;
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Ambient Glow */
.background-glow {
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 255, 0.1), transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Header / Status Card */
.status-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.status-indicator {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.status-indicator::after {
    content: '';
    width: 20px;
    height: 20px;
    background-color: var(--text-secondary);
    /* Default / Loading */
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
    transition: all 0.5s ease;
}

.status-indicator.up::after {
    background-color: var(--accent-green);
    box-shadow: 0 0 20px var(--accent-green);
}

.status-indicator.down::after {
    background-color: var(--accent-red);
    box-shadow: 0 0 20px var(--accent-red);
}

.pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0;
        border-color: var(--text-secondary);
    }

    50% {
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
        border-color: transparent;
    }
}

.status-indicator.up .pulse {
    border-color: var(--accent-green);
}

.status-indicator.down .pulse {
    border-color: var(--accent-red);
}

.status-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.status-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.last-updated {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 0.5rem;
    display: block;
}

/* Chart Section */
.chart-section {
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.live-badge {
    background: rgba(255, 59, 59, 0.2);
    color: var(--accent-red);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: flash 1.5s infinite alternate;
}

@keyframes flash {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
    }
}

.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Popular Services Grid */
.popular-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    gap: 0.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
    cursor: default;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
}

.service-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.service-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.service-status.operational {
    color: var(--accent-green);
    background: rgba(0, 255, 157, 0.1);
}

.service-status.issues {
    color: var(--accent-red);
    background: rgba(255, 59, 59, 0.15);
}

/* AI Section */
.ai-section {
    min-height: 200px;
}

.ai-icon {
    margin-right: 0.5rem;
}

.ai-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    color: var(--accent-blue);
    min-height: 120px;
    position: relative;
}

.ai-loading {
    display: flex;
    gap: 6px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.ai-terminal p {
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.ai-terminal .highlight {
    color: var(--accent-green);
    font-weight: bold;
}

.ai-terminal .error {
    color: var(--accent-red);
    font-weight: bold;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Report Button */
.report-button-section {
    text-align: center;
    margin-top: 1rem;
}

.report-button-section p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.btn-report {
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 59, 59, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-main);
}

.btn-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 59, 0.4);
}

.btn-report:active {
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .status-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}