/* =========================================================
   SEITENHINTERGRUND
========================================================= */

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;

    background-image:
        linear-gradient(
            rgba(255,255,255,0.10),
            rgba(255,255,255,0.10)
        ),
        url("../images/santorini.webp");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.quiz-page {
    min-height: 100vh;
}



/* =========================================================
   GEBURTSTAGSQUIZ
========================================================= */

.quiz-page {
    min-height: 100vh;
    box-sizing: border-box;
    padding: 42px 18px 45px;
    text-align: center;
}


/* =========================================================
   HEADER
========================================================= */

.quiz-header {
    margin: 0 auto 8px;
    text-align: center;
}

.quiz-small-title {
    margin-bottom: 18px;
    color: #e5a12b;
    font-size: clamp(2rem, 5vw, 3rem);
    font-family: cursive;
    font-weight: 400;
}

.quiz-header h1 {
    margin: 0;
    color: #06477f;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 500;
}

.quiz-ornament {
    margin: 25px 0 8px;
    color: #e5a12b;
    font-size: 1.2rem;
}


/* =========================================================
   HAUPTKARTE
========================================================= */

.quiz-card {
    width: min(92vw, 680px);
    box-sizing: border-box;

    margin: 0 auto;

    padding: 42px 44px;

    background: rgba(255, 253, 248, 0.96);

    border: 2px solid #e5a12b;
    border-radius: 30px;

    box-shadow: 0 10px 30px rgba(0, 45, 85, 0.08);

    color: #06477f;
}

.quiz-card h2 {
    margin: 15px 0 25px;

    color: #06477f;

    font-size: clamp(1.8rem, 5vw, 2.6rem);
    line-height: 1.25;
}

.quiz-card p {
    margin: 0 auto 30px;

    color: #06477f;

    font-size: 1.15rem;
    line-height: 1.5;
}


/* =========================================================
   NAME
========================================================= */

.quiz-card label {
    display: block;

    margin: 25px 0 10px;

    color: #06477f;

    font-size: 0.85rem;
    letter-spacing: 4px;
}

#playerName {
    display: block;

    width: 100%;
    box-sizing: border-box;

    min-height: 62px;

    padding: 12px 18px;

    border: 1.5px solid #e5a12b;
    border-radius: 16px;

    background: rgba(255,255,255,.9);

    color: #06477f;

    font-family: inherit;
    font-size: 1.15rem;

    text-align: center;

    outline: none;
}

#playerName:focus {
    border-color: #06477f;

    box-shadow:
        0 0 0 3px rgba(6,71,127,.08);
}


/* =========================================================
   HAUPT-BUTTONS
========================================================= */

.quiz-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    min-width: 230px;
    min-height: 54px;

    margin-top: 24px;
    padding: 13px 28px;

    border: 1.5px solid #e5a12b;
    border-radius: 14px;

    background: #06477f;

    color: #ffffff;

    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;

    letter-spacing: 2px;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform .15s ease,
        background .15s ease,
        opacity .15s ease;
}

.quiz-button:hover:not(:disabled) {
    background: #0b5c9e;
    transform: translateY(-1px);
}

.quiz-button:active:not(:disabled) {
    transform: translateY(1px);
}

.quiz-button:disabled {
    opacity: .4;
    cursor: default;
}


/* =========================================================
   FEHLER
========================================================= */

.quiz-error {
    margin-top: 18px;

    color: #a83232;

    font-size: .95rem;
}


/* =========================================================
   FRAGENZÄHLER
========================================================= */

.question-counter {
    margin-bottom: 15px;

    color: #06477f;

    font-size: .9rem;

    letter-spacing: 2px;
}


/* =========================================================
   FORTSCHRITT
========================================================= */

.quiz-progress {
    width: 100%;
    height: 7px;

    margin-bottom: 38px;

    overflow: hidden;

    background: #e8e4dc;

    border-radius: 999px;
}

.quiz-progress-bar {
    width: 0;
    height: 100%;

    background: #e5a12b;

    border-radius: inherit;

    transition: width .3s ease;
}


/* =========================================================
   FRAGE
========================================================= */

