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

/* === CRT FLICKER === */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.98; }
    94% { opacity: 1; }
    96% { opacity: 0.97; }
    97% { opacity: 1; }
}

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

/* === BASE === */
body {
    min-height: 100vh;
    background-color: #0a0a0a;
    color: #00f2ea;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    line-height: 1.6;
    overflow-x: hidden;
}

.jersey-10-regular {
    font-family: "Jersey 10", sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* === CRT SHELL === */
.crt {
    position: relative;
    min-height: 100vh;
    animation: flicker 8s infinite;
}

/* Vignette */
.crt::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.65) 100%);
    pointer-events: none;
    z-index: 100;
}

/* Scanlines overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    pointer-events: none;
    z-index: 99;
}

.crt-screen {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* === TERMINAL NAV === */
.terminal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
    border: 1px solid #00f2ea;
    box-shadow: 0 0 8px rgba(0, 242, 234, 0.25), inset 0 0 8px rgba(0, 242, 234, 0.05);
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(0.8rem, 1.6vw, 0.95rem);
}

.terminal-nav a {
    color: #00f2ea;
    text-decoration: none;
    transition: text-shadow 0.2s ease;
}

.terminal-nav a:hover,
.terminal-nav a.active {
    text-shadow: 0 0 6px #00f2ea, 0 0 12px #00f2ea;
}

/* === PHOSPHOR GLOW HEADINGS === */
h1, h2, h3 {
    color: #fff;
    text-shadow: 0 0 4px rgba(0, 242, 234, 0.6), 0 0 10px rgba(0, 242, 234, 0.3);
}

/* === SECTION TITLE PREFIX === */
.section-title::before {
    content: '> ';
    color: #00f2ea;
}

/* === TERMINAL BOX === */
.terminal-box {
    border: 1px solid #00f2ea;
    background: rgba(0, 20, 20, 0.6);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 8px rgba(0, 242, 234, 0.2), inset 0 0 8px rgba(0, 242, 234, 0.05);
}

/* === HOME PAGE === */
.Eggonomics {
    max-width: min(90vw, 720px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.Eggonomics .logo {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.Eggonomics .subtitle {
    color: rgba(0, 242, 234, 0.9);
    text-align: center;
    margin-top: 1rem;
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
}

.Eggonomics .tiktok-link {
    display: inline-block;
    margin-top: 1rem;
    color: #00f2ea;
    text-decoration: none;
    font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    text-shadow: 0 0 4px rgba(0, 242, 234, 0.4);
    transition: text-shadow 0.2s ease;
}

.Eggonomics .tiktok-link:hover {
    text-shadow: 0 0 8px #00f2ea, 0 0 16px #00f2ea;
}

.Eggonomics .about {
    margin-top: 2.5rem;
    width: 100%;
}

.Eggonomics .about .section-title {
    color: #fff;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 4px rgba(0, 242, 234, 0.6), 0 0 10px rgba(0, 242, 234, 0.3);
}

.Eggonomics .about .section-title:first-child {
    margin-top: 0;
}

.Eggonomics .about .section-text {
    color: rgba(0, 242, 234, 0.88);
    font-size: clamp(0.9rem, 1.9vw, 1.05rem);
    line-height: 1.6;
    max-width: 60ch;
}

/* === STATUS PAGE === */
.status-panel {
    text-align: center;
    padding: 2rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.ok {
    background: #00ff41;
    box-shadow: 0 0 6px #00ff41, 0 0 12px #00ff41;
}

.status-dot.degraded {
    background: #ffaa00;
    box-shadow: 0 0 6px #ffaa00, 0 0 12px #ffaa00;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.unknown {
    background: #666;
    box-shadow: 0 0 4px #666;
}

.status-text {
    font-weight: bold;
    letter-spacing: 0.05em;
}

.status-text.ok { color: #00ff41; text-shadow: 0 0 6px rgba(0, 255, 65, 0.4); }
.status-text.degraded { color: #ffaa00; text-shadow: 0 0 6px rgba(255, 170, 0, 0.4); }
.status-text.unknown { color: #666; }

.status-message {
    color: rgba(0, 242, 234, 0.8);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.status-timestamp {
    color: rgba(0, 242, 234, 0.5);
    margin-top: 1rem;
    font-size: 0.8rem;
}

.status-legend {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(0, 242, 234, 0.6);
}

.status-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.status-legend .status-dot {
    width: 8px;
    height: 8px;
}

/* === DOCUMENT PAGES (Privacy / Terms) === */
.doc-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 242, 234, 0.3);
}

.doc-id {
    font-size: 0.8rem;
    color: rgba(0, 242, 234, 0.5);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.doc-title {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    margin-bottom: 0.25rem;
}

.doc-date {
    font-size: 0.8rem;
    color: rgba(0, 242, 234, 0.5);
}

.doc-intro {
    color: rgba(0, 242, 234, 0.85);
    line-height: 1.7;
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    margin-bottom: 0.75rem;
}

.doc-section {
    margin-bottom: 1.75rem;
}

.doc-section h3 {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 0.5rem;
    color: #fff;
}

.doc-section h3::before {
    content: '> ';
    color: #00f2ea;
}

.doc-section p,
.doc-section ul {
    color: rgba(0, 242, 234, 0.85);
    line-height: 1.7;
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
}

.doc-section ul {
    list-style: none;
    padding-left: 1.5rem;
}

.doc-section ul li::before {
    content: '- ';
    color: #00f2ea;
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    .crt {
        animation: none;
    }
    .status-dot.degraded {
        animation: none;
    }
}

/* === MOBILE === */
@media (max-width: 600px) {
    .scanlines {
        background: repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.08) 2px,
            rgba(0, 0, 0, 0.08) 4px
        );
    }

    .crt-screen {
        padding: 1rem;
    }

    .terminal-nav {
        gap: 0.3rem 0.6rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .status-legend {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}
