/* Drag & Drop Styles */

.drag-drop-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    gap: 1.5rem;
    overflow: hidden;
}

.drag-drop-header {
    text-align: center;
    margin-bottom: 1rem;
}

.drag-drop-header h2 {
    margin: 0 0 0.4rem;
    font-size: 1.6rem;
}

.drag-drop-header p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}

.match-counter {
    margin-top: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.2px;
}

.game-area {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

.column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--surface-muted);
    border-radius: 12px;
    min-height: 0;
    align-items: stretch;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.column h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Draggable Items (Terms) */
.draggable-item {
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: grab;
    user-select: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 600;
    text-align: center;
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.draggable-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.draggable-item:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.draggable-item.dragging {
    opacity: 0.5;
    border-color: var(--primary);
}

.draggable-item.matched {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Drop Targets (Definitions) */
.drop-zone {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 8px;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-dark);
    width: 100%;
}

.drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
    transform: scale(1.02);
}

.drop-zone.correct {
    border-color: var(--success);
    background: rgba(76, 175, 80, 0.1);
    border-style: solid;
}

.drop-zone.correct::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--success);
    position: absolute;
    top: -10px;
    right: -10px;
    background: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Feedback Overlay */
.feedback-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem 2rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
}

.feedback-overlay.show {
    opacity: 1;
    animation: popup 0.5s ease;
}

body.dark-mode .drag-drop-header {
    color: #ffffff;
}

body.dark-mode .column {
    background: var(--surface-muted);
}

body.dark-mode .column h3 {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .draggable-item {
    background: var(--surface);
    border-color: var(--border);
    color: #ffffff;
}

body.dark-mode .draggable-item:hover {
    border-color: rgba(255, 255, 255, 0.35);
}

body.dark-mode .drop-zone {
    background: var(--surface);
    border-color: var(--border);
    color: #ffffff;
}

body.dark-mode .drop-zone.drag-over {
    background: rgba(67, 97, 238, 0.18);
}

body.dark-mode .drop-zone.correct {
    background: rgba(76, 175, 80, 0.18);
}

body.dark-mode .drop-zone.correct::after {
    background: #1f1f1f;
}

@keyframes popup {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
    }

    .column {
        min-height: auto;
    }
}