html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #111;
    color: #fff;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

#experiment-root {
    width: 100%;
    height: 100%;
}

.jspsych-content {
    max-width: 900px;
    color: #fff;
}

.screen-text {
    font-size: 28px;
    line-height: 1.6;
    text-align: center;
}

.screen-text h1,
.screen-text h2 {
    margin-bottom: 24px;
}

.screen-text p {
    margin: 12px 0;
}

.note {
    font-size: 20px;
    opacity: 0.9;
}

.flanker-stimulus {
    font-size: 72px;
    font-weight: bold;
    letter-spacing: 10px;
    text-align: center;
}

.fixation {
    font-size: 52px;
    text-align: center;
}

.feedback-correct {
    font-size: 32px;
    text-align: center;
    color: #66ff99;
}

.feedback-incorrect {
    font-size: 32px;
    text-align: center;
    color: #ff6666;
}

.feedback-missed {
    font-size: 32px;
    text-align: center;
    color: #ffcc66;
}


@media (max-width: 1024px) {
    .screen-text {
        font-size: 22px;
        line-height: 1.5;
    }

    .screen-text h1 {
        font-size: 36px;
    }

    .screen-text h2 {
        font-size: 30px;
    }

    .note {
        font-size: 18px;
    }

    .flanker-stimulus {
        font-size: 56px;
        letter-spacing: 6px;
    }

    .fixation {
        font-size: 40px;
    }

    .feedback-correct,
    .feedback-incorrect,
    .feedback-missed {
        font-size: 26px;
    }

    .touch-response-btn {
        min-width: 150px;
        min-height: 64px;
        font-size: 24px;
        padding: 14px 20px;
    }
}


.touch-left-btn,
.touch-right-btn {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    min-width: 140px;
    min-height: 72px;
    padding: 14px 20px;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #ffffff;
    border-radius: 18px;
    background: #2563eb;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.touch-left-btn {
    left: calc(16px + env(safe-area-inset-left, 0px));
}

.touch-right-btn {
    right: calc(16px + env(safe-area-inset-right, 0px));
}

@media (min-width: 768px) {
    .touch-left-btn,
    .touch-right-btn {
        min-width: 180px;
        min-height: 84px;
        font-size: 28px;
        padding: 16px 24px;
    }

    .touch-left-btn {
        left: 24px;
    }

    .touch-right-btn {
        right: 24px;
    }
}