body {
    margin: 0;
    font-family: 'Roboto', Arial, sans-serif;
    background: linear-gradient(135deg, #fff6eb 0%, #ff1b1b 100%);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

.title {
    text-align: center;
    color: #000000;
    font-size: 2.2em;
    font-weight: bold;
    margin-bottom: 30px;
    letter-spacing: 2px;

}

.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    justify-items: center;
}

.card {
    background: linear-gradient(135deg, #f0f0f0 100%, #ffffff 100%);
    border-radius: 18px;
    box-shadow:
        inset -1px 1px 1px 0 #d2d2d2,
        /* highlight inner top/left */
        inset -1px -1px 1px 0 #c4c4c4;
    /* shadow inner bottom/right */
    padding: 22px 10px 14px 10px;
    text-align: center;
    width: 150px;
    min-height: 120px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #f3f3f3;
}

.card:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: none;
    background: linear-gradient(135deg, #ffe97a 0%, #ffd43b 100%);
    border-color: #ffd43b;
}

.card.active {
    border: 2.5px solid #e53935;
    color: #e53935;
    font-weight: bold;
}

.card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    /* Outer emboss effect */
    box-shadow:
        2px 2px 6px 0 #ffffff,
        /* shadow bottom right */
        -2px -2px 6px 0 #ffffff,
        /* highlight top left */
        0 0 0 2px #131313 inset,
        /* subtle inner border highlight */
        0 1.5px 2px 0 rgba(0, 0, 0, 1);
    /* subtle outer shadow */
    border: 1.5px solid #f0f0f0;
    background: #fff;
}

.card-title {
    margin-top: 12px;
    font-size: 1.2em;
    font-weight: 600;
    color: #c40000;
    letter-spacing: 0px;
}

.card.active .card-title {
    color: #e53935;
}

.footer {
    text-align: center;
    margin-top: 30px;
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    letter-spacing: 1px;
}

.footer span {
    background: #222;
    color: #fff;
    padding: 4px 14px;
    border-radius: 8px;
    margin-left: 8px;
    font-size: 1em;
    vertical-align: middle;
}



.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: rgba(255, 255, 255, 0.9) url('Assets/trongdong.png') center center/cover no-repeat;
    background-size: 120%;
    /* Nền trắng mờ + trống đồng căn giữa, kích thước 220px */
    border-radius: 22px;
    padding: 40px 32px 32px 32px;
    max-width: 520px;
    min-width: 0;
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.18),
        0 1.5px 6px rgba(0, 0, 0, 0.07);
    position: relative;
    text-align: center;
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.65s cubic-bezier(.4, 1.6, .6, 1), opacity 0.25s;
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(220, 180, 180, 0.18);
}

.close-btn {
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 2.2em;
    color: #e53935;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
    z-index: 2;
}

.close-btn:hover {
    background: #ffeaea;
}

.card-flip {
    transform: scale(1.2);
    opacity: 0;
    animation: cardScaleIn 0.55s cubic-bezier(.4, 2, .6, 1) forwards;
    /* animation-delay sẽ được set inline từ JS */
}

@keyframes cardScaleIn {
    0% {
        transform: scale(1.2);
        opacity: 0;
    }

    60% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal.show .modal-box {
    transform: scale(1);
    opacity: 1;
}

.filter-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 24px;
    margin-top: 10px;
    margin-left: 10px;
    /* Căn trái bằng card/grid nếu cần */
    padding-left: 0;
    background: none;
}

#region-filter {
    width: 150px;
    padding: 10px 22px 10px 14px;
    border-radius: 12px;
    font-size: 1.08em;
    border: 1.8px solid #e53935;
    background: linear-gradient(90deg, #fff6f6 60%, #ffeaea 100%);
    color: #c40000;
    box-shadow: 0 2px 12px 0 rgba(229, 57, 53, 0.08);
    outline: none;
    transition: border 0.18s, box-shadow 0.18s, background 0.18s;
    font-weight: 700;
    letter-spacing: 0.5px;
    appearance: none;
    cursor: pointer;
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23e53935' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
}

#region-filter:focus {
    border: 1.8px solid #c40000;
    box-shadow: 0 0 0 2px #ffd6d6;
    background: linear-gradient(90deg, #ffeaea 0%, #fff6f6 100%);
}

