/* Quiz Page Specific Styles */

.quiz-section {
    min-height: 100vh;
    padding: 10rem 0 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-header h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.quiz-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Progress Bar */
.quiz-progress {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 20%;
}

.progress-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* Quiz Container */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Question Slides */
.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-question h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
    font-family: 'Fredoka', sans-serif;
}

.quiz-hint {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Quiz Options */
.quiz-options {
    display: grid;
    gap: 1rem;
}

.quiz-options.age-options {
    grid-template-columns: repeat(2, 1fr);
}

.quiz-options.multi-select {
    grid-template-columns: repeat(2, 1fr);
}

.quiz-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.option-emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.option-text {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.option-desc {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

/* Next Button for Multi-select */
.quiz-next-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 1.5rem auto 0;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-next-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* Results Section */
.quiz-results {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding-top: 2rem;
}

.quiz-results.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.quiz-results h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 0.5rem;
    font-family: 'Fredoka', sans-serif;
}

.results-intro {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.results-note {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 2rem;
}

/* Results Buddies */
.results-buddies {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-buddy {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    position: relative;
}

.result-buddy:hover {
    transform: translateY(-5px);
}

.result-buddy.top-pick {
    border: 3px solid #fbbf24;
}

.top-pick-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-buddy-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.result-buddy-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-family: 'Fredoka', sans-serif;
}

.result-buddy-type {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 0.75rem;
}

.result-buddy-reason {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.5;
    background: var(--bg-light);
    padding: 0.75rem;
    border-radius: 10px;
}

/* Code Section */
.results-code-section {
    margin-bottom: 2rem;
}

.code-box {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: inline-block;
}

.code-box h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.code-box p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.quiz-code {
    font-family: monospace;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--bg-light);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: inline-block;
}

.copy-code-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.copy-code-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.copy-code-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.results-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.results-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

/* Quiz Footer */
.quiz-footer {
    background: transparent;
    padding: 2rem 0;
}

.quiz-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
}

.quiz-footer .footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links-inline {
    display: flex;
    gap: 1.5rem;
}

.footer-links-inline a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links-inline a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-section {
        padding: 9rem 0 3rem;
    }

    .quiz-results {
        padding-top: 1rem;
    }

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

    .quiz-container {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .quiz-options.age-options,
    .quiz-options.multi-select {
        grid-template-columns: 1fr;
    }

    .results-buddies {
        grid-template-columns: 1fr;
    }

    .result-buddy {
        max-width: 300px;
        margin: 0 auto;
    }

    .results-actions {
        flex-direction: column;
        align-items: center;
    }

    .code-box {
        padding: 1rem;
        width: 100%;
    }

    .quiz-code {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .quiz-option {
        padding: 1rem;
    }

    .option-emoji {
        font-size: 1.5rem;
    }

    .option-text {
        font-size: 0.9rem;
    }
}
