/* Protocol Quiz Styles - Drag & Drop Version */
.quiz-container {
    /* max-width: 900px; */
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.quiz-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 5vh;
}

.quiz-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.timer, .score-display, .level-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.timer-value {
    color: #ffeb3b;
    font-size: 1.1rem;
}

.timer.warning {
    background: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.score-value {
    color: #2ecc71;
    font-size: 1.1rem;
}

.level-value {
    color: lightgoldenrodyellow;
    font-size: 1.1rem;
}

.start-btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
}

.quiz-content {
    padding: 2rem;
}

.question-section {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

#question-protocol {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.question-instruction {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Answer Pool */
.answer-pool {
    margin-bottom: 2rem;
    display: flex;
    gap: 3vw;
}

.answer-pool h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}


.answers-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.answer-item {
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: grab;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
    user-select: none;
}

.answer-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.answer-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.answer-item.used {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.answer-item.used:hover {
    border-color: #e9ecef;
    transform: none;
    box-shadow: none;
}

/* Drop Zones */
.drop-zones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.drop-zone-container h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

.drop-zone {
    min-height: 120px;
    border: 3px dashed #bdc3c7;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    background: #f8f9fa;
}

.drop-zone.highlight {
    border-color: #3498db;
    background: #ebf5fb;
    transform: scale(1.02);
}

.drop-zone.correct {
    border-color: #27ae60 !important;
    background: #d4edda !important;
    border-style: solid !important;
}

.drop-zone.wrong {
    border-color: #e74c3c !important;
    background: #f8d7da !important;
    border-style: solid !important;
    animation: shake 0.5s ease-in-out;
}

.drop-zone-placeholder {
    color: #6c757d;
    text-align: center;
}

.placeholder-text {
    font-style: italic;
}

.dropped-answer {
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid #3498db;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    animation: dropIn 0.3s ease-out;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dropped-answer.correct {
    border-color: #27ae60 !important;
    background: #d4edda !important;
    color: #155724 !important;
    animation: correctPulse 0.5s ease-in-out;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.dropped-answer.wrong {
    border-color: #e74c3c !important;
    background: #f8d7da !important;
    color: #721c24 !important;
    animation: wrongShake 0.5s ease-in-out;
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Next Button */
.next-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Confetti */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f00;
    opacity: 0.8;
}

/* Results Screen */
.results-screen {
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.final-score {
    margin-bottom: 2rem;
}

.score-number {
    font-size: 4rem;
    font-weight: bold;
    color: #ffeb3b;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.star-rating {
    margin: 2rem 0;
    font-size: 3rem;
}

.star {
    margin: 0 0.5rem;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.star.active {
    opacity: 1;
    animation: starBounce 0.5s;
}

@keyframes starBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.performance-message {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Quiz Instructions */
.quiz-instructions {
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 2rem 0;
}

.quiz-instructions h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.quiz-instructions ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.quiz-instructions li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.quiz-instructions p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #3498db;
}

/* Responsive Design for Quiz */
@media (max-width: 768px) {
    .quiz-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .quiz-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .drop-zones {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .answers-container {
        grid-template-columns: 1fr;
    }

    .results-content h2 {
        font-size: 2rem;
    }

    .score-number {
        font-size: 3rem;
    }

    .star-rating {
        font-size: 2rem;
    }
}

/* Category Selection */
.category-selector {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.category-selector h4 {
    color: white;
    margin-bottom: 1rem;
    text-align: center;
}

.category-buttons {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.category-btn {
    padding: 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

.category-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.category-btn.selected {
    background: #e74c3c;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Score Requirements */
.score-requirements {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.score-requirements h4 {
    text-align: center;
    margin-bottom: 1rem;
    color: #ffeb3b;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.requirement:last-child {
    margin-bottom: 0;
}

.star-icon {
    font-size: 1.2rem;
    min-width: 40px;
}

.requirement-text {
    flex: 1;
}

/* Flag Display */
.flag-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flag-display h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.flag-value {
    background: #2c3e50;
    color: #ffeb3b;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    word-break: break-all;
    border: 2px solid #3498db;
    font-weight: bold;
}

.copy-flag-btn {
    width: 100%;
    padding: 0.75rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.copy-flag-btn:hover {
    background: #219653;
    transform: translateY(-2px);
}

.copy-flag-btn.copied {
    background: #2ecc71;
}

/* Results Screen Buttons */
#change-category {
    margin-top: 1rem;
    background: #95a5a6;
}

#change-category:hover {
    background: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-buttons {
        grid-template-columns: 1fr;
    }
    
    .category-btn {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .score-requirements {
        margin: 1rem;
    }
    
    .flag-value {
        font-size: 1rem;
        padding: 0.75rem;
    }
}