@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131a;
    --bg-tertiary: #1a1a24;
    --accent-green: #00ff88;
    --accent-cyan: #00ccff;
    --accent-red: #ff4466;
    --accent-orange: #ffaa00;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.5);
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 60px 70px, #fff, transparent),
        radial-gradient(1px 1px at 50px 50px, #ddd, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, #eee, transparent);
    background-size: 200px 200px;
    opacity: 0.15;
    animation: twinkle 200s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 60px;
}

.logo-container {
    margin-bottom: 30px;
}

.logo {
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.5));
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.title {
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.status-hero {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 30px;
    padding: 60px 40px;
    border: 2px solid var(--border);
    box-shadow: 0 30px 80px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.status-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
}

.status-circle {
    margin: 0 auto 30px;
    width: 120px;
    height: 120px;
    position: relative;
}

.circle-bg {
    opacity: 0.2;
}

.circle-progress {
    stroke-dasharray: 314;
    stroke-dashoffset: 0;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 1s ease;
}

.status-text {
    font-size: 24px;
    font-weight: 700;
    fill: currentColor;
}

.status-hero h2 {
    font-size: 2.2em;
    margin-bottom: 15px;
    font-weight: 700;
}

.update-time {
    color: var(--text-secondary);
    font-size: 1em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 35px;
    border: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.5;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow);
    border-color: currentColor;
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid currentColor;
}

.stat-online { color: var(--accent-green); }
.stat-offline { color: var(--accent-red); }
.stat-uptime { color: var(--accent-cyan); }
.stat-response { color: var(--accent-orange); }

.stat-value {
    font-size: 3em;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95em;
    font-weight: 500;
}

.section {
    background: var(--bg-secondary);
    border-radius: 28px;
    padding: 30px;
    margin-bottom: 24px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border);
    user-select: none;
}

.section-header:hover h3 {
    color: var(--accent-green);
}

.section-header h3 {
    font-size: 1.5em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: color 0.3s;
}

.section-icon {
    font-size: 1.3em;
}

.toggle-icon {
    color: var(--text-secondary);
    font-size: 1.3em;
    transition: transform 0.3s;
}

.section-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.services {
    display: grid;
    gap: 16px;
    margin-top: 25px;
}

.service {
    background: var(--bg-tertiary);
    padding: 28px;
    border-radius: 20px;
    border: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--accent-green);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.service:hover {
    transform: translateX(8px);
    border-color: var(--accent-green);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.service:hover::before {
    transform: scaleY(1);
}

.service.error::before {
    background: var(--accent-red);
}

.service.error:hover {
    border-color: var(--accent-red);
    box-shadow: 0 10px 30px rgba(255, 68, 102, 0.2);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.service-status {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.service-status.error {
    background: var(--accent-red);
    animation: pulse-ring-error 2s infinite;
}

@keyframes pulse-ring-error {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 102, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 68, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 102, 0); }
}

.service-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.service-name {
    font-weight: 700;
    font-size: 1.2em;
}

.service-endpoint {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.service-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.service-uptime {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--accent-green);
}

.service.error .service-uptime {
    color: var(--accent-red);
}

.service-response {
    color: var(--text-secondary);
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .title {
        font-size: 2em;
    }
    
    .service {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .service-metrics {
        align-items: flex-start;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
