/* Quiz Styling */

.quiz-container {
    max-width: 700px;
    margin: 2rem auto;
    box-sizing: border-box;
    padding: 0 1rem;
}

#quiz-wrapper {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.quiz-state {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Quiz List */
.quiz-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.quiz-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.quiz-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.quiz-card h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: #333;
}

.quiz-card p {
    color: #666;
    margin: 0.5rem 0 1.5rem 0;
    font-size: 0.95rem;
}

/* Question View */
.quiz-progress {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.quiz-question-title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: #333;
}

.quiz-question-description {
    color: #666;
    margin: 0 0 2rem 0;
    font-size: 0.95rem;
}

/* Options */
.quiz-options {
    margin: 2rem 0;
}

.quiz-option-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option-label:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

.quiz-option-label input[type="radio"],
.quiz-option-label input[type="checkbox"] {
    margin-right: 1rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.quiz-option-label input[type="radio"]:checked,
.quiz-option-label input[type="checkbox"]:checked {
    accent-color: #007bff;
}

.quiz-select {
    width: 100%;
    padding: 0.75rem;
    margin: 1rem 0;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.quiz-select:focus {
    outline: none;
    border-color: #007bff;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Result View */
.result-title {
    font-size: 1.8rem;
    margin: 0 0 2rem 0;
    color: #333;
    text-align: center;
}

/* Compatibility Status Badge */
.compatibility-status {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    margin: 2rem auto;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    width: fit-content;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-icon {
    font-size: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.compatibility-status.status-compatible {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.compatibility-status.status-compatible:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.compatibility-status.status-likely-compatible {
    background: linear-gradient(135deg, #0069d9 0%, #0052cc 100%);
    color: white;
}

.compatibility-status.status-likely-compatible:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 105, 217, 0.3);
}

.compatibility-status.status-partial-compatible {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
}

.compatibility-status.status-partial-compatible:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.compatibility-status.status-incompatible {
    background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
    color: white;
}

.compatibility-status.status-incompatible:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.compatibility-status.status-unknown {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
}

.compatibility-status.status-unknown:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.result-description {
    text-align: center;
    margin: 2rem 0;
    color: #666;
    font-size: 1.05rem;
}

.result-recommendations {
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
    text-align: left;
}

.result-recommendations h3 {
    color: #333;
    margin: 0 0 1rem 0;
}

.result-recommendations ul {
    margin: 0;
    padding-left: 1.5rem;
}

.result-recommendations li {
    margin: 0.5rem 0;
    color: #555;
}

/* Error */
.quiz-state.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 1.5rem;
}

.quiz-state.error p {
    color: #721c24;
    margin: 0 0 1rem 0;
}

/* Loading */
#quiz-loading {
    text-align: center;
    padding: 2rem;
}

#quiz-loading p {
    color: #666;
    font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 768px) {
    #quiz-wrapper {
        padding: 1.5rem;
    }

    .quiz-list {
        grid-template-columns: 1fr;
    }

    .score-circle {
        width: 150px;
        height: 150px;
        font-size: 2.5rem;
    }

    .score-circle .score-value {
        font-size: 3rem;
    }

    .quiz-option-label {
        flex-direction: column;
        align-items: flex-start;
    }

    .quiz-option-label input[type="radio"],
    .quiz-option-label input[type="checkbox"] {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .compatibility-status {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 1.5rem auto;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        flex-wrap: wrap;
        width: calc(100% - 2rem);
        gap: 0.5rem;
        word-break: break-word;
    }

    .status-icon {
        font-size: 1.5rem;
        width: 2rem;
        height: 2rem;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    #quiz-wrapper {
        padding: 1rem;
        border-radius: 4px;
    }

    .result-title {
        font-size: 1.5rem;
        margin: 0 0 1.5rem 0;
    }

    .quiz-question-title {
        font-size: 1.2rem;
    }

    .compatibility-status {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 1rem auto;
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        gap: 0.4rem;
        width: calc(100% - 1.75rem);
        word-break: break-word;
    }

    .status-icon {
        font-size: 1.3rem;
        width: 1.8rem;
        height: 1.8rem;
        flex-shrink: 0;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 0.75rem 1rem;
        margin-top: 1rem;
    }

    .result-recommendations {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .quiz-list {
        gap: 1rem;
        margin: 1rem 0;
    }
}
