/* General Styles */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 300px;
    padding: 15px;
    border-radius: 5px;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
    animation: fadeIn 0.3s ease;
}

.notification.info {
    background-color: #d4edff;
    color: #004085;
}

.notification.success {
    background-color: #d4edd4;
    color: #155724;
}

.notification.warning {
    background-color: #fff3cd;
    color: #856404;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
}

/* News Cards */

#newsList .card {
    transition: transform 0.3s ease;
    margin-bottom: 15px;
}

#newsList .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Photo Gallery */

#photoGallery .col-md-4 {
    transition: transform 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 15px;
}

#photoGallery .col-md-4:hover {
    transform: scale(1.03);
}

#photoGallery img {
    transition: transform 0.5s ease;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
}

#photoGallery .col-md-4:hover img {
    transform: scale(1.1);
}

/* Loading */

.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.progress {
    height: 10px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.2);
}

.progress-bar {
    background-color: #004d40;
    transition: width 0.3s ease;
}

/* Animations Effect */

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

/* Media Queries */

@media (max-width: 768px) {
    .notification {
        max-width: calc(100% - 40px);
        top: 10px;
        right: 10px;
    }
    
    #photoGallery .col-md-4 {
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .notification {
        padding: 12px;
        font-size: 14px;
    }
    
    .loading-container .progress {
        width: 80%;
    }
}

@media (max-width: 375px) {
    .notification {
        top: 5px;
        right: 5px;
        padding: 10px;
        font-size: 13px;
    }
    
    .notification-close {
        font-size: 16px;
    }
}

/* Map Styles */

#modalCountryName {
    font-weight: 700 !important;
    margin-bottom: 20px;
}

#main-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 45px);
    margin-top: 0px;
    margin-bottom: 0px;
    overflow: hidden;
    z-index: 1;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Map Country Selector */

.map-select-container {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    width: 250px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

.map-select-container select {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    padding-right: 30px;
    background-color: white;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    cursor: pointer;
}

.map-select-container select:focus {
    outline: none;
    border-color: #004d40;
    box-shadow: 0 0 0 2px rgba(0, 77, 64, 0.2);
}

/* Map Buttons */

.map-buttons-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90%;
    gap: 6px;
}

.map-buttons-container .btn {
    margin: 2px;
    background-color: #004d40;
    border-color: #004d40;
    transition: all 0.3s ease;
    padding: 8px 12px;
    font-weight: 500;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    width: auto;
    height: auto;
    min-width: 65px;
}

.map-buttons-container .btn:hover {
    background-color: #00796b;
    border-color: #00796b;
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* Map Media Queries */

@media (min-width: 1200px) and (max-width: 1300px) {
    .map-buttons-container .btn {
        padding: 10px 14px;
        font-size: 15px;
        min-width: 70px;
    }

    #main-container {
        height: calc(100vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 280px;
    }
}

@media (min-width: 1025px) and (max-width: 1119px) {
    .map-buttons-container .btn {
        padding: 9px 12px;
        font-size: 15px;
        max-width: 113px;
    }

    #main-container {
        height: calc(100vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 260px;
    }
}

@media (max-width: 1024px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 50%;
        left: 50%;
    }

    #main-container {
        height: calc(100vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 220px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 7px;
        font-size: 13px;
    }
}

@media (min-width: 992px) and (max-width: 1023px) {
    .map-buttons-container .btn {
        padding: 9px 12px;
        font-size: 15px;
        max-width: 113px;
    }

    #main-container {
        height: calc(100vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 260px;
    }
}

@media (min-width: 821px) and (max-width: 991px) {
    .map-buttons-container {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        background-color: rgba(255, 255, 255, 0.8);
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 90%;
        gap: 6px;
        margin-right: -90px;
    }
    
    .map-buttons-container .btn {
        margin: 2px;
        background-color: #004d40;
        border-color: #004d40;
        transition: all 0.3s ease;
        padding: 8px 12px;
        font-weight: 500;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        width: auto;
        height: auto;
        min-width: 65px;
    }

    #main-container {
        height: calc(100vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 240px;
    }
}

@media (min-width: 821px) and (max-width: 950px) {
    .map-buttons-container {
        margin-right: -90px;
        width: 480px;
    }
    
    #main-container {
        height: calc(100vh - 45px);
        margin-top: 0px;
    }
}

@media (max-width: 820px) {
    .map-buttons-container {
        margin-right: -90px;
        width: 480px;
    }
    
    #main-container {
        height: calc(100vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 220px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 7px;
        font-size: 13px;
    }
}

