/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* THAY ĐỔI MÀU SẮC THEO BRAND CỦA BẠN */
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #fff;
    --bg-overlay: rgba(0, 0, 0, 0.8);
    --bg-light: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========================================
   LOADING SCREEN
   ======================================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    text-align: center;
    color: var(--text-light);
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-container p {
    font-size: 16px;
    font-weight: 500;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
    width: auto;
}

.project-name {
    color: var(--text-light);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.nav-btn i {
    font-size: 16px;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
}

/* ========================================
   PANORAMA CONTAINER
   ======================================== */
#panorama-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#panorama {
    width: 100%;
    height: 100%;
}

/* ========================================
   SCENE NAVIGATION
   ======================================== */
.scene-navigation {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    max-width: 90%;
    z-index: 100;
    box-shadow: var(--shadow);
}

.scene-navigation h3 {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

.scene-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.scene-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scene-item:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.scene-item.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.scene-item i {
    font-size: 16px;
}

/* ========================================
   CONTROLS
   ======================================== */
.controls {
    position: fixed;
    top: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.control-btn {
    width: 50px;
    height: 50px;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.control-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: scale(1.1);
}

.control-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* ========================================
   MINIMAP
   ======================================== */
.minimap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 200px;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    overflow: hidden;
    z-index: 100;
    box-shadow: var(--shadow);
    display: none; /* Hiển thị khi có ảnh mặt bằng */
}

.minimap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.minimap-marker {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--accent-color);
    border: 2px solid var(--text-light);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.6);
}

/* ========================================
   MODALS
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 40px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    border: none;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.1);
}

.modal-content h2 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

/* Slideshow Modal cho Phối Cảnh */
.slideshow-content {
    max-width: 1400px;
    width: 90vw;
}

.slideshow-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.slides-wrapper {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    display: none;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.slide.active {
    display: block;
}

.slide img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.slide-caption {
    margin-top: 20px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
    text-align: center;
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    border: none;
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    z-index: 10;
    box-shadow: var(--shadow);
}

.slide-btn:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.slide-btn.prev {
    left: -25px;
}

.slide-btn.next {
    right: -25px;
}

.slide-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.indicator:hover {
    background: var(--secondary-color);
    transform: scale(1.2);
}

.indicator.active {
    background: var(--secondary-color);
    width: 30px;
    border-radius: 6px;
}

/* Video Modal */
.video-content {
    max-width: 1000px;
    width: 90vw;
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    width: 100%;
    height: 100%;
}

/* Location Modal - Hiển thị ảnh */
.location-image-content {
    max-width: 1400px;
    width: 90vw;
}

.location-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.location-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.location-image-container iframe {
    width: 100%;
    height: 600px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}



/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .slide-btn.prev {
        left: -15px;
    }
    
    .slide-btn.next {
        right: -15px;
    }
    
    .slide img {
        max-height: 60vh;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
    }
    
    .project-name {
        font-size: 18px;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-overlay);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        transform: translateY(-200%);
        transition: var(--transition);
    }
    
    .main-nav.active {
        transform: translateY(0);
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .controls {
        top: 80px;
        right: 10px;
        gap: 8px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .scene-navigation {
        bottom: 10px;
        padding: 15px;
    }
    
    .scene-list {
        gap: 8px;
    }
    
    .scene-item {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .minimap {
        width: 120px;
        height: 120px;
        bottom: 10px;
        right: 10px;
    }
    
    .modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .modal-content h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .slide-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .slide-btn.prev {
        left: -10px;
    }
    
    .slide-btn.next {
        right: -10px;
    }
    
    .slide img {
        max-height: 50vh;
    }
    
    .slide-caption {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .project-name {
        font-size: 16px;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
    
    .slide-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .slide-btn.prev {
        left: 5px;
    }
    
    .slide-btn.next {
        right: 5px;
    }
    
    .slide img {
        max-height: 40vh;
    }
    
    .slide-caption {
        font-size: 14px;
    }
    
    .slides-wrapper {
        min-height: 300px;
    }
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .header,
    .controls,
    .scene-navigation,
    .minimap,
    .info-panel {
        display: none;
    }
}
