@import url('https://fonts.googleapis.com/css2?family=Bitcount+Grid+Double:wght@100..900&family=Jersey+10&family=Oswald:wght@200..700&family=VT323&display=swap');

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

@keyframes bob-up-down {
    0% { transform: translateY(0); }
    50% { transform: translateY(var(--bob-amount)); }
    100% { transform: translateY(0); }
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: url("border.jpeg") center center / cover no-repeat fixed;
    height: 100vh;
    padding: 60px;
    overflow-y: hidden;
}

.crt-screen {
    background: #151520;
    height: calc(100vh - 120px);
    border: 8px solid #1a1a1a;
    border-radius: 12px;
    box-shadow: inset 0 0 60px rgba(0, 255, 100, 0.05), 0 0 15px rgba(0, 0, 0, 0.8);
    padding: 2rem;
    position: relative;
    overflow-y: hidden;
    color: #00fff7;
}

.crt-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    background: repeating-linear-gradient(to bottom, transparent, transparent 2px, rgba(0, 0, 0, 0.15) 2px, rgba(0, 0, 0, 0.15) 4px);
}

.crt-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 11;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
}

.scratch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("scratch.png") center center / cover no-repeat;
    pointer-events: none;
    z-index: 12;
    opacity: 0.5;
}

.title-block {
    text-align: center;
    padding: 2rem 1rem 1rem;
    position: relative;
    z-index: 5;
}

.credit {
    color: white;
    text-align: center;
    font-family: "Bitcount Grid Double", system-ui;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin: 0.75rem 0 0;
}

h1 {
    color: #00fff7;
    text-align: center;
    font-family: "Bitcount Grid Double", system-ui;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
    font-size: 5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 0;
    position: relative;
    z-index: 5;
}

h1, h3 {
    --bob-amount: -1rem;
    animation: bob-up-down 1.8s ease-in-out infinite;
}

#startscreen, #gamescreen, #gameoverscreen {
    max-width: 650px;
    margin: 1rem auto;
    padding: 2rem;
    position: relative;
    z-index: 5;
}

#gameoverscreen.hide {
    display: none;
}

#gamescreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 650px;
    margin: 0 auto;
    padding: 1rem 2rem;
    position: relative;
    z-index: 5;
}

#gamescreen.hide {
    display: none;
}

.hide {
    display: none;
}

.difficultyselect {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: green;
}

.diffbtn {
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    padding: 0.7rem 1.2rem;
    background: transparent;
    border: 2px solid #4a6a4a;
    color: limegreen;
    cursor: pointer;
}

.diffbtn:hover {
    color: #46faf4;
    border: 2px dashed #46faf4;
}

.diffbtn.selected {
    border-color: #00fff7;
    color: #00fff7;
    text-shadow: 0 0 8px #00fff7;
}

#startbtn, #replaybtn {
    display: block;
    margin: 0 auto;
    font-family: 'VT323', monospace;
    font-size: 1.6rem;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 3px solid #ff2a6d;
    color: #ff2a6d;
    cursor: pointer;
    text-shadow: 0 0 10px #ff2a6d;
}

#startbtn:hover, #replaybtn:hover {
    background: rgba(255, 42, 109, 0.1);
}

#gamescreen p {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

#gamescreen span {
    color: #ffe600;
}

#gamescreen hr {
    border: none;
    border-top: 1px solid rgba(0, 255, 247, 0.15);
    margin: 1rem 0;
}

#questiontext {
    font-size: 1.6rem;
    color: #ddd;
    margin-bottom: 1rem;
    line-height: 1.4;
    text-align: center;
    padding: 0.5rem;
}

.answer-btn {
    display: block;
    width: 80%;
    margin: 0.3rem auto;
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    padding: 0.6rem 1.2rem;
    background: #05050a;
    border: 2px solid rgba(0, 255, 247, 0.2);
    color: #00fff7;
    cursor: pointer;
    text-align: center;
}

.answer-btn:hover {
    border-color: #00fff7;
    background: rgba(0, 255, 247, 0.05);
}

.answer-btn.locked {
    cursor: default;
    opacity: 0.5;
}

#gameoverscreen {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

#gameoverscreen h2 {
    font-family: "Bitcount Grid Double", system-ui;
    font-size: 5rem;
    color: #ff2a6d;
    text-shadow: 0 0 15px #ff2a6d;
    margin-bottom: 1.5rem;
}

#gameoverscreen p {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #00fff7;
}

#gameoverscreen span {
    color: #ffe600;
}

#quitbtn {
    display: block;
    margin: 1rem auto;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    background: transparent;
    border: 2px solid #ff2a6d;
    color: #ff2a6d;
    cursor: pointer;
    text-shadow: 0 0 10px #ff2a6d;
    padding: 0.5rem 2rem;
    z-index: 15;
    position: fixed;
    justify-self: center;
}


#quitbtn:hover {
    text-shadow: 0 0 20px #00fff7, 0 0 50px #00fff7;
}

#quitbtn.hide {
    display: none;
}

#homebtn {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-family: 'VT323', monospace;
    font-size: 2rem;
    color: #00fff7;
    text-decoration: none;
    text-shadow: 0 0 10px #00fff7, 0 0 30px #00fff7;
    z-index: 15;
}

#homebtn:hover {
    text-shadow: 0 0 20px #00fff7, 0 0 50px #00fff7;
}

#startscreen {
    text-align: center;
}

@media (max-width: 600px) {
    body { padding: 10px; }
    .crt-screen { padding: 0.75rem; border-width: 4px; height: calc(100vh - 20px); }
    h1 { font-size: 2.5rem; margin-top: 2rem; }
    #homebtn { font-size: 1.3rem; }
    #questiontext { font-size: 1.4rem; padding: 0.5rem; }
    .answer-btn { width: 100%; font-size: 1.2rem; }
    #quitbtn { bottom: 1rem; }
}