@media (min-width: 769px) and (max-width: 819px) {
    .map-buttons-container {
        margin-right: -90px;
        width: 480px;
    }
    
    #main-container {
        height: calc(100vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
        margin-bottom: 10px;
    }

    #main-container {
        height: calc(100vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 220px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 7px;
        font-size: 13px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 220px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 7px;
        font-size: 13px;
    }
}

@media (min-width: 431px) and (max-width: 575px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 200px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 6px;
        font-size: 12px;
    }
}

@media (max-width: 432px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 180px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (max-width: 430px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 180px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (max-width: 428px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 180px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (min-width: 413px) and (max-width: 427px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 180px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (max-width: 414px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 180px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (max-width: 412px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 180px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (min-width: 391px) and (max-width: 411px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 180px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (max-width: 390px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 180px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (min-width: 376px) and (max-width: 389px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 180px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (max-width: 375px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 150px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (min-width: 361px) and (max-width: 374px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 19px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 160px;
        top: 9px;
        padding: 8px;
    }
    
    .map-select-container select {
        padding: 4px;
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 3px;
    }
    
    .map-select-container {
        width: 150px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (max-width: 393px) {
    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }

    .modal.show .modal-dialog {
        margin-top: 20px;
    }
}

@media (max-width: 385px) {
    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }

    .modal.show .modal-dialog {
        margin-top: 20px;
    }
}

@media (min-width: 321px) and (max-width: 359px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 45%;
        left: 24%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 160px;
        top: 9px;
        padding: 8px;
    }
    
    .map-select-container select {
        padding: 4px;
        font-size: 11px;
    }
}

@media (max-width: 320px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 145px;
        top: 9px;
    }
    
    .map-select-container select {
        padding: 5px;
        font-size: 12px;
    }
}

@media (min-width: 256px) and (max-width: 319px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 45%;
        left: 30%;
    }

    #main-container {
        height: calc(101.5vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 160px;
        top: 9px;
        padding: 8px;
    }
    
    .map-select-container select {
        padding: 4px;
        font-size: 11px;
    }
}

@media (min-width: 207px) and (max-width: 255px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 55%;
        left: 30%;
    }

    #main-container {
        height: calc(102vh - 45px);
        margin-top: 0px;
    }
    
    .map-select-container {
        width: 140px;
        top: 13px;
        padding: 6px;
    }
    
    .map-select-container select {
        padding: 3px;
        font-size: 10px;
    }
}

@media (min-width: 150px) and (max-width: 206px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 64%;
        left: 38%;
    }
    
    .map-select-container {
        width: 123px;
        top: 15px;
        padding: 5px;
    }
    
    .map-select-container select {
        padding: 2px;
        font-size: 9px;
    }
}

@media (min-width: 50px) and (max-width: 149px) {
    .map-buttons-container .btn {
        padding: 5px 9px;
        font-size: 12px;
        min-width: 55px;
        margin: 1px;
    }

    .map-buttons-container {
        width: 31%;
        left: 19%;
    }
    
    .map-select-container {
        width: 100px;
        top: 5px;
        padding: 4px;
    }
    
    .map-select-container select {
        padding: 1px;
        font-size: 8px;
    }
}

/* Modal Styles */

.modal-backdrop.show { opacity: 0.5; }

html.modal-open,
body.modal-open {
    height: 100%;
    overflow: hidden !important;
    padding-right: 0 !important;
    overscroll-behavior: contain;
}

.modal {
    overflow: hidden !important;
    padding-left: 0 !important;
}

.modal-dialog {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 600px;
    transform: translateY(-50%) !important;
    top: 50%;
}

@media (max-height: 600px) {
    .modal-dialog { top: 50%; transform: translateY(-50%) !important; }
}

/* Modal Scrollable */

.modal-dialog-scrollable { height: calc(70% - 1rem); }
.modal-dialog-scrollable .modal-content { max-height: 100%; overflow: hidden; }
.modal-dialog-scrollable .modal-body { overflow-y: auto; overflow-x: hidden; }

.modal.show .modal-dialog {
    align-content: center !important;
}

/* Modal Box */

.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1050;
    position: relative;
    pointer-events: auto;
    height: auto;
    min-height: 300px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Modal Sections */

.modal-header {
    flex-shrink: 0;
    background-color: #f8f9fa;
    border-bottom: 2px solid #004d40;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 15px 20px;
    text-align: center;
    justify-content: center;
}

.modal-title {
    font-weight: 600;
    color: #004d40;
    margin: 0 auto;
    text-align: center;
}

.modal-body {
    flex: 1;
    overflow-y: auto !important;
    padding: 20px;
    text-align: center;
    scroll-behavior: auto;
    scroll-padding-top: 0;
    -webkit-overflow-scrolling: touch;
    max-height: calc(90vh - 140px);
}

.modal.show .modal-body {
    scrollbar-gutter: stable;
    overflow-anchor: none;
}

.modal-footer {
    flex-shrink: 0;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Modal Close Buttons */

#countryInfoModal .close,
#countryWeatherModal .close,
#countryWikiModal .close,
#countryNewsModal .close,
#countryPhotosModal .close { display: none; }

/* Modal Header Alignment */

#countryInfoModal .modal-header,
#countryWeatherModal .modal-header,
#countryWikiModal .modal-header,
#countryNewsModal .modal-header,
#countryPhotosModal .modal-header {
    justify-content: center;
    padding-right: 1rem;
}

#countryInfoModal .modal-header { border-bottom-color: #3498db; }
#countryWeatherModal .modal-header { border-bottom-color: #f39c12; }
#economyModal .modal-header { border-bottom-color: #2ecc71; }
#countryWikiModal .modal-header { border-bottom-color: #9b59b6; }
#countryPhotosModal .modal-header { border-bottom-color: #1abc9c; }
#countryNewsModal .modal-header { border-bottom-color: #e67e22; }

/* Modal Scroll */

#countryNewsModal .modal-body::-webkit-scrollbar,
#countryPhotosModal .modal-body::-webkit-scrollbar,
#countryWikiModal   .modal-body::-webkit-scrollbar,
#wikiInfo           .modal-body::-webkit-scrollbar { width: 6px; }

#countryNewsModal .modal-body::-webkit-scrollbar-thumb,
#countryPhotosModal .modal-body::-webkit-scrollbar-thumb,
#countryWikiModal   .modal-body::-webkit-scrollbar-thumb,
#wikiInfo           .modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 77, 64, 0.5);
    border-radius: 3px;
}

/* Country Info */

#countryInfoModal .modal-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}
#countryInfoModal #countryInfo {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Weather */

#countryWeatherModal .modal-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}
#countryWeatherModal .text-center { width: 100%; }
#countryWeatherModal h2 { font-size: 3rem; margin: 0.5rem 0; }
#countryWeatherModal .row {
    width: 100%;
    max-width: 400px;
    margin: 1.5rem auto 0;
    justify-content: space-around;
}
#countryWeatherModal .col-6 { text-align: center; }
#weatherIcon { margin: 0 auto; display: block; }
.weather-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}
.weather-icon { flex: 0 0 100px; text-align: center; }
.weather-icon img { width: 80px; height: 80px; }
.weather-data { flex: 1; }

