/* Factory Project Premium Style */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    /* Premium Palette */
    --primary-dark: #0f172a;
    --primary-light: #1e293b;
    --accent-color: #3b82f6;
    /* Vibrant Blue */
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Status Colors */
    --status-sold: #ef4444;
    --status-rented: #f59e0b;
    --status-available: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* scroll-padding-top: 80px; */
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--primary-dark);
    overflow-x: hidden;
}

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 0;
}

.section-padding-compact {
    padding: 3rem 0;
}

/* 修复锚点跳转偏移（因为有固定导航栏） */
section {
    scroll-margin-top: 80px;
}

/* Hero section 不需要偏移，因为它是全屏的 */
section.hero {
    scroll-margin-top: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    /* Start hidden */
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-links a:hover::after {
    width: 100%;
}

/* 当前激活的导航链接 */
.nav-links a.active {
    color: var(--white);
}

.nav-links a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-1.2.1&auto=format&fit=crop&w=2000&q=80') no-repeat center center/cover;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), var(--primary-dark));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 1rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 50px;
    color: #60a5fa;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid var(--white);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary i {
    font-size: 1.1rem;
}

/* Cards & Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.card {
    background: var(--primary-light);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Visual Building Grid */
.building-visual {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 800px;
    margin: 0 auto;
}

.floor-row {
    display: flex;
    gap: 0.6rem;
}

.floor-label {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--primary-light);
    border-radius: 6px;
}

.unit-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}

.unit-card {
    background: var(--primary-light);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 0.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: default;
}

.unit-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.unit-number {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.unit-area {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.unit-status {
    font-size: 0.7rem;
    margin-top: 0.2rem;
}

/* Status Indicators */
.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.status-sold {
    border-color: var(--status-sold);
}

.status-sold::before {
    background: var(--status-sold);
}

.status-sold .unit-number {
    color: var(--status-sold);
}

.status-rented {
    border-color: var(--status-rented);
}

.status-rented::before {
    background: var(--status-rented);
}

.status-rented .unit-number {
    color: var(--status-rented);
}

.status-available {
    border-color: var(--status-available);
}

.status-available::before {
    background: var(--status-available);
}

.status-available .unit-number {
    color: var(--status-available);
}

.status-available {
    background: rgba(16, 185, 129, 0.05);
    cursor: pointer;
}

.status-available .unit-status {
    color: var(--status-available);
}

.status-rented .unit-status {
    color: var(--status-rented);
}

.status-sold .unit-status {
    color: var(--status-sold);
}

/* Status Legend */
.status-legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1.2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.available {
    background: var(--status-available);
}

.legend-dot.rented {
    background: var(--status-rented);
}

.legend-dot.sold {
    background: var(--status-sold);
}

/* Technical Data Section */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.tech-card {
    background: var(--primary-dark);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.tech-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.5rem;
}

.tech-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.tech-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Panorama Section */
.panorama-quick-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.pano-quick-btn {
    padding: 0.6rem 1.2rem;
    background: var(--primary-dark);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pano-quick-btn:hover {
    background: var(--primary-light);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.pano-quick-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
}

/* 左右箭头导航按钮 */
.panorama-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.panorama-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.panorama-nav-btn i {
    color: var(--white);
    font-size: 1.2rem;
}

.panorama-prev {
    left: 15px;
}

.panorama-next {
    right: 15px;
}

/* 场景指示器 */
.panorama-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none !important;
}

#current-scene {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.panorama-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.panorama-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--primary-dark);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

/* Pannellum 容器 */
.panorama-box > div:not(.panorama-nav-btn):not(.panorama-indicator):not(.panorama-fullscreen-btn) {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.panorama-box canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* 确保 Pannellum 的容器可见 */
.pnlm-container {
    width: 100% !important;
    height: 100% !important;
}

.pnlm-render-container {
    width: 100% !important;
    height: 100% !important;
}

/* 隐藏 Pannellum 自带的加载遮罩，如果需要 */
.pnlm-load-box {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

.pnlm-lbox {
    background: var(--accent-color) !important;
}

/* 确保 Pannellum 的热点层不会阻挡我们的控制按钮 */
.pnlm-ui {
    z-index: 10 !important;
}

.pnlm-container {
    z-index: 1 !important;
}

/* Pannellum 创建的 div 不应阻挡交互 */
.panorama-box > div:first-child {
    pointer-events: none;
}

.panorama-box > div:first-child canvas {
    pointer-events: auto;
}

/* 自定义全屏按钮 */
.panorama-fullscreen-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.panorama-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--accent-color);
}

.panorama-fullscreen-btn i {
    color: var(--white);
    font-size: 1.2rem;
}

/* 全屏弹出层 */
.panorama-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--primary-dark);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.panorama-fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
}

