/* quiz.css — спільні стилі для quiz.html і who.html */

.main-content {
    display: flex;
    flex-direction: column;
/* quiz.css — спільні стилі для quiz.html і who.html */

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 210px);
}

/* ===== СТОРІНКА ВИБОРУ ===== */
.quiz-select-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid #bdbdbd;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
    justify-content: center;
    min-height: 600px;
    margin: 10px auto;
    box-sizing: border-box;
}

.quiz-select-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.quiz-select-subtitle {
    color: var(--dark-text-muted, #94a3b8);
    margin-bottom: 30px;
    font-size: 1rem;
}

.quiz-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

@media (max-width: 900px) {
    .quiz-select-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

.quiz-select-btn {
    flex: 1;
    padding: 25px 20px;
    border-radius: 16px;
    border: 2px solid rgb(101 69 69 / 44%);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.quiz-select-btn:hover {
    border-color: var(--accent-color);
    background: rgba(251, 191, 36, 0.08);
    transform: translateY(-5px);
}

.quiz-select-icon {
    font-size: 2.5rem;
}

.quiz-select-btn h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
}

.quiz-select-btn p {
    font-size: 0.85rem;
    color: var(--dark-text-muted, #94a3b8);
    margin: 0;
    line-height: 1.4;
}

/* ===== WHO.HTML ===== */
.quiz-wrapper {
    max-width: 700px;
    width: 100%;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid #bdbdbd;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 550px;
    margin: 40px auto;
}

#gender-screen,
#question-screen,
#result-screen,
#screen-start,
#screen-game,
#screen-result {
    width: 100%;
}

.hidden {
    display: none !important;
}

.quiz-header h1 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.btn-quiz {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 15px 40px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.1rem;
    margin-top: 20px;
}

.btn-quiz:hover {
    opacity: 0.9;
    transform: translateY(-3px);
}

.gender-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    width: 100%;
}

.gender-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgb(101 69 69 / 44%);
    color: inherit;
    padding: 25px 35px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.3rem;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.gender-btn:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.answers-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
    width: 100%;
    text-align: left;
}

.answer-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgb(101 69 69 / 44%);
    color: inherit;
    padding: 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.05rem;
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    line-height: 1.3;
}

.answer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 35px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: 0.5s ease;
}

.result-photo {
    width: 180px;
    height: 266px;
    border-radius: 8%;
    object-fit: cover;
    margin: 25px auto;
    border: 4px solid var(--accent-color);
    display: block;
    background-color: #334155;
}

#question-text {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    color: #937e7e;
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    /* Картки вікторин — 1 стовпчик */
    .quiz-select-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Зменшуємо обгортку */
    .quiz-select-wrapper {
        padding: 20px 12px;
        margin: 8px auto;
        border-radius: 14px;
        min-height: auto;
    }

    .quiz-wrapper {
        padding: 24px 14px;
        margin: 12px auto;
        border-radius: 14px;
        min-height: auto;
    }

    /* Компактні картки */
    .quiz-select-btn {
        padding: 14px 16px;
        gap: 6px;
        flex-direction: row;
        align-items: center;
        text-align: left;
        border-radius: 12px;
    }

    .quiz-select-icon {
        font-size: 1.8rem;
        flex-shrink: 0;
    }

    .quiz-select-btn h3 {
        font-size: 1rem;
        margin: 0;
    }

    .quiz-select-btn p {
        font-size: 0.8rem;
        margin: 0;
    }

    /* Решта елементів */
    #question-text {
        font-size: 1.15rem;
    }

    .gender-grid {
        flex-direction: column;
    }

    .quiz-select-title {
        font-size: 1.5rem !important;
    }

    .quiz-select-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 16px !important;
    }

    /* Заголовок hero */
    .page-hero .container {
        padding: 0 12px;
    }
}
/* XP Banner Styles */
.xp-banner {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.xp-banner[data-xp-status="guest"] {
    background-color: #F8F9FA;
    border: 1px solid #E9ECEF;
    color: #6C757D;
}
.xp-banner[data-xp-status="guest"] .xp-banner-icon::before {
    content: "🔒";
    margin-right: 12px;
    font-size: 18px;
}

.xp-banner[data-xp-status="first_attempt"] {
    background-color: #E8F5E9;
    border: 1px solid #C8E6C9;
    color: #2E7D32;
}
.xp-banner[data-xp-status="first_attempt"] .xp-banner-icon::before {
    content: "✨";
    margin-right: 12px;
    font-size: 18px;
}

.xp-banner[data-xp-status="already_played"] {
    background-color: #FFF8E1;
    border: 1px solid #FFECB3;
    color: #F57F17;
}
.xp-banner[data-xp-status="already_played"] .xp-banner-icon::before {
    content: "🏆";
    margin-right: 12px;
    font-size: 18px;
}

/* ── Dark mode variants ── */
body.dark-mode .xp-banner {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

body.dark-mode .xp-banner[data-xp-status="guest"] {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #94a3b8;
}

body.dark-mode .xp-banner[data-xp-status="first_attempt"] {
    background-color: rgba(46, 125, 50, 0.18);
    border: 1px solid rgba(76, 175, 80, 0.35);
    color: #81c784;
}

body.dark-mode .xp-banner[data-xp-status="already_played"] {
    background-color: rgba(229, 9, 20, 0.12);
    border: 1px solid rgba(229, 9, 20, 0.30);
    color: #fca5a5;
}