/* Wikipedia */

#countryWikiModal .modal-dialog,
#wikiInfo .modal-dialog { max-width: 800px; }
#countryWikiModal .modal-content,
#wikiInfo .modal-content {
    height: auto;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}
#countryWikiModal .modal-body,
#wikiInfo .modal-body {
    flex: 1;
    overflow-y: auto !important;
    padding: 20px;
    max-height: calc(70vh - 130px);
}
#countryWikiModal #wikiImageContainer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0 15px;
    margin-bottom: 15px;
}
#countryWikiModal #wikiImage {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
#countryWikiModal #wikiTitle { font-weight: bold; margin-bottom: 1rem; text-align: left; }
#countryWikiModal #wikiContent { text-align: left; }
#countryWikiModal #wikiContent p { margin-bottom: 1em; text-align: justify; }
#countryWikiModal .text-right { margin-top: 1.5rem; border-top: 1px solid #eee; padding-top: 0.75rem; }
#countryWikiModal .modal-header,
#countryWikiModal .modal-footer,
#wikiInfo .modal-header,
#wikiInfo .modal-footer { flex-shrink: 0; }

/* News */

#countryNewsModal .modal-content { display: flex; flex-direction: column; width: 700px; }
#countryNewsModal .modal-body { padding: 0; overflow-y: auto !important; }
#countryNewsModal #newsInfo {
    height: auto; width: 100%; padding: 15px 15px 5px; overflow: visible;
}
#countryNewsModal #newsCountryName { text-align: center; margin-bottom: 1rem; font-weight: bold; color: #333; }
#countryNewsModal #newsList {
    height: auto !important;
    max-height: calc(70vh - 210px);
    overflow-y: auto !important;
    padding: 0 5px 15px;
    -webkit-overflow-scrolling: touch;
}
#countryNewsModal .card {
    margin-bottom: 1.5rem !important;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}
