@font-face {
    font-family: "Orbitron";
    src: url("font/Orbitron-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-display: swap;
}

:root {
    --bg: #0b0f19;
    --panel: #151c2e;
    --panel-light: #1c2740;
    --cyan: #00f0ff;
    --yellow: #ffb703;
    --pink: #ff4fd8;
    --white: #ffffff;
    --red: #ff5577;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 18px 16px 35px;

    background: radial-gradient(
        circle at top,
        #14213d 0,
        var(--bg) 52%
    );

    color: var(--white);
    font-family: "Orbitron", system-ui, sans-serif;
}

button,
input {
    font: inherit;
}

.game {
    width: min(100%, 440px);
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 12px;
}

/* SCORE */

#score-display {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 10;

    padding: 10px 18px;

    border: 2px solid var(--cyan);
    border-radius: 999px;

    background: var(--bg);
    color: var(--cyan);

    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;

    box-shadow: 0 0 14px rgba(0, 240, 255, 0.3);
}

#score-display.bump {
    animation: score-bump 0.4s ease;
}

/* ALGEMENE CARDS */

.card,
.musiccard,
.answercard {
    width: 100%;

    border: 2px solid var(--cyan);

    background: var(--panel);

    box-shadow: 0 0 20px rgba(0, 240, 255, 0.22);
}

/* TITEL CARD */

.card {
    min-height: 100px;
    margin-top: 42px;

    border-radius: 50px;

    display: grid;
    place-items: center;

    overflow: hidden;
}

.card h1 {
    position: relative;

    margin: 0;

    color: var(--yellow);

    font-size: clamp(52px, 16vw, 82px);
    font-weight: 800;
    line-height: 1;

    animation: glitch-main 3s infinite;
}

.card h1::before,
.card h1::after {
    content: attr(data-text);

    position: absolute;
    inset: 0;

    color: var(--white);

    pointer-events: none;
}

.card h1::before {
    text-shadow: -4px 0 var(--cyan);

    animation: glitch-before 3s infinite;
}

.card h1::after {
    text-shadow: 4px 0 var(--pink);

    animation: glitch-after 3s infinite;
}

/* MUSIC CARD */

.musiccard {
    min-height: 270px;

    padding: 28px 28px 32px;

    border-radius: 55px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 28px;
}

#music-player {
    display: none;
}

/* PLAY BUTTON */

#play-button {
    width: 132px;
    height: 132px;

    padding: 0;

    border: 3px solid var(--cyan);
    border-radius: 50%;

    background:
        radial-gradient(
            circle at 45% 35%,
            #25375b,
            #111827 68%
        );

    box-shadow:
        inset 0 0 0 7px #09101d,
        0 0 20px rgba(0, 240, 255, 0.35);

    cursor: pointer;

    display: grid;
    place-items: center;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#play-button:hover {
    transform: scale(1.04);

    border-color: var(--yellow);

    box-shadow:
        inset 0 0 0 7px #09101d,
        0 0 26px rgba(255, 183, 3, 0.45);
}

#play-button:active {
    transform: scale(0.97);
}

#play-icon {
    width: 100%;
    height: 100%;

    border-radius: 50%;

    object-fit: contain;

    pointer-events: none;
}

/* AUDIO CONTROLS */

.audio-controls {
    width: 100%;

    padding: 14px 18px;

    border: 2px solid var(--cyan);
    border-radius: 30px;

    background: #131b2c;

    box-shadow:
        0 0 10px rgba(255, 255, 255, 0.08),
        inset 0 0 10px rgba(0, 240, 255, 0.03);

    display: grid;

    grid-template-columns:
        44px
        minmax(0, 1fr)
        44px;

    align-items: center;

    gap: 12px;
    row-gap: 16px;
}

/* TIJD */

#current-time,
#total-time {
    color: var(--yellow);

    font-size: 12px;
    font-weight: 800;

    text-align: center;

    white-space: nowrap;
}

/* PROGRESS BAR */

#progress {
    --progress: 0%;

    width: 100%;
    height: 8px;

    margin: 0;

    appearance: none;
    -webkit-appearance: none;

    border: 0;
    border-radius: 999px;

    outline: none;

    cursor: pointer;

    background:
        linear-gradient(
            to right,
            var(--yellow) 0 var(--progress),
            #57312d var(--progress) 100%
        );
}

