:root { --primary-color: #d32f2f; --nav-bg: #ffffff; }
body { margin: 0; padding: 0; font-family: 'Segoe UI', Arial, sans-serif; overflow: hidden; }
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999; /* Thấp hơn .main-toggle của sidebar */
}
.nav-inner {
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px 0 15px; /* Padding-right 60px để chừa chỗ cho nút 3 gạch */
}
.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 5px;
}
.nav-links li { margin-right: 20px; }
.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    margin-left: 10px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Ô tìm kiếm linh hoạt */

.search-container input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

/* Dropdown User */
.user-menu-container { position: relative; }
.user-menu-container a{color: #333;}
.user-info { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.logout-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    min-width: 150px;
    margin-top: 10px;
}

.logout-dropdown a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
}

.btn-share{
	background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-inner {
        padding-right: 55px;
    }
    .text-hide-mobile, .nav-links span, .user-email-text, .menu-arrow-icon {
        display: none !important;
    }
    .nav-links {
        margin-left: 10px;
        gap: 10px;
		display:none;
    }
    .search-container {
		max-width: 150px !important;
		margin: 0 25px !important;
    }
    .logo {
        font-size: 18px;
    }
    .btn-share {
        padding: 8px 10px !important;
    }
	.nav-right{
		display:none !important;
	}
}
.btn-share-blue {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.separate{
	margin: 0 10px;
    border-right: 1px dashed #000;
}
.logo { font-size: 20px; font-weight: bold; color: #333; text-decoration: none; }
.logo span { color: var(--primary-color); }
.logo img{ width: 100px; }
.search-container { position: relative; margin: 0 20px; flex-grow: 1; max-width: 230px; }
#provinceSearch { width: 100%; padding: 10px 15px; border-radius: 20px; border: 1px solid #ddd; outline: none; font-size: 14px; }
#searchResults { 
    position: absolute; top: 45px; left: 0; width: 100%; background: white; 
    list-style: none; padding: 0; margin: 0; box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    border-radius: 8px; max-height: 350px; overflow-y: auto; display: none; z-index: 3000; 
}
#searchResults li { padding: 12px 15px; cursor: pointer; border-bottom: 1px solid #eee; display: flex; flex-direction: column; }
#searchResults li .sub-name { font-size: 11px; color: #888; margin-top: 2px; }
#searchResults li:hover { background: #f8f9fa; color: var(--primary-color); }
#map { width: 100%; height: calc(100vh - 60px); margin-top: 60px; z-index: 1; background: #aad3df; }
#loader { position: fixed; top: 70px; right: 20px; background: rgba(0,0,0,0.7); color: white; padding: 10px 20px; border-radius: 5px; display: none; z-index: 2000; }
.opacity-slider-container {
    position: fixed; bottom: 20px; left: 20px; background: white; padding: 10px 15px;
    z-index: 2000; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    width: 200px;
}
.opacity-slider-container label { font-size: 12px; font-weight: bold; display: block; margin-bottom: 5px; }
#opacityRange { width: 100%; cursor: pointer; }
.leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    width: 350px !important;
}
.leaflet-popup-content {
    margin: 0 !important;
    width: 350px !important;
}
.popup-container { font-family: 'Segoe UI', sans-serif; }
.popup-header { 
    background: var(--primary-color); 
    color: white; 
    padding: 15px; 
    text-align: center;
}
.popup-body { padding: 15px; color: #333; }
.popup-section { margin-bottom: 15px; border-bottom: 1px dashed #eee; padding-bottom: 10px; }
.popup-section b { color: var(--primary-color); display: block; margin-bottom: 5px; }
.swiper { width: 100%; height: 120px; margin-top: 5px; }
.swiper-slide {
    background-position: center;
    background-size: cover;
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: flex-end;
}
.slide-title {
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 10px;
    width: 100%;
    padding: 4px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.leaflet-control-locate a {
    font-size: 16px;
    color: #444;
    cursor: pointer;
}
.leaflet-control-locate a:hover {
    background-color: #f4f4f4;
}
.custom-location-label {
    background: #2ecc71;
    border: 2px solid #ffffff;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    padding: 5px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 13px;
    white-space: nowrap;
}
.leaflet-tooltip-top:before, .leaflet-tooltip-bottom:before {
    display: none;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.locating-active i {
    animation: spin 1s linear infinite;
    color: #3498db;
}
.custom-location-label {
    cursor: pointer;
    pointer-events: auto !important;
}
.quiz-options-mini button {
border: 1px solid #ddd;
background: #fff;
padding: 5px;
border-radius: 4px;
transition: all 0.3s;
}
.quiz-option-correct {
background-color: #2ecc71 !important;
color: white !important;
border-color: #27ae60 !important;
}
.quiz-option-wrong {
background-color: #e74c3c !important;
color: white !important;
border-color: #c0392b !important;
}
.btn-more-info {
display: block;
width: 100%;
margin-top: 8px;
padding: 6px;
background: #1976d2;
color: white;
text-align: center;
text-decoration: none;
border-radius: 4px;
font-size: 12px;
font-weight: bold;
}
.btn-more-info{ color: #fff !important; }
.leaflet-popup-close-button span {color: #fff}
.leaflet-control-opacity {
    background: #fff;
    border: 2px solid rgba(0,0,0,0.2);
    background-clip: padding-box;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 0;
}
.leaflet-control-opacity i {
    font-size: 14px;
    color: #444;
    margin-bottom: 5px;
}
#opacityRange {
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    width: 8px;
    height: 80px;
    padding: 0 5px;
    cursor: pointer;
}
@keyframes blink-success {
    0% { background-color: #2ecc71; color: #fff; transform: scale(1); }
    50% { background-color: #27ae60; color: #fff; transform: scale(1.05); box-shadow: 0 0 10px #2ecc71; }
    100% { background-color: #2ecc71; color: #fff; transform: scale(1); }
}
.blink-correct {
    animation: blink-success 0.5s ease-in-out infinite;
    z-index: 10;
}
.fade-in-box {
    animation: fadeIn 0.8s ease-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.exp-content.typing::after {
    content: '|';
    animation: blink-cursor 0.8s infinite;
    font-weight: bold;
    color: #e67e22;
    margin-left: 2px;
}
@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.exp-content::after {
    content: '|';
    font-weight: bold;
    color: #e67e22;
    transition: opacity 0.5s ease;
    opacity: 0; 
}
.exp-content.typing::after {
    opacity: 1;
    animation: blink-cursor 0.8s infinite;
}
.popup-container {
    display: flex;
    flex-direction: column;
    height: 350px;
    overflow: hidden;
}
.popup-header {
    flex-shrink: 0;
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.popup-body {
    flex-grow: 1;
    overflow-y: auto !important;
    padding: 10px;
    background: #fff;
}
.popup-body > div:last-child {
    padding-bottom: 10px;
}
.leaflet-popup-content {
    margin: 0 !important;
    width: 350px !important;
}
.leaflet-popup-content-wrapper {
    padding: 0 !important;
    overflow: hidden;
}
.popup-body::-webkit-scrollbar {
    width: 4px;
    background-color: transparent;
}
.popup-body::-webkit-scrollbar-thumb {
    background-color: #d1d1d1;
    border-radius: 10px;
    transition: background 0.3s;
}
.popup-body::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
}
.popup-body {
    scrollbar-width: thin;
    scrollbar-color: #d1d1d1 transparent;
    scroll-behavior: smooth;
    padding-right: 8px;
}
.swal2-input {
    box-sizing: border-box !important;
}
#auth-form i:hover {
    color: #27ae60 !important;
}
.displayemail {
    color: #555;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.logout-dropdown a:hover {
    background-color: #f8f9fa;
    color: #e74c3c !important;
}
.displayemail:hover {
    color: #27ae60;
}
.swal2-container.swal2-top-end, 
.swal2-container.swal2-top {
    top: 70px !important;
}
.swal2-container {
    z-index: 99999 !important;
}
.panel-body p{
	text-align: justify;
}
#tab-display {
    max-height: 500px; /* Kiên có thể điều chỉnh chiều cao này cho phù hợp giao diện */
    overflow-y: auto;  /* Chỉ hiện thanh cuộn khi nội dung vượt quá chiều cao */
    padding-right: 10px; /* Tránh nội dung đè lên thanh cuộn */
    
    /* Hỗ trợ mượt mà trên các trình duyệt hiện đại */
    scrollbar-width: thin; 
    scrollbar-color: #cccccc transparent;
}

/* 2. Tùy chỉnh thanh cuộn cho Chrome, Safari và Edge (Webkit) */
#tab-display::-webkit-scrollbar {
    width: 6px; /* Độ rộng của thanh cuộn nhỏ gọn */
}

#tab-display::-webkit-scrollbar-track {
    background: transparent; /* Nền của thanh cuộn trong suốt để nhìn sạch hơn */
}

#tab-display::-webkit-scrollbar-thumb {
    background-color: #cccccc; /* Màu của thanh trượt */
    border-radius: 10px;       /* Bo tròn thanh trượt */
    border: 1px solid transparent; 
}

#tab-display::-webkit-scrollbar-thumb:hover {
    background-color: #999999; /* Đậm hơn một chút khi di chuột vào */
}
.social-links {
    margin: 15px 0;
    display: flex;
    gap: 15px;
}

.social-icon {
    font-size: 28px;
    transition: all 0.3s ease;
    display: inline-block;
}

/* Màu gốc của các mạng xã hội */
.fb { color: #1877F2; }
.yt { color: #FF0000; }
.tt { color: #000000; }

.social-icon:hover {
    transform: translateY(-5px); /* Nhảy nhẹ lên khi di chuột */
    filter: brightness(1.2); /* Sáng hơn một chút */
}