/* CSS for Interactive Tasks */

/* General Styles */
:root {
    --primary: #4f46e5;
    --primary-light: #eef2ff;
    --success: #10b981;
    --success-light: #ecfdf5;
    --error: #ef4444;
    --error-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
}

.task-container {
    animation: fadeIn 0.4s ease-out;
}

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

/* Tab Navigation */
.task-tab.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.1);
}

.task-tab:not(.active):hover {
    background-color: #f8fafc;
}

/* Drag and Drop Styles */
.draggable-item {
    cursor: grab;
    user-select: none;
    touch-action: none; /* Crucial for mobile dragging */
    position: relative;
    z-index: 10;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.draggable-item:active {
    cursor: grabbing;
}

.draggable-item.dragging {
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    cursor: grabbing;
    position: fixed; /* For floating effect during drag */
    pointer-events: none; /* Allows mouse events to pass through to drop zones */
}

.drop-zone {
    min-height: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-style: dashed;
}

.drop-zone.drag-over {
    background-color: var(--primary-light);
    border-color: var(--primary);
    transform: scale(1.02);
}

.drop-zone.correct {
    background-color: var(--success-light);
    border-color: var(--success);
    border-style: solid;
}

.drop-zone.incorrect {
    background-color: var(--error-light);
    border-color: var(--error);
    border-style: solid;
}

/* Match Words Styles */
.match-btn {
    transition: all 0.2s;
    user-select: none;
}

.match-btn.selected {
    background-color: var(--primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

.match-btn.matched {
    background-color: var(--success);
    color: white !important;
    pointer-events: none;
    opacity: 0.8;
}

.match-btn.wrong {
    animation: shake 0.4s ease-in-out;
    background-color: var(--error);
    color: white;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* True False Styles */
.tf-btn {
    transition: all 0.2s;
}

.tf-btn.active-true {
    background-color: var(--success);
    color: white;
}

.tf-btn.active-false {
    background-color: var(--error);
    color: white;
}

/* Essay Styles */
.no-copy {
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* HOTS Badge */
.hots-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 8px;
    box-shadow: 0 2px 5px rgba(217, 119, 6, 0.3);
}

/* Modal Animations */
.modal-open {
    overflow: hidden;
}

#modalContent.show {
    opacity: 1;
    transform: scale(1);
}

/* Responsive adjustments for Drag and Drop on small screens */
@media (max-width: 640px) {
    .draggable-item {
        padding: 1rem !important;
        font-size: 0.9rem;
    }
    .drop-zone {
        min-height: 80px;
    }
}
