/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
    overflow: hidden;
}

/* Header Styles */
#header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

#header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: headerShine 2s infinite;
}

@keyframes headerShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 5px;
    position: relative;
    z-index: 1;
}



.logo-container {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    width: 50%;
    height: 50%;
    object-fit: contain;
    border-radius: 10%;
    /* border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); */
    /* background: white; */
    /* padding: 10px; */
}


.header-text {
    flex: 1;
}

.header-text h1 {
    margin: 0;
    color: white;
    font-size: 1.2rem;
    /* font-weight: 700; */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.2px;
}

.header-subtitle {
    margin: 8px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Navigation Styles */

.navbar {
    background: linear-gradient(135deg, #73a1f1 0%, #1c6bf3 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 2000;
    padding: 0;
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    /* z-index: 2; */
}

.menu-toggle:hover {
    background: rgba(7, 114, 236, 0.1);
    border-radius: 4px;
}


.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 0;
}

.nav-item {
    position: relative;
    margin: 0;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 32px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-item a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    /* color: #a1acdd; */
}

.nav-item a:hover::before {
    width: 80%;
}

.nav-icon {
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Cesium Container */
#cesiumContainer {
    width: 100%;
    /* Trừ 70px header + 40px navbar = 110px */
    height: calc(100% - 110px);
    position: relative;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    margin: 2% auto;
    width: 90%;
    height: 90%;
    background-color: #000;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    z-index: 10000;
    cursor: pointer;
}

.close:hover {
    color: #ff0000;
}

#panoramaViewer {
    width: 100%;
    height: 100%;
}

/* Measure Toolbar Styles */
.measure-toolbar {
    position: absolute;
    top: 120px;
    left: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 220px;
    pointer-events: none;
    /* Cho phép click xuyên qua toolbar */

}

.measure-btn {
    display: flex;
    align-items: center;
    /* justify-content: center; */
    gap: 10px;
    padding: 10px 10px;
    background: linear-gradient(135deg, #0862d8 0%, #36e0ca 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    min-width: 45px;
    /* Chiều rộng tối thiểu chỉ hiển thị icon */
    width: 45px;
    /* Chiều rộng mặc định */
    pointer-events: auto;
    /* Chỉ button mới nhận click */

}

.measure-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.measure-btn:hover::before {
    left: 100%;
}

.measure-btn:hover {
    background: rgba(1, 68, 68, 0.95);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(5px);
    /* Di chuyển sang phải khi hover */
    width: auto;
    /* Mở rộng để hiển thị text */
    min-width: 200px;
    /* Chiều rộng tối thiểu khi hover */
}

.measure-btn.active {
    background: rgba(0, 122, 204, 0.8);
    border-color: rgba(0, 122, 204, 1);
    width: auto;
    /* Luôn hiển thị text khi active */
    min-width: 200px;
}

.measure-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.6);
}

.measure-btn.btn-clear {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.measure-btn.btn-clear:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
}

.btn-icon {
    font-size: 18px;
    display: inline-block;
    min-width: 25px;
    text-align: center;
    flex-shrink: 0;
    /* Không cho icon bị co lại */
}

.btn-text {
    opacity: 0;
    /* Ẩn text mặc định */
    max-width: 0;
    /* Chiều rộng 0 */
    overflow: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.measure-btn:hover .btn-text,
.measure-btn.active .btn-text {
    opacity: 1;
    /* Hiển thị text khi hover hoặc active */
    max-width: 200px;
    /* Mở rộng để hiển thị text */
    margin-left: 8px;
}



/* Measure Instructions */
.measure-instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 400px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.measure-instructions p {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
}

.measure-instructions ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: none;
}

.measure-instructions li {
    margin: 5px 0;
    font-size: 13px;
    position: relative;
    padding-left: 20px;
}

.measure-instructions li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.measure-instructions strong {
    color: #ffd700;
}





.cesium-compass {
    position: absolute;
    top: 80px;
    right: 10px;
    width: 125px;
    height: 125px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    z-index: 1000;
}

.out-ring-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(38, 38, 38, 0.75);
}

.out-ring,
.gyro,
.rotation_marker {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.out-ring {
    transition: transform 0.3s ease;
}

.gyro-active {
    opacity: 0.8;
}

.rotation_marker {
    pointer-events: none;
}


/* Layer Control Panel */
.layer-control-panel {
    position: absolute;
    top: 320px;
    right: 20px;
    z-index: 1000;
}

.layer-control-toggle {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ff00;
    border-radius: 5px;
    color: #00ff00;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.layer-control-toggle:hover {
    background: rgba(0, 255, 0, 0.2);
    transform: scale(1.1);
}

.layer-list {
    position: absolute;
    top: 50px;
    right: 0;
    width: 300px;
    max-height: 500px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 255, 0, 0.3);
}

.layer-list h3 {
    color: #00ff00;
    font-size: 16px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #00ff00;
}

.layer-section {
    margin-bottom: 20px;
}

