body {
    margin: 0;
    background: #f5f0e8;
    color: #1a1410;
    font-family: 'Special Elite', cursive;
    overflow: hidden;
}

#page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.thought {
    font-size: 16px;
    font-family: 'Special Elite', cursive;
    line-height: 1.5;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    text-align: center;
    max-width: 80vw;
    padding: 2px 0;
    pointer-events: none;
}

.interrupting {
    opacity: 0.7;
    font-style: italic;
    color: red;
    font-size: 56px;
    position: relative;
    top: 32;
    left: 102;
    animation: jitter 0.1s infinite;
}

.large {
    font-size: 28px;
}

.shaky {
    animation: jitter 0.1s infinite;
}

@keyframes jitter {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-2px, 1px);
    }

    50% {
        transform: translate(2px, -1px);
    }

    75% {
        transform: translate(-1px, -2px);
    }

    100% {
        transform: translate(1px, 2px);
    }
}

#calm-btn {
    border: 2px solid #1a1410;
    display: block;
    color: #1a1410;
    background-color: transparent;
    position: fixed;
    font-size: 22px;
    padding: 12px 28px;
    margin-top: 0;
    opacity: 0;
    transition: opacity 1.5s ease, background-color 0.3s, border-color 0.4s, color 0.3s;
    width: auto;
    font-family: 'Special Elite', cursive;
    cursor: pointer;
    bottom: 48px;
    letter-spacing: 2px;
    z-index: 10000;
}

#calm-btn:hover {
    background-color: #1a1410;
    color: #f5f0e8;
}

#calm-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.whisper {
    font-size: 11px;
    color: #8a7f72;
    animation: fadeInFaint 1s ease forwards !important;
}

.scream {
    font-size: clamp(28px, 8vw, 72px);
    color: red;
    font-family: 'Space Mono', monospace;
    animation: fadeIn 0.05s ease forwards, screaming 0.07s infinite;
    letter-spacing: -1px;
}

.floating {
    position: absolute;
    pointer-events: none;
    animation: fadeInFaint 0.4s ease forwards !important;
}

#calm-btn.danger {
    border-color: red;
    color: darkred;
}

#calm-btn.broken {
    border-color: red;
    background-color: red;
    color: white;
    animation: jitter 0.12s infinite;
}

#vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 500;
    opacity: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(180, 30, 10, 0.5) 100%);
    transition: opacity 1s ease;
}

#flash {
    position: fixed;
    inset: 0;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 9000;
}

#static-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 8000;
    opacity: 0;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    color: rgba(192, 57, 43, 0.15);
    overflow: hidden;
    line-height: 1.1;
    word-break: break-all;
    transition: opacity 0.5s;
    padding: 4px;
}

#page.shake {
    animation: pageShake 0.3s ease;
}

body.chaos {
    animation: bgPulse 0.4s infinite;
}

body.meltdown {
    animation: bgPulse 0.15s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInFaint {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.35;
    }
}

@keyframes screaming {
    0% {
        transform: translate(0, 0) skew(0deg);
        letter-spacing: -1px;
    }

    25% {
        transform: translate(-4px, 2px) skew(-1deg);
        letter-spacing: 2px;
    }

    50% {
        transform: translate(4px, -2px) skew(1deg);
        letter-spacing: -3px;
    }

    75% {
        transform: translate(-2px, -3px) skew(0.5deg);
        letter-spacing: 4px;
    }

    100% {
        transform: translate(2px, 3px) skew(-0.5deg);
        letter-spacing: 0px;
    }
}

@keyframes pageShake {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    15% {
        transform: translate(-8px, 4px) rotate(-0.5deg);
    }

    30% {
        transform: translate(8px, -4px) rotate(0.5deg);
    }

    45% {
        transform: translate(-6px, -6px) rotate(-0.3deg);
    }

    60% {
        transform: translate(6px, 6px) rotate(0.3deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

@keyframes bgPulse {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(0.92);
    }

    100% {
        filter: brightness(1);
    }
}

.reset-msg {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f0e8;
    z-index: 99999;
    opacity: 0;
    transition: opacity 1s;
    font-family: 'Special Elite', cursive;
    text-align: center;
    gap: 24px;
}

.reset-msg p {
    font-size: 22px;
    color: #1a1410;
    opacity: 0;
    transition: opacity 1s;
}

.reset-msg button {
    font-family: 'Special Elite', cursive;
    font-size: 18px;
    border: 2px solid #1a1410;
    background: transparent;
    color: #1a1410;
    padding: 10px 28px;
    cursor: pointer;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.8s, background 0.3s;
}

.reset-msg button:hover {
    background: #1a1410;
    color: #f5f0e8;
}