/* senggack.xyz - Brutalist Glitch Anti-Design */
/* Palette: #f0f0f0 #ffffff #000000 #ff0000 #d4d4d4 #00ffff #ff00ff #888888 #333333 */

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #f0f0f0;
}

body {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #000000;
    background-color: #f0f0f0;
    overflow-x: auto;
}

/* ===== The Noise Field ===== */
#noise-field {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

#scatter-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.scatter-text {
    position: absolute;
    font-family: 'Rubik Glitch', sans-serif;
    font-weight: 400;
    color: #888888;
    user-select: none;
    cursor: default;
    transition: color 0.1s, transform 0.1s;
    white-space: nowrap;
}

.scatter-text:hover {
    color: #00ffff;
    transform: scale(1.2);
    z-index: 10;
}

#center-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border: 2px solid #000000;
    padding: 24px;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s;
}

#center-box.visible {
    opacity: 1;
}

#center-label {
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 0.05em;
}

/* ===== The Fragments ===== */
#fragments {
    position: relative;
    min-height: 300vh;
    padding: 80px 0;
}

.fragment-block {
    position: absolute;
    max-width: 500px;
    background: #ffffff;
    border: 3px solid #000000;
    padding: 16px;
}

#frag-1 {
    top: 5%;
    left: 20%;
}

#frag-2 {
    top: 25%;
    left: 30%;
    z-index: 2;
}

#frag-3 {
    top: 50%;
    right: -40px;
    max-width: 450px;
}

.fragment-block fieldset {
    border: 2px solid #000000;
    padding: 16px;
}

.fragment-block legend {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    padding: 0 8px;
}

.fragment-block summary {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
}

.fragment-block p {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    line-height: 1.5;
    color: #000000;
}

.fragment-block blockquote {
    border-left: 4px solid #000000;
    padding-left: 16px;
}

/* Accent highlight */
.accent-cyan {
    color: #00ffff;
    background: #000000;
    padding: 0 4px;
}

.accent-magenta {
    color: #ff00ff;
}

/* ===== The Error Section ===== */
#error-section {
    position: relative;
    min-height: 100vh;
    background: #d4d4d4;
    padding: 60px 20px;
}

#glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    background: #ff0000;
}

#crash-screen {
    max-width: 800px;
    margin: 0 auto;
}

#error-message {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #333333;
    margin-bottom: 24px;
    min-height: 40px;
}

#core-dump {
    opacity: 0;
    transition: opacity 0.1s;
}

#core-dump.visible {
    opacity: 1;
}

#dump-content {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 400;
    color: #333333;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: none;
    border: none;
}

#final-line {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #000000;
    margin-top: 48px;
    opacity: 0;
    transition: opacity 0.5s;
}

#final-line.visible {
    opacity: 1;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .scatter-text {
        transition: none;
    }

    #center-box {
        opacity: 1;
        transition: none;
    }

    #glitch-overlay {
        display: none;
    }

    #core-dump {
        opacity: 1;
        transition: none;
    }

    #final-line {
        opacity: 1;
        transition: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #frag-1 {
        left: 5%;
    }

    #frag-2 {
        left: 10%;
    }

    #frag-3 {
        right: -20px;
    }

    .fragment-block {
        max-width: 85vw;
    }
}
