/* Quiz Fotografico - Stili WordPress */

#quiz-fotografico-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    min-height: 100vh;
}

/* Schermate */
.quiz-screen {
    display: none;
}

.quiz-screen.active {
    display: block;
}

/* Card base */
.quiz-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.quiz-header {
    padding: 40px 30px;
    text-align: center;
    background: #ffffff;
    color: #000000;
}

.quiz-header h2 {
    margin: 0 0 15px 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
}

.quiz-header h3 {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    color: #000000;
    font-weight: 600;
}

.quiz-header p {
    margin: 0;
    color: #666666;
    font-size: 1.1rem;
    font-weight: 400;
}

.quiz-content {
    padding: 30px;
}

/* Form styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #f7fafc;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

/* Buttons */
.quiz-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.quiz-btn-primary {
    background: #2D3343;
    color: #ffffff;
}

.quiz-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 51, 67, 0.3);
}

.quiz-btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.quiz-btn-secondary:hover:not(:disabled) {
    background: #cbd5e0;
    transform: translateY(-1px);
}

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

/* Header info */
.quiz-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.user-info, .score-info, .timer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

.timer-info.timer-warning {
    color: #e53e3e;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Progress */
.quiz-progress {
    margin-bottom: 20px;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: white;
}

.question-category {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: white;
    backdrop-filter: blur(10px);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    transition: width 0.3s ease;
}

/* Question image */
.question-image {
    margin: 25px 0;
    text-align: center;
}

.question-image img {
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Answers */
.answers-container {
    display: grid;
    gap: 15px;
    margin: 25px 0;
}

.answer-option {
    width: 100%;
    padding: 18px 24px;
    text-align: left;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.answer-option:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.answer-option.selected {
    border-color: #667eea;
    background: #f0f4ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Actions */
.quiz-actions {
    text-align: center;
    padding: 20px;
}

/* Results */
.text-center {
    text-align: center;
}

.performance-badge {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
    font-weight: bold;
}

.performance-badge.excellent {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.performance-badge.good {
    background: linear-gradient(135deg, #4299e1, #3182ce);
}

.performance-badge.fair {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.performance-badge.poor {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.result-item {
    text-align: center;
    background: #f7fafc;
    padding: 25px;
    border-radius: 16px;
}

.result-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.result-value {
    font-size: 2.2rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 8px;
}

.result-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* Detailed results */
.result-detail {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 15px;
    background: #f7fafc;
}

.result-question {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.question-number {
    font-weight: bold;
    color: #667eea;
    font-size: 16px;
}

.question-text {
    flex: 1;
    color: #2d3748;
}

.result-points {
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.result-points.correct {
    background: #c6f6d5;
    color: #22543d;
}

.result-points.incorrect {
    background: #fed7d7;
    color: #742a2a;
}

/* Toast messages */
.quiz-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 350px;
    backdrop-filter: blur(10px);
}

.quiz-toast.show {
    transform: translateX(0);
}

.quiz-toast-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.quiz-toast-error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

/* Responsive */
@media (max-width: 768px) {
    #quiz-fotografico-container {
        padding: 15px;
    }

    .quiz-content {
        padding: 25px;
    }

    .quiz-header {
        padding: 30px 25px;
    }

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

    .quiz-header-info {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .user-info, .score-info, .timer-info {
        justify-content: center;
    }

    .question-image img {
        height: 200px;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .result-question {
        flex-direction: column;
        gap: 10px;
    }

    .quiz-btn {
        padding: 14px 24px;
    }
}

/* Admin compatibility */
.wp-admin #quiz-fotografico-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
}
