/* --- 基础重置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 全局容器 ===== */
/* 固定导航条 */
#mainNavbar{
    width: 100%;
}
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: calc(100% / 15 * 11);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

/* 主要内容区（避开固定导航条） */
.main-content {
    margin-top: 100px;  /* 导航条高度 90px + 10px 缓冲 */
    width: 100%;
}

.section-container {
    max-width: calc(100% / 15 * 11);
    margin: 0 auto;
    padding: 0;
}

/* 页脚 */
.footer {
    width: 100%;
    background: #f5f5f5;
    margin-top: 60px;
    padding: 40px 0;
}

.footer-container {
    max-width: calc(100% / 15 * 11);
    margin: 0 auto;
    padding: 0;
}

body {
    background-color: #000;
    color: #fff;
    font-family: "Optima", serif;
    overflow: hidden;
    height: 100vh;
    padding-top: 10px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* --- 核心滤镜 --- */
.invert-target {
    transition: filter 0.4s ease;
    filter: invert(0);
}

.menu-open .invert-target {
    filter: invert(1);
}

.menu-open .nav-links a {
    color: #000;
}

/* --- 首页顶部导航 (保留 80% 动态布局) --- */
/* 导航文字反转 */
.menu-open .nav-links a {
    color: #000;
}

/* --- 顶部导航条 (100% 宽背景，80% 内容) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    transition: background 0.4s;
    background: transparent;
}

.navbar.menu-open {
    background: #fff;
    border-bottom: 1px solid #eee;
}

.nav-inner {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 修复 icon 间距：使用 gap 是最稳妥的 */
.icon-group {
    display: flex !important;
    /* 强制 flex 布局 */
    gap: 20px !important;
    /* 强制 20px 间距 */
    align-items: center;
}

.nav-left {
    flex: 0 0 35%;
    display: flex;
    align-items: center;
}

.nav-center {
    flex: 0 0 30%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-right {
    flex: 0 0 35%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    z-index: 1000;
}

/* 导航链接下划线 */
.nav-links {
    display: flex;
    gap: 25px;
    margin-left: 20px;
}

.nav-links a {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active-link::after {
    width: 100%;
}

.nav-img {
    height: 30px;
    width: auto;
}

.brand-img {
    height: 10px;
    width: auto;
}

.divider {
    margin: 0 15px;
    color: rgba(255, 255, 255, 0.3);
}

.menu-open .divider {
    color: rgba(0, 0, 0, 0.1);
}

.menu-open .icon-group i {
    color: #000;
}

.nav-icon {
    width: 18px;
    height: auto;
    cursor: pointer;
}

/* --- Mega Menu (100% 全宽下拉) --- */
.dropdown-menu {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: 0;
    background: #fff;
    overflow: hidden;
    transition: height 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 999;
}

/* 确保下拉菜单默认隐藏 */
.dropdown-menu {
    display: none;
}

/* 只有在menu-open类存在时才显示下拉菜单 */
.menu-open .dropdown-menu {
    display: block;
}

.dropdown-menu .mega-container {
    width: 80%;
    margin: 0 auto;
    display: flex;
    padding: 40px 0;
    color: #000;
}

.menu-open .dropdown-menu {
    height: 400px;
    /* border-top: 1px solid #f0f0f0; */
}

.dropdown-menu .dropdown-left {
    flex: 0 0 250px;
}

.dropdown-menu .dropdown-left ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu .dropdown-left li {
    margin-bottom: 15px;
}

.dropdown-menu .dropdown-left a {
    display: block;
    padding: 5px 0;
    color: #999;
    font-size: 13px;
    transition: all 0.3s ease;
}

.dropdown-menu .dropdown-left a:hover {
    color: #000;
    transform: translateX(10px);
}

.dropdown-menu .dropdown-right {
    flex: 1;
}

.dropdown-menu .dropdown-right h4 {
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: normal;
    color: #333;
}

.dropdown-menu .recommend-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.dropdown-menu .recommend-item {
    position: relative;
    aspect-ratio: 6 / 9;
    max-height: 360px;
    overflow: hidden;
}

.dropdown-menu .recommend-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.dropdown-menu .recommend-item:hover img {
    transform: scale(1.05);
}

/* 深色主题下的下拉菜单 */
body.dark-theme .dropdown-menu {
    background-color: #000 !important;
}

body.dark-theme .dropdown-menu a,
body.dark-theme .dropdown-menu h4,
body.dark-theme .dropdown-menu span {
    color: #fff !important;
}

body.dark-theme .dropdown-menu .recommend-item .price {
    color: #fff !important;
}

/* --- 3D 系统与指示器 --- */
.scene {
    position: relative;
    width: 100vw;
    height: 100vh;
    perspective: 2000px;
    z-index: 1;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

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

.slab-bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, #333 0%, #000 100%);
    transform: rotateX(-90deg);
    transform-origin: bottom;
}

.side-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.side-nav span {
    width: 18px;
    height: 18px;
}
.up-icon {
    transform: rotate(360deg);
    line-height: 9px;
}
.dots {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border: 1px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: #fff;
}

.arrow-up,
.arrow-down {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.5;
    color: #fff;
    width: 40px;
    height: 40px;
    border: 1px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.arrow-up:hover,
.arrow-down:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* 搜索覆盖层基础样式 */
.search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    /* 默认隐藏 */
    background: #fff;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1100;
    display: flex;
    align-items: center;
}

/* 深色模式下的搜索栏 */
body.dark-theme .search-overlay {
    background: #111;
}

/* 激活状态 */
.search-overlay.active {
    height: 80px;
    /* 与导航栏同高 */
}

.search-inner {
    width: 80%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.search-inner form {
    flex: 1;
    display: flex;
    align-items: center;
}

.search-inner form input {
    flex: 1;
}

.search-inner form button {
    margin-left: 10px;
}

.search-close {
    margin-left: 15px;
    margin-right: 10px;
    cursor: pointer;
    padding: 10px;
    font-size: 20px;
    color: #999;
}

#searchInput {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 18px;
    letter-spacing: 2px;
    color: #000;
    font-family: "Optima", serif;
}

body.dark-theme #searchInput {
    color: #fff;
}




/* 桌面端样式（>768px） */
@media screen and (min-width: 769px) {
    /* 隐藏移动端导航 */
    .mobile-nav-wrapper {
        display: none !important;
    }
    /* 确保桌面导航显示 */
    .desktop-nav {
        display: flex !important;
    }
}

/* 默认隐藏移动端 */
.mobile-nav-wrapper {
    display: none;
}

@media (max-width: 768px) {
    /* 隐藏桌面端 */
    .desktop-nav-wrapper {
        display: none !important;
    }
    
    /* 确保其他桌面端元素也被隐藏 */
    .nav-center,
    .nav-right {
        display: none !important;
    }
    
    /* 显示移动端 */
    .mobile-nav-wrapper {
        display: block;
        width: 100%;
    }
    
    .mobile-header {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 15px;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(5px);
        position: sticky;
        top: 0;
        z-index: 100;
        width: 100%;
        min-height: 60px;
    }
    
    .hamburger {
        position: absolute;
        left: 15px;
        font-size: 24px;
        background: none;
        border: none;
        color: #fff;
        cursor: pointer;
        padding: 5px;
    }
    
    .mobile-menu {
        position: absolute;
        top: 60px;
        left: 0;
        width: 250px;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(5px);
        border-radius: 0 0 10px 0;
        z-index: 99;
    }
    
    .mobile-menu.hidden {
        display: none;
    }
    
    .mobile-menu-item {
        display: flex;
        align-items: center;
        padding: 15px 20px;
        color: #fff;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: background 0.3s;
    }
    
    .mobile-menu-item i {
        width: 30px;
        font-size: 18px;
        margin-right: 15px;
    }
    
    .mobile-menu-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* 搜索浮层样式 */
    .mobile-search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(5px);
        z-index: 2000;
        display: flex;
        flex-direction: column;
    }

    .mobile-search-overlay.hidden {
        display: none;
    }

    .search-header {
        display: flex;
        align-items: center;
        padding: 15px;
        background: rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .close-search {
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        margin-right: 10px;
    }

    .search-form {
        flex: 1;
        display: flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        padding: 0 10px;
    }

    .search-form input {
        flex: 1;
        height: 40px;
        background: none;
        border: none;
        color: #fff;
        font-size: 16px;
        padding: 0 5px;
    }

    .search-form input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    .search-form button {
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        color: #fff;
        font-size: 18px;
        cursor: pointer;
    }
}


@media (max-width: 768px) {
    .dropdown-menu .recommend-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 移动端不显示下拉菜单 */
@media (max-width: 768px) {
    .dropdown-menu {
        display: none !important;
    }
}

/* ===== 移动端适配 ===== */
/* 移动端：取消 11/15 约束，内容占满 */
@media (max-width: 768px) {
    .nav-container,
    .section-container,
    .footer-container {
        max-width: 100%;
    }
    .nav-container {
        align-items: flex-start;
    }
    .main-content {
        margin-top: 90px;  /* 移动端导航条高度不变 */
    }
    
    /* 首页特殊处理 */
    .home-main-content,
    .home-section-container {
        max-width: 100%;
        padding: 0;
        margin-top: 0;
    }
}

/* 视频容器 */
.video-slide {
    position: relative;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
}

/* 视频加载占位符 */
.video-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #000000;
    z-index: 1;
}

/* 加载动画 */
.spinner {
    width: 25px;
    height: 25px;
    border: 4px solid #e0e0e0;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.loader-text {
    color: #666;
    font-size: 10px;
    font-family: sans-serif;
}

/* 视频加载完成后隐藏加载层 */
.video-slide.video-loaded .video-loader {
    display: none;
}

