/* =========================================================
   KANA QUIZ – layout + shared look
   ========================================================= */

body {
    background: linear-gradient(to bottom, #fffafa, #f0f0f0);
    overflow-y: auto;
    font-family: 'Noto Sans JP', sans-serif;
}

/* Main page container – slightly less top padding */
.kana-page.quiz-page {
    width: 94%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 1rem 8rem; /* was 2rem 1rem 8rem */
    opacity: 0;
    transform: translateY(10px);
    animation: quiz-fade-in 1.2s ease-out forwards;
}

@keyframes quiz-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#quiz-reveal-row,
#quiz-sound-row,
#quiz-input-wrapper {
    display: none;
}


/* =========================================================
   HEADER
   ========================================================= */

@keyframes idle-float-h1 {
    from { transform: translateY(6px); }
    to   { transform: translateY(-6px); }
}

@keyframes texture-flicker-h1 {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 1% 1%; }
    100% { background-position: 0% 0%; }
}


/* =========================================================
   QUIZ BLOCK
   ========================================================= */

.quiz-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* character a bit closer to the top */
.quiz-character {
    font-size: clamp(4rem, 14vw, 6rem);
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-top: 0.3rem; /* was 0.5rem */
}

/* =========================================================
   TYPE 1 – eye + romaji box
   ========================================================= */

/* romaji row tighter */
.quiz-reveal-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.8rem;   /* was 1.2rem */
    margin-bottom: 1.1rem;/* was 1.5rem */
}

.quiz-icon-btn {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: 2px solid #b48a8a;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 3px 7px rgba(0,0,0,0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quiz-icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

/* Romaji “box” – always shown, grey until reveal */
.romaji-box {
    min-width: 120px;
    padding: 0.4rem 0.8rem;
    border-radius: 0.6rem;
    border: 2px solid #b48a8a;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    transition: background 0.2s, color 0.2s;
}

/* Before reveal: grey/blurred look */
.romaji-hidden {
    background: #f1eded;
    color: #b0a5a5;
}

/* After reveal: white + strong text */
.romaji-visible {
    background: #ffffff;
    color: #5c2a2a;
}


/* =========================================================
   TYPE 2 & 3 – sound button / input
   ========================================================= */

.quiz-sound-row {
    margin-top: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

/* wrapper for input (type 3) */
.quiz-input-wrapper {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.quiz-input {
    padding: 0.5rem 0.9rem;
    border-radius: 0.6rem;
    border: 2px solid #b48a8a;
    font-size: 1.1rem;
    text-align: center;
    max-width: 220px;
    width: 70%;
}


/* =========================================================
   OPTIONS (buttons – type 1 & 2)
   ========================================================= */

/* options a bit closer to romaji row */
.quiz-options {
    width: 100%;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 1.2rem auto 0; /* was 1.8rem auto 0 */
    align-items: center;
}

/* style like kana-subcat-toggle / menu buttons */
.quiz-option {
    width: 90%;
    max-width: 550px;
    padding: 0.9rem 1rem;

    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #5c2a2a;

    background:
        linear-gradient(to bottom, rgba(249, 194, 194, 0.9), rgba(244, 122, 122, 0.9)),
        url('../../../includes/assets/textures/paper-texture.jpg');
    background-size: 200%;
    background-blend-mode: overlay;

    border-radius: 1rem;
    border: 2px solid #b48a8a;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);

    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease,
                box-shadow 0.15s ease,
                background 0.15s ease;
}

.quiz-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.16);
    background: linear-gradient(to bottom, #f9c2c2, #f6baba);
}

.quiz-option.selected {
    box-shadow: 0 0 0 3px rgba(180, 138, 138, 0.4);
}

/* sound-only variant: big pink button with centered icon */
.sound-only-option {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;     /* bigger speaker icon */
    padding: 0.6rem 1rem;  /* comfy height */
}

/* =========================================================
   FEEDBACK + NEXT BUTTON
   ========================================================= */

.quiz-feedback {
    min-height: 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin-top: 0.8rem;
    text-align: center;
}

.quiz-feedback-correct {
    color: #2e7d32;
}

.quiz-feedback-wrong {
    color: #c62828;
}

/* NEXT button – smaller version of menu card */
.quiz-next-btn {
    margin: 1.6rem auto 0; /* was 2.2rem auto 0 */
    padding: 0.7rem 2.8rem;

    border-radius: 0.9rem;
    border: 2px solid #b48a8a;

    background:
        linear-gradient(to bottom, rgba(249, 194, 194, 0.9), rgba(244, 122, 122, 0.9)),
        url('../../../includes/assets/textures/paper-texture.jpg');
    background-size: 200%;
    background-blend-mode: overlay;

    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #5c2a2a;
    cursor: pointer;
    text-align: center;
}


/* =========================================================
   BOTTOM BAR (same as kana-table)
   ========================================================= */

.kana-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;

    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.97),
        rgba(255, 255, 255, 0.80),
        rgba(255, 255, 255, 0)
    );
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.08);
    border-top: 2px solid rgba(180, 138, 138, 0.6);

    padding: 0.6rem 0;
    display: flex;
    justify-content: center;
    z-index: 1001;
}

.bottom-btn {
    flex: 1 1 0;
    max-width: 520px;

    margin: 0 0.5rem;
    padding: 0.9rem 1rem;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #5c2a2a;

    border-radius: 0.9rem;
    border: 2px solid #b48a8a;

    background:
        linear-gradient(to bottom, rgba(249, 194, 194, 0.9), rgba(244, 122, 122, 0.9)),
        url('../../../includes/assets/textures/paper-texture.jpg');
    background-size: 200%;
    background-blend-mode: overlay;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bottom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
    background: linear-gradient(to bottom, #f9c2c2, #f6baba);
}

.bottom-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
    .kana-page.quiz-page {
        padding: 1.5rem 0.5rem 7rem;
    }

    .quiz-options {
        width: 100%;
    }

    .bottom-btn {
        max-width: none;
        font-size: 1rem;
        padding: 0.7rem 0.8rem;
    }
}