.question-text {
    margin: 0 0 30px !important;

    color: #06477f;

    font-size: clamp(1.7rem, 4vw, 2.3rem) !important;
    line-height: 1.25;
}


/* =========================================================
   ANTWORTEN
========================================================= */

.answers {
    display: flex;

    flex-direction: column;

    gap: 13px;

    width: 100%;
}

.answer-button {
    display: block;

    width: 100%;
    min-height: 64px;

    box-sizing: border-box;

    padding: 15px 20px;

    border: 1.5px solid #e5a12b;
    border-radius: 16px;

    background: rgba(255,255,255,.88);

    color: #06477f;

    font-family: inherit;
    font-size: 1rem;

    text-align: left;

    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.answer-button:focus {
    outline: none;
}

.answer-button:focus-visible {
    outline: 3px solid rgba(6,71,127,.28);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .answer-button:hover:not(:disabled) {
        background: #fff8e9;

        transform: translateY(-1px);
    }
}

.answer-button:disabled { cursor: default; opacity: .62; transform: none; }


/* AUSGEWÄHLTE ANTWORT */

.answer-button.selected {
    background: #06477f;

    border-color: #e5a12b;

    color: white;

    box-shadow:
        0 4px 12px rgba(6,71,127,.18);
}

.waiting-icon { margin-bottom: 12px; font-size: 2.4rem; }
.quiz-live-meta { display:flex; align-items:center; justify-content:center; gap:14px; margin:-15px 0 25px; }
.quiz-countdown { min-width:74px; color:#b27b20; font-size:2.5rem; font-weight:700; }
.quiz-phase { color:#66798d; font-size:.82rem; font-weight:700; letter-spacing:2px; }
.answer-status { margin-top:22px; padding:14px; border:1px solid #ead5aa; border-radius:12px; background:#fffaf0; color:#06477f; font-weight:600; }
.answer-status.error { border-color:#d99; color:#a83232; }


/* =========================================================
   NÄCHSTE FRAGE
========================================================= */

#nextQuestion {
    margin-top: 28px;
}


/* =========================================================
   ERGEBNIS
========================================================= */

.result-star {
    margin-bottom: 15px;

    color: #06477f;

    font-size: 1.5rem;
}

#quizResult h2 {
    margin-bottom: 15px;
}

.result-name {
    margin: 5px 0 25px;

    color: #e5a12b;

    font-size: clamp(1.8rem, 5vw, 2.7rem);
    font-family: cursive;
}

.result-score {
    margin: 18px 0;

    color: #06477f;
}

.result-score strong {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 500;
}

.result-time {
    margin: 22px 0 25px;

    color: #06477f;

    font-size: 1.2rem;
}

.result-time strong {
    font-size: 1.35rem;
}


/* Zurück-Button im Ergebnis */

#quizResult .quiz-button {
    margin-top: 5px;
}


/* =========================================================
   FOOTER
========================================================= */

.quiz-footer {
    margin-top: 28px;

    color: #06477f;

    font-size: 1rem;
    font-weight: 600;

    letter-spacing: 5px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .quiz-page {
        padding:
            25px 12px
            35px;
    }

    .quiz-small-title {
        margin-bottom: 10px;

        font-size: 1.9rem;
    }

    .quiz-header h1 {
        font-size: 2rem;
    }

    .quiz-ornament {
        margin: 15px 0 8px;
    }

    .quiz-card {
        width: 100%;

        padding: 28px 18px;

        border-radius: 22px;
    }

    .quiz-card h2 {
        font-size: 1.7rem;
    }

    .quiz-card p {
        font-size: 1rem;
    }

    #playerName {
        min-height: 58px;
    }

    .quiz-button {
        width: 100%;

        min-width: 0;
    }

    .answer-button {
        min-height: 58px;

        padding: 14px 16px;
    }

    .quiz-progress {
        margin-bottom: 28px;
    }

    .question-text {
        font-size: 1.55rem !important;
    }

    .quiz-footer {
        margin-top: 22px;

        font-size: .85rem;

        letter-spacing: 4px;
    }
}