#countryNewsModal .card:last-child { margin-bottom: 20px; }
#countryNewsModal .card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
#countryNewsModal .card-title { font-weight: bold; font-size: 1.1rem; text-align: left; }
#countryNewsModal .card-subtitle { font-size: 0.85rem; color: #6c757d; text-align: left; }
#countryNewsModal .card-text { text-align: justify; margin: 10px 0; line-height: 1.5; }
#countryNewsModal .card-link { display: inline-block; text-align: left; color: #3498db; font-weight: 500; }

/* Photos */

#countryPhotosModal .modal-content { max-height: 70vh; width: 650px; }
#countryPhotosModal .modal-body {
    padding: 15px 15px 10px;
    overflow-y: auto !important;
    max-height: calc(70vh - 130px);
}
#countryPhotosModal #photoGallery {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 15px;
}
#countryPhotosModal .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 15px;
    padding: 0;
    transition: all 0.3s ease;
}
#countryPhotosModal #photoGallery img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
#countryPhotosModal #photoGallery img:hover { transform: scale(1.03); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

/* Modal Content */

.modal-body h1,
.modal-body h2 { text-align: center; }
.modal-body p,
.modal-body div { text-align: center; }
.modal-footer .btn-secondary { background-color: #6c757d; border-color: #6c757d; }
.modal-footer .btn-secondary:hover { background-color: #5a6268; border-color: #545b62; }

/* Breakpoints */

@media (min-width: 480px) {
    #countryPhotosModal #photoGallery img { height: 160px; }
    #countryPhotosModal .col-md-4 { flex: 0 0 calc(50% - 15px); max-width: calc(50% - 15px); }
}

@media (min-width: 768px) {
    #countryPhotosModal #photoGallery img { height: 180px; }
    #countryPhotosModal .col-md-4 { flex: 0 0 calc(33.333% - 15px); max-width: calc(33.333% - 15px); }
    #countryNewsModal .card { box-shadow: 0 3px 8px rgba(0,0,0,0.12); }
    #countryPhotosModal #photoGallery img { box-shadow: 0 3px 8px rgba(0,0,0,0.15); }
    .weather-details { flex-direction: column; text-align: center; }
    .weather-icon { margin-bottom: 15px; }
}

@media (max-width: 992px) {
    .modal-dialog.modal-lg { max-width: 90%; width: 90%; }
    #countryWikiModal .modal-dialog,
    #wikiInfo .modal-dialog { width: 90%; }
}

@media (max-width: 576px) {
    .modal-dialog { max-width: 95%; }
    .modal-content { max-height: 90vh; }
    .modal-body { padding: 15px; max-height: calc(90vh - 120px); }
    .modal-header { padding: 10px 15px; }
    .modal-footer { padding: 10px 15px; }
    #countryNewsModal #newsInfo { padding: 15px; }
    .modal-title { font-size: 1.2rem; }
    #countryWeatherModal h2 { font-size: 2.2rem; }
    .modal-footer .btn { width: 100%; margin: 0; }
}

@media (max-height: 600px) {
    .modal-content { max-height: 95vh; }
    .modal-body { max-height: calc(95vh - 100px); }
    #countryNewsModal .modal-content,
    #countryPhotosModal .modal-content,
    #countryWikiModal .modal-content,
    #wikiInfo .modal-content { max-height: 90vh; }
    #countryNewsModal .modal-body,
    #countryPhotosModal .modal-body,
    #countryWikiModal .modal-body,
    #wikiInfo .modal-body { max-height: calc(90vh - 90px); }
    #countryNewsModal #newsList { max-height: calc(90vh - 180px); }
    #countryPhotosModal #photoGallery img { height: 100px; }
}

@media (max-width: 375px) {
    .modal-content { max-height: 95vh; }
    .modal-body { padding: 10px; max-height: calc(95vh - 100px); }
    .modal-header { padding: 8px 12px; }
    .modal-footer { padding: 8px 12px; }
    .modal-title { font-size: 1rem; }
    #countryWeatherModal h2 { font-size: 1.8rem; }
    #countryWeatherModal .row { margin-top: 1rem; }
    #countryNewsModal .modal-body { padding: 0; }
    #countryNewsModal #newsInfo { padding: 10px; }
    #countryNewsModal .card { margin-bottom: 1rem !important; }
    #countryNewsModal .card-body { padding: 12px; }
}

@media (max-width: 320px) {
    .modal-dialog { max-width: 98%; }
    .modal-content { max-height: 98vh; }
    .modal-header { padding: 8px 10px; }
    .modal-footer { padding: 8px 10px; }
    .modal-title { font-size: 0.95rem; }
    #countryNewsModal .card-title { font-size: 0.95rem; }
    #countryNewsModal .card-subtitle { font-size: 0.75rem; }
    #countryNewsModal .card-text { font-size: 0.85rem; line-height: 1.4; }
    #countryWeatherModal h2 { font-size: 1.5rem; }
    #countryPhotosModal #photoGallery img { height: 130px; }
}

/* Map Effects */

#map.zooming {
    transition: filter 0.3s ease-in-out;
    filter: brightness(1.1) contrast(1.05);
}

#countrySelect.selecting {
    transform: scale(1.02);
    transition: transform 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 119, 190, 0.3);
}