.slide-detail {
    display: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(.4, 2, .6, 1);
    background: #fff6f6;
    border-radius: 10px;
    padding: 12px 10px 10px 10px;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    body {
        background: linear-gradient(135deg, #fff6eb 0%, #ffe9b3 100%);
    }

    .container {
        max-width: 100vw;
        padding: 0 2vw;
        margin: 0;
    }

    .title {
        font-size: 1.25em;
        margin-bottom: 16px;
        margin-top: 24px;
        /* Thêm dòng này để hạ tiêu đề xuống */
        letter-spacing: 1px;
        text-shadow: none;
        color: #000000;
    }

    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        justify-items: stretch;
    }

    .card {
        padding: 2px 2px 8px 2px;
        border-radius: 8px;
        background: linear-gradient(145deg, #ffffff 0%, #eeeeee 100%);
        /* Gradient tối trên/trái, sáng dưới/phải */
        box-shadow:
            inset 2px 2px 4px #c6cdd2,
            /* bóng tối nhẹ phía trên/trái */
            inset -2px -2px 4px #ffffff,
            /* viền sáng phía dưới/phải */
            inset 0 1.5px 0 #e0e5ec,
            /* bevel sáng dưới */
            inset 0 -1.5px 0 #fdfeff,
            /* bevel tối trên */
            0 1.5px 6px rgba(224, 218, 218, 0.04);
        /* shadow ngoài nhẹ */
        border: none;
        min-height: unset;
        width: 100%;
        margin: 0;
        transition: box-shadow 0.18s, background 0.18s;
    }


    .card img {
        width: 100%;
        height: 70px;
        border-radius: 8px;
        margin-bottom: 6px;
        box-shadow: none;
        border: none;
    }

    .card-title {
        font-size: 0.98em;
        font-weight: 700;
        color: #c53121;
        margin-top: 0;
        margin-bottom: 2px;
        letter-spacing: 0.2px;
        text-align: center;
    }

    .footer {
        font-size: 0.9em;
        margin-top: 16px;
        text-align: center;
    }

    .modal-box {
        max-width: 87vw;
        padding: 18px 5vw 18px 5vw;
        border-radius: 16px;
    }

    .filter-bar {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-bottom: 14px;
        margin-top: 10px;
        margin-left: 0vw;
        padding-left: 0;
        background: none;
    }

    #region-filter {
        width: 140px;
        padding: 9px 16px 9px 10px;
        border-radius: 8px;
        font-size: 1em;
        border: 1.5px solid #e53935;
        background: linear-gradient(90deg, #fff6f6 60%, #ffeaea 100%);
        color: #c40000;
        box-shadow: 0 2px 8px 0 rgba(229, 57, 53, 0.08);
        font-weight: 700;
        background-image:
            url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23e53935' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 16px 16px;
    }

    #region-filter:focus {
        border: 1.5px solid #c40000;
        box-shadow: 0 0 0 2px #ffd6d6;
        background: linear-gradient(90deg, #ffeaea 0%, #fff6f6 100%);
    }

    .profile-popup {
        position: fixed;
        inset: 0;
        /* top:0; right:0; bottom:0; left:0 */
        width: 100%;
        max-width: none;
        border-radius: 0;
        box-sizing: border-box;
    }

    .profile-popup-content {
        padding: 18px 5vw 18px 5vw;
    }


}

.profile-popup {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    max-width: 420px;
    background: #fff6f6;
    box-shadow: 2px 0 24px rgba(229, 57, 53, 0.1);
    z-index: 3000;
    transform: translateX(-100%);
    transition: transform 0.45s cubic-bezier(.4, 1.2, .6, 1);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
}

.profile-popup.show {
    transform: translateX(0);
}

.profile-popup-content {
    padding: 32px 24px 24px 24px;
    color: #c40000;
    font-size: 1.08em;
}

.profile-popup-close {
    position: absolute;
    right: 18px;
    top: 18px;
    font-size: 2em;
    color: #e53935;
    cursor: pointer;
    background: #fff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 8px #ffd6d6;
}

.timeline-title {
    margin: 24px 0 10px 0;
    font-weight: 700;
    color: #e53935;
    font-size: 1.08em;
    letter-spacing: 1px;
    text-align: left;
}

.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    position: relative;
}

.timeline-list li {
    position: relative;
    margin-bottom: 18px;
    padding-left: 24px;
    border-left: 3px solid #e53935;
    color: #111;
    font-size: 1em;
    line-height: 1.5;
    background: none;
    min-height: 24px;
    display: flex;
    align-items: flex-start;
}

.timeline-dot {
    position: absolute;
    left: -7px;
    top: 12px;
    width: 12px;
    height: 12px;
    background: #e53935;
    border-radius: 50%;
    border: 2px solid #fff6f6;
    box-shadow: 0 0 0 2px #e53935;
    z-index: 1;
    transform: translateY(-50%);
}

.timeline-year {
    font-weight: bold;
    margin-right: 8px;
    color: #111;
    min-width: 120px;
    display: inline-block;
}

.timeline-desc {
    color: #111;
    display: inline;
}