/* Chrome / Edge / Safari */

#progress::-webkit-slider-runnable-track {
    height: 8px;

    border-radius: 999px;

    background: transparent;
}

#progress::-webkit-slider-thumb {
    width: 18px;
    height: 18px;

    margin-top: -5px;

    appearance: none;
    -webkit-appearance: none;

    border: 2px solid var(--yellow);
    border-radius: 50%;

    background: var(--yellow);

    box-shadow:
        0 0 9px rgba(255, 183, 3, 0.65);
}

/* Firefox */

#progress::-moz-range-track {
    height: 8px;

    border-radius: 999px;

    background: #57312d;
}

#progress::-moz-range-progress {
    height: 8px;

    border-radius: 999px;

    background: var(--yellow);
}

#progress::-moz-range-thumb {
    width: 16px;
    height: 16px;

    border: 2px solid var(--yellow);
    border-radius: 50%;

    background: var(--yellow);

    box-shadow:
        0 0 9px rgba(255, 183, 3, 0.65);
}

/* VOLUME */

.audio-controls label[for="volume"] {
    grid-column: 1;

    display: grid;
    place-items: center;

    font-size: 18px;

    cursor: pointer;

    user-select: none;
}

#volume-button {
    grid-column: 1;

    width: 34px;
    height: 34px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;

    cursor: pointer;

    display: grid;
    place-items: center;
}

#volume-button:hover {
    transform: scale(1.08);
}

#volume-button:active {
    transform: scale(0.95);
}

#volume-icon {
    width: 34px;
    height: 34px;

    object-fit: contain;

    pointer-events: none;
}

#volume {
    --volume-progress: 100%;

    grid-column: 2 / 4;

    width: 100%;
    height: 7px;
    margin: 0;

    appearance: none;
    -webkit-appearance: none;

    border: 0;
    border-radius: 999px;

    outline: none;
    cursor: pointer;

    background: linear-gradient(
        to right,
        var(--cyan) 0 var(--volume-progress),
        rgba(0, 240, 255, 0.18) var(--volume-progress) 100%
    );
}

#volume::-webkit-slider-runnable-track {
    height: 7px;
    border-radius: 999px;
    background: transparent;
}

#volume::-webkit-slider-thumb {
    width: 17px;
    height: 17px;
    margin-top: -5px;

    appearance: none;
    -webkit-appearance: none;

    border: 2px solid var(--cyan);
    border-radius: 50%;

    background: var(--cyan);

    box-shadow: 0 0 9px rgba(0, 240, 255, 0.65);
}

#volume::-moz-range-track {
    height: 7px;
    border-radius: 999px;

    background: rgba(0, 240, 255, 0.18);
}

#volume::-moz-range-progress {
    height: 7px;
    border-radius: 999px;

    background: var(--cyan);
}

#volume::-moz-range-thumb {
    width: 15px;
    height: 15px;

    border: 2px solid var(--cyan);
    border-radius: 50%;

    background: var(--cyan);

    box-shadow: 0 0 9px rgba(0, 240, 255, 0.65);
}

/* ANSWER CARD */

.answercard {
    min-height: 310px;

    padding: 28px 24px;

    border-radius: 55px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.answer-header h2 {
    margin: 0;

    font-size: 36px;
}

.categorie {
    margin: 12px 0 22px;

    color: var(--yellow);

    font-size: 28px;
    font-weight: 800;

    text-align: center;
}

/* INPUT */

.input-container {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 10px;
}

.input-container label {
    font-size: 13px;

    letter-spacing: 1px;
}

.input-container input,
#check-answer {
    width: 92%;
    min-height: 50px;

    border: 2px solid var(--cyan);
    border-radius: 16px;
}

.input-container input {
    padding: 12px 15px;

    background: var(--panel);
    color: var(--white);

    font-size: 15px;

    text-align: center;

    outline: none;
}

.input-container input:focus {
    border-color: var(--yellow);

    box-shadow:
        0 0 14px rgba(255, 183, 3, 0.28);
}

/* CHECK BUTTON */

#check-answer {
    margin-top: 6px;

    background: var(--yellow);
    color: var(--bg);

    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

