.title_box img {
    width: 24px;
    height: 24px;
}

.map_tcv {
    overflow: hidden;
}

.map_tcv:hover img {
    cursor: pointer;
    transform: scale(1.02);
}

.map_tcv img {
    transition: 0.3s;
}


/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
    z-index: 999999;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    width: 80vw;
    height: 80vh;
    overflow: auto;
    position: relative;
    animation: slideIn 0.3s;
}

.map-container {
    width: 100%;
    height: 100%;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.map-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.map-container img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Animal Marker Styles */
.animal-marker {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: #ff44449d;
    border: 1px solid rgba(255, 255, 255, 0.678);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 5px rgba(255, 68, 68, 0.4);
    transform: translate(-50%, -50%);
    /* animations */
    animation: colorCycle 2s linear infinite, pulse 1.6s ease-in-out infinite alternate;
}

/* đổi màu nền + bóng theo chu kỳ: xanh -> đỏ -> tím -> vàng -> (lặp) */
@keyframes colorCycle {
    0% {
        background-color: #007bff;
        box-shadow: 0 2px 12px rgba(0, 123, 255, 0.5);
        border-color: rgba(255, 255, 255, 0.8);
    }

    25% {
        background-color: #ff4444;
        box-shadow: 0 2px 12px rgba(255, 68, 68, 0.5);
        border-color: rgba(255, 255, 255, 0.8);
    }

    50% {
        background-color: #9b59b6;
        box-shadow: 0 2px 12px rgba(155, 89, 182, 0.45);
        border-color: rgba(255, 255, 255, 0.8);
    }

    75% {
        background-color: #f1c40f;
        box-shadow: 0 2px 12px rgba(241, 196, 15, 0.45);
        border-color: rgba(255, 255, 255, 0.8);
    }

    100% {
        background-color: #007bff;
        box-shadow: 0 2px 12px rgba(0, 123, 255, 0.5);
        border-color: rgba(255, 255, 255, 0.8);
    }
}

/* nhẹ nhún/pulse để marker có cảm giác 'nhấp nháy' hơn */
@keyframes pulse {
    from {
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        transform: translate(-50%, -50%) scale(1.15);
    }
}

.animal-marker:hover {
    width: 40px;
    height: 40px;
    background-color: #ff6666;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.6);
}

.animal-marker::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

/* Info Popup Styles */
.animal-info {
    position: absolute;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    min-width: 200px;
    max-width: 300px;
    display: none;
    animation: popupIn 0.3s;
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animal-info.show {
    display: block;
}

.animal-info h4 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 16px;
}

.animal-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.animal-info .close-info {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

.animal-info .close-info:hover {
    color: #333;
}