/* T5: Phân Biệt Thực - Động Vật Style */


h1, h2, h3 { font-family: 'Baloo 2', cursive; color: #2E7D32; }



.back-btn {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 700;
    color: #2E7D32; background: #fff; padding: 8px 16px; border-radius: 99px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); align-self: flex-start; margin-bottom: 5px;
    transition: transform 0.2s;
}
.back-btn:active { transform: scale(0.95); }

.game-header { text-align: center; margin-bottom: 10px; }
.game-header h1 { font-size: 2.2rem; margin-bottom: 5px; text-shadow: 2px 2px 0 #FFF;}
.game-header p { font-size: 1.1rem; color: #388E3C; margin-bottom: 5px;}

.score-board {
    display: inline-block; padding: 6px 20px; border-radius: 99px; font-weight: 800; font-size: 1.2rem;
    background: #FFD54F; color: #E65100; box-shadow: 0 4px 0px #FFB300;
}
.pop-text.pop { animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* Vùng game chính */
.game-area {
    flex: 1; display: flex; flex-direction: column; gap: 20px;
}

/* Biển chứa item cần kéo */
.items-pool {
    background: #fff; border-radius: 20px; padding: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); min-height: 100px;
    display: flex; gap: 15px; justify-content: center; flex-wrap: wrap;
    border: 4px dashed #A5D6A7; align-items: center; z-index: 10;
}

.draggable-item {
    font-size: 3.5rem; width: 70px; height: 70px; display: flex; align-items: center; justify-content: center;
    background: #F1F8E9; border-radius: 50%; box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    cursor: grab; transition: transform 0.2s; position: relative;
    border: 3px solid #C8E6C9; /* Default */
}

.draggable-item:active { cursor: grabbing; transform: scale(1.1); }
.draggable-item.dragging {
    opacity: 0.8; z-index: 100; transform: scale(1.2); box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* 2 Vùng Dropzone */
.drop-zones-container {
    flex: 1; display: flex; gap: 20px;
}

.drop-zone {
    flex: 1; background: #fff; border-radius: 25px; border: 5px solid transparent;
    padding: 20px; display: flex; flex-direction: column; align-items: center;
    position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

#zone-plant { border-color: #81C784; }
#zone-animal { border-color: #7986CB; }

.drop-zone.over { transform: scale(1.02); }
#zone-plant.over { background: #E8F5E9; border-color: #4CAF50;}
#zone-animal.over { background: #E8EAF6; border-color: #3F51B5;}

.drop-zone h3 { z-index: 2; margin-bottom: 10px; font-size: 1.5rem; background: rgba(255,255,255,0.8); padding: 5px 15px; border-radius: 20px;}
#zone-plant h3 { color: #2E7D32; }
#zone-animal h3 { color: #1A237E; }

.zone-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.2; z-index: 1;
    background-size: cover; background-position: center; border-radius: 20px;
}

.plant-bg {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%23A5D6A7" width="100" height="100"/><circle cx="50" cy="50" r="40" fill="%2381C784"/></svg>');
}
.animal-bg {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%239FA8DA" width="100" height="100"/><circle cx="50" cy="50" r="40" fill="%237986CB"/></svg>');
}

.dropped-items {
    flex: 1; width: 100%; display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start;
    justify-content: center; z-index: 2;
}

.dropped-items .draggable-item {
    position: static !important; transform: scale(1) !important; width: 60px; height: 60px; font-size: 3rem;
    cursor: default; pointer-events: none; animation: popIn 0.3s;
}

/* Rung nhe sai */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}
.error-shake { animation: shakeError 0.4s; }


/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 1000;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-content {
    background: white; padding: 40px; border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); transform: scale(0.8); transition: transform 0.3s;
    max-width: 90%; width: 400px;
}
.modal-overlay.show .modal-content { transform: scale(1); }
.modal-icon { font-size: 5rem; margin-bottom: 10px; text-shadow: 0 10px 20px rgba(0,0,0,0.2); animation: popIn 1s infinite alternate;}
.text-pop { animation: popIn 1s infinite alternate; }

.btn-primary { background: #4CAF50; color: white; border: none; padding: 12px 30px; font-size: 1.2rem; font-family: 'Baloo 2', cursive; border-radius: 99px; cursor: pointer; box-shadow: 0 6px 0px #2E7D32; margin: 5px; }
.btn-secondary { display: inline-block; background: #E2E8F0; color: #4A5568; margin: 5px; border: none; padding: 12px 30px; font-size: 1.2rem; font-family: 'Baloo 2', cursive; border-radius: 99px; cursor: pointer; box-shadow: 0 6px 0px #CBD5E0; }

@keyframes popIn { 0%{transform: scale(1);} 50%{transform: scale(1.5);} 100%{transform: scale(1);} }

@media (max-width: 600px) {
    .drop-zones-container { flex-direction: column; }
    .draggable-item { width: 50px; height: 50px; font-size: 2.5rem; }
    .dropped-items .draggable-item { width: 45px; height: 45px; font-size: 2rem; }
}