.layer-section h4 {
    color: #00ff00;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.layer-item {
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.layer-item label {
    display: flex;
    align-items: center;
    color: white;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 5px;
}

.layer-item input[type="checkbox"],
.layer-item input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.opacity-slider {
    width: 100%;
    height: 4px;
    margin-top: 5px;
    cursor: pointer;
}

.opacity-value {
    color: #00ff00;
    font-size: 11px;
    float: right;
}

/* Scrollbar cho layer list */
.layer-list::-webkit-scrollbar {
    width: 6px;
}

.layer-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.layer-list::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 3px;
}


/* Start Marker */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-buttons {
    margin-top: 20px;
    text-align: right;
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-secondary {
    background-color: #ccc;
    color: black;
}

/* Marker */

.btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #f44336;
    color: white;
    font-weight: bold;
}

.btn-danger:hover {
    background-color: #da190b;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #9e9e9e;
    color: white;
}

.btn-secondary:hover {
    background-color: #757575;
}

.form-buttons {
    margin-top: 20px;
}

.form-buttons button {
    padding: 10px 20px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.form-buttons button i {
    margin-right: 5px;
}

/* Styling cho modal */
.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content-marker {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* End Marker */


/* Info Modal Styles */
/* Info Modal Styles - Redesigned */
.info-modal .modal-content {
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 0;
}

.info-modal-content {
    padding: 40px;
}

.info-modal-content h2 {
    color: #667eea;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #667eea, #764ba2);
    border-image-slice: 1;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.info-content {
    line-height: 2;
    color: #333;
    font-size: 15px;
}

.info-content h3 {
    color: #667eea;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
    padding-left: 15px;
    border-left: 4px solid #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), transparent);
    padding: 10px 15px;
    border-radius: 5px;
}

.info-content h4 {
    color: #764ba2;
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-content h4::before {
    content: '▶';
    color: #667eea;
    font-size: 14px;
}

.info-content p {
    margin: 15px 0;
    text-align: justify;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.info-content ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.info-content ul li {
    margin: 12px 0;
    padding: 12px 20px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08), transparent);
    border-radius: 8px;
    position: relative;
    padding-left: 45px;
    transition: all 0.3s ease;
}

.info-content ul li:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15), transparent);
    transform: translateX(5px);
}

.info-content ul li::before {
    content: '✓';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Contact Info Styles */
.contact-info .contact-item {
    display: flex;
    align-items: flex-start;
    margin: 10px 0;
    padding: 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 12px;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    transition: all 0.3s ease;
}

.contact-info .contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* .contact-info .contact-item:hover::before {
    opacity: 1;
} */

.contact-info .contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.contact-info .contact-item i {
    font-size: 1.2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 20px;
    margin-top: 5px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info .contact-item strong {
    display: block;
    color: #667eea;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.contact-info .contact-item a {
    color: #764ba2;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.contact-info .contact-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.contact-info .contact-item a:hover {
    color: #a0ade9;
}

.contact-info .contact-item a:hover::after {
    width: 100%;
}

/* Scrollbar Styling */
.info-modal .modal-content::-webkit-scrollbar {
    width: 8px;
}

.info-modal .modal-content::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
}

.info-modal .modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.info-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Close Button Enhancement */
.info-modal .close {
    color: #667eea;
    font-size: 40px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.info-modal .close:hover {
    color: #764ba2;
    transform: rotate(90deg);
}

/* Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.info-modal .modal-content {
    animation: modalFadeIn 0.3s ease;
}

/* Shadow Controls Styling */
.shadow-select {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 4px;
    font-size: 12px;
}

.shadow-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
}

.layer-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 13px;
}

/* ==================== GUIDED TOUR STYLES ==================== */

/* .btn-tour {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
} */

/* .btn-tour:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
} */

.tour-control-panel {
    position: fixed;
    top: 55%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 1001;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.tour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.5);
}

.tour-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.tour-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.tour-close:hover {
    background: rgba(255, 59, 59, 0.3);
    transform: rotate(90deg);
}

.tour-info {
    margin-bottom: 15px;
}

.tour-status,
.tour-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 8px;
}

.status-label,
.progress-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.status-text,
.progress-text {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.status-text.active {
    color: #4ade80;
}

.status-text.paused {
    color: #fbbf24;
}

.tour-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tour-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.tour-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tour-btn-start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.tour-btn-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.tour-btn-pause {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.tour-btn-pause:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.tour-btn-stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.tour-btn-stop:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.tour-settings {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-bottom: 8px;
}

.tour-select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    cursor: pointer;
}

.tour-select:focus {
    outline: none;
    border-color: #667eea;
}

.setting-item input[type="range"] {
    width: calc(100% - 60px);
    margin-right: 10px;
}

.value-text {
    color: #667eea;
    font-weight: 600;
    font-size: 13px;
}

/* ==================== FLOOD SIMULATION STYLES ==================== */

#floodControlPanel {
    position: fixed;
    top: 63%;
    right: 20px;
    transform: translateY(-50%);
    width: 320px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    animation: slideInRight 0.3s ease;
    overflow: hidden;
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-bottom: 2px solid rgba(102, 126, 234, 0.5);
}

.panel-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header h3 i {
    color: #4299e1;
    font-size: 20px;
    filter: drop-shadow(0 0 8px rgba(66, 153, 225, 0.6));
}