.leaflet-container {
    transition: all 0.3s ease;
}

.country-highlight {
    animation: pulse 1.5s ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Footer */

.footer{
  position: fixed;
  bottom: 0; left: 0; width: 100%;
  text-align: center;
  background-color: #004d40;
  color: #fff;
  padding: 14px;
  font-size: 12px;
  z-index: 1002;
  margin-bottom: 0;
  transform: translateY(0);
  transition: transform 0.3s ease-in-out;
}

.footer-hidden{
  transform: translateY(100%);
}

.footer-visible{
  transform: translateY(0);
}

@media (max-width: 768px){
  .footer{ font-size: 11px; padding: 11px; }
}
@media (max-width: 480px){
  .footer{ font-size: 10px; padding: 11px; }
}

#map{ padding-bottom: 56px; }

.leaflet-container .leaflet-control-attribution{
  background: transparent !important;
  box-shadow: none !important;
  z-index: 1001;
}

/* Easy Buttons */

.leaflet-bar button,
.leaflet-bar button:hover {
  background-color: #fff;
  border: none;
  border-bottom: 1px solid #ccc;
  width: 26px;
  height: 26px;
  line-height: 26px;
  display: block;
  text-align: center;
  text-decoration: none;
  color: black;
}

.leaflet-bar button {
  background-position: 50% 50%;
  background-repeat: no-repeat;
  overflow: hidden;
  display: block;
}

.leaflet-bar button:hover {
  background-color: #f4f4f4;
}

.leaflet-bar button:first-of-type {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.leaflet-bar button:last-of-type {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  border-bottom: none;
}

.leaflet-bar.disabled,
.leaflet-bar button.disabled {
  cursor: default;
  pointer-events: none;
  opacity: .4;
}

.easy-button-button .button-state{
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.leaflet-touch .leaflet-bar button {
  width: 30px;
  height: 30px;
  line-height: 30px;
}

/* Currency Section */

.currency-converter-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e9ecef;
}

.converter-row {
    align-items: flex-end;
    margin-bottom: 0;
}

.simple-badge-above {
    text-align: center;
    margin-bottom: 10px;
}

.badge {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 20px;
    display: inline-block;
    min-width: 60px;
}

.badge-primary {
    background-color: #007bff;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.form-control {
    border-radius: 8px;
    padding: 12px;
    font-size: 1.1rem;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

/* Currency Dropdown */

.currency-dropdown {
    position: relative;
    display: inline-block;
}

.currency-badge-clickable,
.badge,
#toCurrencyBadge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    height: 40px !important;
    padding: 10px 16px !important;
    border-radius: 9999px !important;
    min-width: 60px !important;
    line-height: 20px !important;
    transition: none !important;
    transform: none !important;
}

.currency-badge-clickable {
    cursor: pointer;
    background-color: #007bff !important;
    color: #fff !important;
    border: none !important;
}

.currency-badge-clickable:hover {
    background-color: #0070e0 !important;
    transform: none !important;
}

.currency-badge-clickable.active {
    background-color: #007bff !important;
    transform: none !important;
}

#toCurrencyBadge {
    background-color: #6c757d !important;
    color: #fff !important;
    border: none !important;
    pointer-events: none !important;
    cursor: default !important;
    opacity: 1 !important;
}
#toCurrencyBadge:hover {
    background-color: #6c757d !important;
}
#toCurrencyBadge i,
#toCurrencyBadge svg,
#toCurrencyBadge .caret,
#toCurrencyBadge .icon {
    opacity: 0.9 !important;
}

