@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');
@import url('page.css');
@import url('crt.css');

/* You can add global overrides or shared rules here if needed */

body, html {
    margin: 0;
    padding: 0;
    background: #060606;
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    color: #ffb86b;
    /* Allow scrolling */
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    text-shadow: 0 0 1px #ff9900b0;
}

#screen {
    width: 100%;
    min-height: 100vh;
    height: auto;
    background: radial-gradient(#0b0b0b, #000);
    padding: 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border: none;
    box-shadow: none;
    border-radius: 0;
    filter: contrast(1.05) brightness(1.02);
    /* Remove overflow hidden to allow scroll */
    overflow: visible;
}

#screen::before {
    content: '';
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background:
        repeating-linear-gradient(to bottom,
            rgba(255, 255, 255, 0.04) 0px,
            rgba(255, 255, 255, 0.04) 1px,
            transparent 1px,
            transparent 4px),
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.25) 100%);
    mix-blend-mode: screen;
}

.glow {
    box-shadow: 0 0 32px 8px #ffb30066, 0 0 128px 32px #ffb30022;
    opacity: 0.15;
    filter: blur(0.1px) drop-shadow(0 0 2px #ffb300cc);
}

.title {
    font-size: 1.4rem;
    letter-spacing: 0.2em;
    opacity: 0.7;
    filter: blur(0.1px) drop-shadow(0 0 2px #ffb300cc);
}

.log {
    font-size: 0.9rem;
    margin-top: 2rem;
    white-space: pre-wrap;
    word-break: break-word;
    color: #eb9824cf;
    margin-left: 2.5rem;
}

.options {
    margin-top: 3rem;
    margin-left: 2.5rem;
}

.option {
    cursor: pointer;
    color: #ffb86b;
    display: block;
    margin-bottom: 1rem;
    text-decoration: underline;
}

.option:hover {
    color: #fff3e0;
}

.glitch {
    position: absolute;
    top: 10%;
    left: 30%;
    font-size: 3rem;
    color: #ffb30044;
    transform: rotate(-5deg);
    animation: glitchMove 3s infinite;
    pointer-events: none;
}

@keyframes glitchMove {
    0% { transform: translate(0, 0) rotate(-5deg); }
    50% { transform: translate(-4px, 2px) rotate(-4deg); }
    100% { transform: translate(2px, -2px) rotate(-5deg); }
}

audio {
    display: none;
}

.log,
.title,
.footer,
.option {
    text-shadow:
        0 0 2px #ffb300cc,
        0 0 8px #ffb30022,
        0 0 1px #ff990088;
    filter: blur(0.2px);
}

.cursor {
    display: inline-block;
    animation: blinkCursor 1.2s steps(1) infinite, crtFlicker 0.13s infinite linear;
    /* Optionally, add a subtle glow for CRT */
    text-shadow: 0 0 2px #ffb300cc, 0 0 8px #ffb30022, 0 0 1px #ff990088;
}

@keyframes crtFlicker {
    0% { transform: translateX(0); }
    10% { transform: translateX(-0.6px); }
    20% { transform: translateX(0.5px); }
    30% { transform: translateX(-0.7px); }
    40% { transform: translateX(0.6px); }
    50% { transform: translateX(0); }
    60% { transform: translateX(0.5px); }
    70% { transform: translateX(-0.4px); }
    80% { transform: translateX(0.7px); }
    90% { transform: translateX(-0.5px); }
    100% { transform: translateX(0); }
}

.hidden-anim {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s;
}

.fade-in-anim {
    opacity: 1 !important;
    pointer-events: auto;
    transition: opacity 0.1s;
}

/* Responsive styles for mobile devices */
@media (max-width: 600px) {
    html, body {
        font-size: 15px;
        overflow: auto;
    }
    #screen {
        padding: 0.5rem;
        border-radius: 0;
        min-height: 100vh;
        height: auto;
        box-shadow: none;
    }
    .title {
        font-size: 1.1rem;
        text-align: center;
        padding: 0.5rem 0.2rem;
    }
    .log {
        font-size: 0.95rem;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        margin-top: 1.2rem;
    }
    .options {
        margin-top: 2rem;
        margin-left: 0;
    }
    .option {
        font-size: 1.05rem;
        padding: 0.7em 0.5em;
        margin-bottom: 0.7rem;
        text-align: left;
    }
    .footer {
        font-size: 0.85rem;
        /* padding: 0.7rem 0.2rem; */
        margin-bottom: 2.5rem;
        word-break: break-word;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    #audio-btn {
        position: static;
        display: block;
        width: 100%;
        margin: 1.5rem auto 0 auto;
        font-size: 1.1rem;
        padding: 0.7em 0;
        border-radius: 0.4em;
    }
}
