body {
    font-family: 'VT323', monospace;
    background-color: #000;
    color: #0f0;
    text-align: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* CRT эффект */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 255, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 50%),
    linear-gradient(90deg, rgba(0, 255, 0, 0.05) 50%, rgba(0, 0, 0, 0.05) 50%);
    background-size: 100% 2px, 2px 100%;
    pointer-events: none;
    z-index: 999;
}

h1 {
    color: #0f0;
    text-shadow: 0 0 8px #0f0;
    font-size: 2.5em;
    letter-spacing: 3px;
    margin: 20px 0;
    animation: glow 1s ease-in-out infinite alternate;
}

.button {
    padding: 12px 20px;
    font-size: 18px;
    background-color: #000;
    color: #0f0;
    border: 3px solid #0f0;
    cursor: pointer;
    margin: 10px;
    text-transform: uppercase;
    transition: all 0.3s;
    box-shadow: 0 0 5px #0f0;
}

.button:hover {
    background-color: #0f0;
    color: #000;
    box-shadow: 0 0 15px #0f0;
}

.pilt {
    display: block;
    margin: 20px auto;
    max-width: 320px;
    border: 4px solid #0f0;
    image-rendering: crisp-edges;
    filter: contrast(110%) brightness(90%);
}

.radio-container {
    background-color: #000;
    padding: 20px;
    margin: 20px auto;
    width: 320px;
    border: 3px solid #0f0;
    box-shadow: 0 0 10px #0f0;
}

.radio-container strong {
    display: block;
    font-size: 1.2em;
    margin-bottom: 15px;
}

input[type="radio"] {
    appearance: none;
    width: 15px;
    height: 15px;
    border: 2px solid #0f0;
    margin-right: 10px;
    position: relative;
    top: 3px;
}

input[type="radio"]:checked::before {
    content: "✓";
    color: #0f0;
    position: absolute;
    left: 0;
    top: -3px;
}

.vastus {
    font-size: 20px;
    padding: 12px;
    margin: 15px 0;
    border: 3px solid #0f0;
    box-shadow: inset 0 0 5px #0f0;
}

.vastus.õige {
    background-color: #002000;
    animation: blink 0.5s steps(2) 3;
}

.vastus.vale {
    background-color: #200000;
    animation: shake 0.5s;
}

.kogus-container {
    margin: 20px auto;
    padding: 20px;
    width: 280px;
    border: 3px solid #0f0;
    box-shadow: 0 0 8px #0f0;
}

#kogus {
    width: 70px;
    padding: 8px;
    font-size: 18px;
    margin: 10px 0;
    background: #000;
    border: 2px solid #0f0;
    color: #0f0;
}

/* Анимации */
@keyframes glow {
    from { text-shadow: 0 0 5px #0f0; }
    to { text-shadow: 0 0 15px #0f0; }
}

@keyframes blink {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* Стили для калькулятора */
.calculator {
    background: #000;
    border: 4px solid #0f0;
    padding: 15px;
    margin: 20px auto;
    box-shadow: 0 0 15px #0f0;
}

#calc-display {
    background: #001100;
    border: 2px solid #0f0;
    color: #0f0;
    font-size: 24px;
    padding: 10px;
    margin-bottom: 15px;
    width: 220px;
    text-align: right;
}

.calculator button {
    background: #000;
    color: #0f0;
    border: 2px solid #0f0;
    padding: 12px;
    margin: 3px;
    font-size: 18px;
    width: 50px;
    transition: all 0.2s;
}

.calculator button:hover {
    background: #0f0;
    color: #000;
}