.currency-badge-clickable .fa-chevron-down {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.currency-badge-clickable.active .fa-chevron-down {
    transform: rotate(180deg);
}

.currency-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    min-width: 250px;
    max-width: 300px;
    max-height: 160px;
    overflow-y: auto;
    display: none !important;
}

.currency-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.currency-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.currency-dropdown-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.currency-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.currency-option {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
    color: #333;
}

.currency-option:hover {
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    padding-left: 12px;
}

.currency-option:last-child {
    border-bottom: none;
}

.currency-option:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.currency-option:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.currency-option[style*="cursor: default"] {
    cursor: default !important;
}

.currency-option[style*="cursor: default"]:hover {
    background-color: transparent !important;
    border-left: none !important;
    padding-left: 15px !important;
}

/* Input Group */

.input-group {
    width: 100%;
}

.input-group .form-control {
    border-radius: 8px;
}

/* Currency Symbol Section*/

#countryCurrencyModal .modal-body .row.mb-3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
}

#countryCurrencyModal .modal-body .row.mb-3 > .col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
    text-align: center;
}

#countryCurrencyModal .modal-body .row.mb-3 strong {
    display: inline-block;
    margin-bottom: 4px;
}

/* Converter Media Queries */

@media (max-width: 768px) {
    .currency-dropdown-menu {
        min-width: 200px;
        left: 0;
        transform: none;
    }

    .converter-row {
        margin-bottom: 15px;
    }

    .converter-row .col-md-6:first-child {
        margin-bottom: 20px;
    }

    #countryCurrencyModal .currency-converter-section {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
        padding: 16px;
        border-radius: 10px;
    }

    #countryCurrencyModal .input-group {
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    #countryCurrencyModal .form-control {
        font-size: 1rem;
        padding: 10px 12px;
        border-radius: 10px;
    }

    #countryCurrencyModal .simple-badge-above { margin-bottom: 8px; }

    #countryCurrencyModal .currency-badge-clickable,
    #countryCurrencyModal .badge {
        font-size: .95rem;
        padding: 7px 12px;
        border-radius: 18px;
    }
}

@media (max-width: 576px) {
    #countryCurrencyModal .currency-converter-section {
        max-width: 380px;
        padding: 14px;
        border-radius: 10px;
    }

    #countryCurrencyModal .converter-row .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #countryCurrencyModal .input-group {
        max-width: 300px;
    }

    #countryCurrencyModal .form-control {
        font-size: .98rem;
        padding: 9px 11px;
    }

    #countryCurrencyModal .currency-badge-clickable,
    #countryCurrencyModal .badge {
        font-size: .9rem;
        padding: 6px 10px;
        border-radius: 18px;
    }
}

@media (max-width: 380px) {
    #countryCurrencyModal .currency-converter-section {
        max-width: 320px;
        padding: 12px;
    }

    #countryCurrencyModal .input-group {
        max-width: 260px;
    }

    #countryCurrencyModal .form-control {
        font-size: .95rem;
        padding: 8px 10px;
    }
}

/* Currency Option */

.currency-option:contains("Loading") {
    font-style: italic;
    color: #6c757d;
}

.currency-option:contains("Failed") {
    color: #dc3545;
    font-weight: 500;
}

/* Preloader */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.4s ease-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
}

.preloader-content {
    text-align: center;
    max-width: 320px;
}

.preloader-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
    animation: fadeInUp 0.8s ease-out;
}

.preloader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.preloader-title {
    font-size: 1.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    letter-spacing: 0.5px;
}

.preloader-loading {
    width: 36px;
    height: 36px;
    margin: 25px auto;
    border: 3px solid #e9ecef;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}

.preloader-text {
    font-size: 1rem;
    color: #6c757d;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    min-height: 24px;
    transition: opacity 0.3s ease;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

#main-container {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease-in;
}

#main-container.loaded {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .preloader-content {
        max-width: 280px;
        padding: 25px 15px;
        margin: 0 20px;
    }
}

@media (max-width: 480px) {
    .preloader-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    
    .preloader-title {
        font-size: 1.6rem;
    }
    
    .preloader-loading {
        width: 32px;
        height: 32px;
        margin: 20px auto;
    }
    
    .preloader-text {
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #preloader,
    .preloader-logo,
    .preloader-title,
    .preloader-loading,
    .preloader-text,
    #main-container {
        animation: none !important;
        transition: opacity 0.3s ease !important;
    }
}