.panorama-fullscreen-overlay .panorama-box {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    border-radius: 0;
    border: none;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.panorama-fullscreen-overlay.active .panorama-box {
    opacity: 1;
    transform: scale(1);
}

.panorama-fullscreen-overlay .panorama-box > div:not(.panorama-nav-btn):not(.panorama-indicator):not(.panorama-fullscreen-btn) {
    width: 100vw !important;
    height: 100vh !important;
}

/* 全屏时隐藏原全屏按钮 */
.panorama-fullscreen-overlay .panorama-fullscreen-btn {
    display: none;
}

/* 全屏时确保场景指示器不阻挡交互 */
.panorama-fullscreen-overlay .panorama-indicator {
    pointer-events: none !important;
}

/* 全屏关闭按钮 */
.panorama-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10000;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.panorama-fullscreen-close:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--accent-color);
    transform: rotate(90deg);
}

.panorama-fullscreen-close i {
    color: var(--white);
    font-size: 1.5rem;
}

/* Footer */
footer {
    background: var(--primary-dark);
    border-top: 1px solid var(--glass-border);
    padding: 5rem 0 2rem 0;
}

.footer-content {
    text-align: center;
}

.footer-main {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--primary-light);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    text-align: left;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.contact-info {
    flex: 1;
}

.contact-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.contact-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.3rem;
}

.contact-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-title {
        font-size: 2rem;
    }

    .footer-subtitle {
        font-size: 1rem;
    }

    .contact-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--glass-border);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .mobile-toggle {
        display: block;
    }

    .floor-row {
        flex-direction: column;
        gap: 0.5rem;
        /* margin-bottom: 1.5rem; */
    }

    .floor-label {
        width: 100%;
        justify-content: flex-start;
        padding: 0.5rem;
        background: transparent;
        color: var(--accent-color);
    }

    .section-padding-compact {
        padding: 2rem 0;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .tech-card {
        padding: 1rem;
    }

    .tech-icon {
        width: 40px;
        height: 40px;
        margin: 0 auto 0.8rem;
    }

    .tech-icon i {
        font-size: 1.2rem;
    }

    .tech-label {
        font-size: 0.7rem;
    }

    .tech-value {
        font-size: 1.2rem;
    }

    .tech-desc {
        font-size: 0.7rem;
    }

    .status-legend {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .panorama-box {
        height: 60vh !important;
        min-height: 60vh !important;
        border-radius: 12px;
    }

    .panorama-quick-selector {
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .pano-quick-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.75rem;
    }

    .panorama-nav-btn {
        width: 40px;
        height: 40px;
    }

    .panorama-nav-btn i {
        font-size: 1rem;
    }

    .panorama-prev {
        left: 10px;
    }

    .panorama-next {
        right: 10px;
    }

    .panorama-indicator {
        bottom: 10px;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    #current-scene {
        font-size: 1rem;
    }

    .panorama-fullscreen-btn {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }

    .panorama-fullscreen-close {
        width: 44px;
        height: 44px;
        top: 15px;
        right: 15px;
    }
}