#check-answer:hover,
#next-song-button:hover {
    transform: scale(1.03);

    box-shadow:
        0 0 20px rgba(255, 183, 3, 0.45);
}

#check-answer:active,
#next-song-button:active {
    transform: scale(0.98);
}

/* POPUP */

.popup-overlay {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 100;

    padding: 20px;

    background: rgba(0, 0, 0, 0.78);

    align-items: center;
    justify-content: center;
}

.popup-overlay.show {
    display: flex;
}

.antwoord-popup {
    width: min(100%, 390px);

    padding: 34px;

    border: 2px solid var(--cyan);
    border-radius: 35px;

    background: var(--panel);

    text-align: center;

    box-shadow:
        0 0 25px rgba(0, 240, 255, 0.45);

    animation: popup-in 0.28s ease;
}

#popup-status {
    margin: 0 0 18px;

    font-size: 34px;
}

#popup-status.correct {
    color: var(--cyan);
}

#popup-status.incorrect {
    color: var(--red);
}

#popup-title {
    margin: 0 0 18px;

    color: var(--yellow);

    font-size: 24px;
}

.antwoord-popup p {
    margin: 8px 0;
}

/* NEXT BUTTON */

#next-song-button {
    width: 92%;
    min-height: 50px;

    margin-top: 24px;

    border: 2px solid var(--yellow);
    border-radius: 15px;

    background: var(--yellow);
    color: var(--bg);

    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* ANIMATIES */

@keyframes score-bump {
    50% {
        transform: scale(1.15);
    }
}

@keyframes popup-in {
    from {
        opacity: 0;
        transform: scale(0.75);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    25% {
        transform: translateX(-7px);
    }

    50% {
        transform: translateX(7px);
    }

    75% {
        transform: translateX(-4px);
    }
}

@keyframes glitch-main {
    0%,
    85%,
    100% {
        transform: translate(0);
    }

    87% {
        transform: translate(4px, -1px);
    }

    89% {
        transform: translate(-3px, 1px);
    }

    92% {
        transform: translate(3px, 1px);
    }
}

@keyframes glitch-before {
    0%,
    84%,
    100% {
        transform: translate(0);
        opacity: 0;
    }

    85% {
        transform: translate(-7px, -2px);
        opacity: 1;

        clip-path: inset(10% 0 65%);
    }

    88% {
        transform: translate(6px, 2px);
        opacity: 0.8;

        clip-path: inset(35% 0 40%);
    }

    91% {
        opacity: 0;
    }
}

@keyframes glitch-after {
    0%,
    84%,
    100% {
        transform: translate(0);
        opacity: 0;
    }

    86% {
        transform: translate(7px, 2px);
        opacity: 1;

        clip-path: inset(60% 0 10%);
    }

    89% {
        transform: translate(-6px, -2px);
        opacity: 0.8;

        clip-path: inset(45% 0 30%);
    }

    92% {
        opacity: 0;
    }
}

/* TABLET / MOBIEL */

@media (max-width: 560px) {
    body {
        padding: 12px 10px 28px;
    }

    #score-display {
        position: static;

        width: max-content;

        margin: 0 auto 10px;
    }

    .card {
        margin-top: 0;
    }

    .musiccard,
    .answercard {
        border-radius: 38px;
    }

    .musiccard {
        min-height: 250px;

        padding-inline: 18px;
    }

    #play-button {
        width: 112px;
        height: 112px;
    }

    .audio-controls {
        padding: 14px 12px;

        grid-template-columns:
            40px
            minmax(0, 1fr)
            40px;

        gap: 8px;
        row-gap: 15px;
    }

    #current-time,
    #total-time {
        font-size: 10px;
    }

    .audio-controls label[for="volume"] {
        font-size: 16px;
    }

    .answer-header h2 {
        font-size: 30px;
    }

    .categorie {
        font-size: 23px;
    }
}

/* HEEL KLEINE SCHERMEN */

@media (max-width: 360px) {
    .musiccard {
        padding-inline: 12px;
    }

    .audio-controls {
        grid-template-columns:
            36px
            minmax(0, 1fr)
            36px;

        padding-inline: 9px;
    }

    #current-time,
    #total-time {
        font-size: 9px;
    }

    #play-button {
        width: 100px;
        height: 100px;
    }
}

/* MINDER ANIMATIES */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

