/* ============================================
   MOLTPULSE - Status Monitor Theme
   Clean, Minimal, Technical
   ============================================ */

:root {
    --bg: #0a0a0b;
    --bg-card: #111113;
    --bg-code: #0d0d0f;
    --border: #222228;
    --text: #e4e4e7;
    --text-dim: #71717a;
    --accent: #22c55e;
    --accent-glow: rgba(34, 197, 94, 0.2);
    --yellow: #eab308;
    --red: #ef4444;
    --blue: #3b82f6;
    --purple: #a855f7;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* Grain */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Container */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.mascot {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.mascot-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

.mascot-icon {
    position: relative;
    font-size: 4rem;
    z-index: 1;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1rem;
}

/* Badges */
.badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.375rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.badge:hover {
    border-color: var(--text-dim);
    color: var(--text);
}

.badge.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* Status Card */
.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.status-indicator {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-indicator .dot {
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    z-index: 1;
}

.status-indicator .pulse {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--accent-glow);
    border-radius: 50%;
    animation: statusPulse 2s ease-out infinite;
}

@keyframes statusPulse {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.status-indicator.degraded .dot { background: var(--yellow); }
.status-indicator.degraded .pulse { background: rgba(234, 179, 8, 0.2); }
.status-indicator.down .dot { background: var(--red); }
.status-indicator.down .pulse { background: rgba(239, 68, 68, 0.2); }

.status-label {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent);
}

.status-time {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Info Box */
.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.info-box p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.tip {
    background: rgba(234, 179, 8, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border-left: 3px solid var(--yellow);
}

/* Integration Section */
.integration-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-icon {
    font-size: 1.25rem;
}

.section-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.section-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Code Block */
.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.copy-btn {
    padding: 0.375rem 0.75rem;
    background: var(--border);
    border: none;
    border-radius: 5px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--text-dim);
    color: var(--bg);
}

.code-content {
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
}

.code-content code {
    color: var(--text);
}

/* Syntax Highlighting */
.comment { color: #6b7280; }
.keyword { color: #c084fc; }
.variable { color: #60a5fa; }
.string { color: #4ade80; }
.function { color: #fbbf24; }
.boolean { color: #f472b6; }
.number { color: #f472b6; }

/* Steps */
.steps-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.step:hover {
    border-color: var(--text-dim);
}

.step-num {
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    margin-bottom: 0.25rem;
}

.step-content p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Links Row */
.links-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
}

.link {
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
}

.link:hover {
    text-decoration: underline;
}

.link-dot {
    color: var(--text-dim);
}

.tip-text {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Response Section */
.response-section {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.response-status {
    padding: 0.25rem 0.5rem;
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent);
    border-radius: 4px;
}

.response-json {
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    overflow-x: auto;
}

.json-key { color: #60a5fa; }
.json-string { color: #4ade80; }
.json-num { color: #f472b6; }
.json-bool { color: #fbbf24; }

/* Uptime Section */
.uptime-section {
    margin-bottom: 2rem;
}

.uptime-section h3 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-dim);
}

.uptime-bars {
    display: flex;
    gap: 2px;
    margin-bottom: 0.75rem;
}

.uptime-bar {
    flex: 1;
    height: 32px;
    background: var(--accent);
    border-radius: 3px;
    transition: all 0.2s;
    cursor: pointer;
}

.uptime-bar:hover {
    transform: scaleY(1.1);
}

.uptime-bar.degraded { background: var(--yellow); }
.uptime-bar.down { background: var(--red); }

.uptime-legend {
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-right: 0.375rem;
}

.legend-dot.green { background: var(--accent); }
.legend-dot.yellow { background: var(--yellow); }
.legend-dot.red { background: var(--red); }

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: footerPulse 2s ease-in-out infinite;
}

@keyframes footerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 2rem 1rem;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .links-row {
        flex-direction: column;
    }
    
    .link-dot {
        display: none;
    }
}