.btn-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fff;
    transform: rotate(90deg);
}

/* Panel Content */
.panel-content {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

/* Control Groups */
.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.control-group label:hover {
    color: #fff;
}

/* Checkboxes */
.control-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #4299e1;
}

/* Range Sliders */
.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    margin-top: 8px;
    cursor: pointer;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #4299e1, #667eea);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(66, 153, 225, 0.6);
    transition: all 0.3s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(66, 153, 225, 0.8);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #4299e1, #667eea);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(66, 153, 225, 0.6);
    transition: all 0.3s ease;
}

.control-group input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(66, 153, 225, 0.8);
}

.control-group input[type="range"]:focus {
    outline: none;
}

/* Range Labels */
.control-group label[for="floodHeight"],
.control-group label[for="floodOpacity"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

#floodHeightValue,
#floodOpacityValue {
    color: #4299e1;
    font-weight: 700;
    font-size: 15px;
    background: rgba(66, 153, 225, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(66, 153, 225, 0.3);
    min-width: 50px;
    text-align: center;
}

/* Select Dropdown */
.control-group select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.control-group select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4299e1;
}

.control-group select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 10px rgba(66, 153, 225, 0.3);
}

.control-group select option {
    background: #1a202c;
    color: white;
    padding: 10px;
}

/* Reset Button */
#btnResetFlood {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

#btnResetFlood:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

#btnResetFlood:active {
    transform: translateY(0);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.15), rgba(102, 126, 234, 0.15));
    border-left: 4px solid #4299e1;
    padding: 12px 15px;
    margin-top: 20px;
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.info-box i {
    color: #4299e1;
    margin-right: 8px;
    font-size: 16px;
    vertical-align: middle;
    filter: drop-shadow(0 0 5px rgba(66, 153, 225, 0.5));
}

/* Scrollbar Styling */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4299e1, #667eea);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #667eea, #4299e1);
}

/* Animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Divider between control groups */
.control-group:not(:last-child) {
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Enhanced label styling */
.control-group>label:first-child {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: block;
}

/* Toggle switch effect for checkboxes */
.control-group input[type="checkbox"] {
    position: relative;
    width: 44px;
    height: 22px;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 12px;
}

.control-group input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #4299e1, #667eea);
}

.control-group input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.control-group input[type="checkbox"]:checked::before {
    left: 24px;
}


/* START INFO MODAL */
#infoModal .modal-content {
    background: linear-gradient(135deg, #76c1f3 0%, #0d81ee 100%);
    color: white;
}

#infoModal h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#infoImage {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

#infoImage:hover {
    transform: scale(1.05);
}

#infoDescription {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 15px !important;
    backdrop-filter: blur(10px);
}

/* Gallery Navigation Buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 4px;
    transition: all 0.3s;
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Thumbnails */
.thumbnail-img {
    transition: all 0.3s;
}

.thumbnail-img:hover {
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.05);
}

.thumbnail-img.active {
    border-color: #667eea !important;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Image Gallery Container */
#imageGallery {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#infoImage {
    max-height: 500px;
    object-fit: contain;
}

/* 360 View Button Styles */
.btn-360 {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-360:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-360:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.btn-360 i {
    font-size: 18px;
}

/* END INFO MODAL */


/* Responsive Design */
@media (max-width: 768px) {

    /* START mô phỏng ngập */
    #floodControlPanel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        top: 20%;
        /* bottom: 20px; */
        transform: none;
        max-height: 100vh;
    }

    .panel-content {
        max-height: calc(60vh - 80px);
    }

    /* END mô phỏng ngập */

    /* START mô phỏng tour */

    .tour-control-panel {
        right: 10px;
        width: 280px;
        /* z-index: 20000; */
    }

    /* END mô phỏng tour */

    .measure-toolbar {
        top: 80px;
        /* bottom: 80px; */
        right: 10px;
        min-width: 180px;
        padding: 10px;

    }

    .measure-btn {
        padding: 10px 10px;
        font-size: 12px;
    }

    .btn-icon {
        font-size: 18px;
    }

    .btn-text {
        font-size: 12px;
    }

    .measure-instructions {
        bottom: 10px;
        max-width: 90%;
        padding: 12px 18px;
    }

    .header-content {
        justify-content: center;
        padding: 10px 20px;
    }

    .header-text {
        display: none;
    }

    .logo-container {
        width: 50px;
        height: 50px;
    }

    /* Show menu toggle button on mobile */
    .menu-toggle {
        display: block;
    }

    /* Hide navigation by default on mobile */
    .navbar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .navbar.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-item a {
        padding: 16px 20px;
        font-size: 16px;
        justify-content: flex-start;
    }

    .nav-item a::before {
        height: 100%;
        width: 4px;
        left: 0;
        transform: translateX(0);
    }

    .nav-item a:hover::before {
        width: 4px;
    }

    #cesiumContainer {
        height: calc(100% - 70px);
    }

    .cesium-compass {
        display: none;
    }

    /* Layer Control Panel */
    .layer-control-panel {
        top: 120px;

    }
}