/* 顶部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(10, 18, 36, 0.8), rgba(10, 18, 36, 0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: "Noto Sans SC", sans-serif;
}

.nav-container {
    width: min(1400px, 92vw);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.logo:hover {
    background: rgba(35, 247, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(35, 247, 255, 0.1);
}

.logo-icon-wrapper {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.logo-icon-wrapper::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.6s ease;
}

.logo:hover .logo-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 20px rgba(35, 247, 255, 0.3);
}

.logo:hover .logo-icon-wrapper::after {
    transform: rotate(45deg) translateY(100%);
}

.logo-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: screen;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-title {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.1;
    font-style: italic;
    background: linear-gradient(90deg, #fff, #a0afd6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.4s ease;
    transform: skewX(-5deg);
}

.logo:hover .main-title {
    background: linear-gradient(90deg, #23f7ff, #af5bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(35, 247, 255, 0.4);
}

.sub-title {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    letter-spacing: 3px;
    font-family: "JetBrains Mono", monospace;
    font-weight: 600;
    transition: color 0.4s ease;
}

.logo:hover .sub-title {
    color: rgba(35, 247, 255, 0.8);
}

.nav-links {
    display: flex;
    gap: 32px;
    height: 100%; 
    align-items: center;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(125, 180, 255, 0.2);
    background: rgba(10, 18, 36, 0.7);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    position: relative;
    z-index: 1205;
    pointer-events: auto;
    touch-action: manipulation;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.navbar.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.navbar.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-item-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-external-btn {
    border: 0;
    background: transparent;
    font: inherit;
    line-height: inherit;
}

.nav-item:hover, .nav-item.active {
    color: #fff;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #23f7ff;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(35, 247, 255, 0.6);
}

.nav-item-wrapper:hover .nav-item::after, .nav-item.active::after {
    width: 100%;
}

.nav-item-wrapper:hover .nav-item {
    color: #fff;
}

/* 下拉菜单基础样式 - 科技感升级 */
.dropdown-menu {
    position: absolute;
    top: 60px; 
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.95); 
    background: rgba(10, 15, 24, 0.95); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(35, 247, 255, 0.15);
    border-radius: 12px;
    padding: 12px 0;
    min-width: 180px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(35, 247, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.2s ease;
    z-index: 1000;
}

/* 顶部霓虹渐变光带 */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #23f7ff, #a855f7, transparent);
    z-index: 1;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* 悬停防断触区域 */
.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -40px; 
    left: -20%; 
    width: 140%;
    height: 40px;
    background: transparent;
}

.nav-item-wrapper:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1); 
}

.dropdown-item {
    display: block;
    color: #a0afd6;
    text-decoration: none;
    padding: 14px 28px;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
    background: transparent;
}

/* 悬停背景发光条 */
.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #23f7ff;
    transform: scaleY(0);
    transition: transform 0.3s ease;
    box-shadow: 0 0 10px rgba(35, 247, 255, 0.8);
    transform-origin: center;
}

/* 悬停时整体光效 */
.dropdown-item:hover {
    color: #fff;
    background: linear-gradient(90deg, rgba(35, 247, 255, 0.1), transparent);
    transform: translateX(4px); 
    text-shadow: 0 0 8px rgba(35, 247, 255, 0.5);
}

.dropdown-item:hover::before {
    transform: scaleY(1);
}

@media (max-width: 1200px) {
    .nav-links {
        gap: 20px;
    }
    .nav-item {
        font-size: 14px;
    }
}

@media (max-width: 960px) {
    .navbar {
        height: auto;
        min-height: 72px;
        align-items: flex-start;
    }
    .nav-container {
        width: min(100%, calc(100vw - 24px));
        padding: 14px 0;
        gap: 12px;
        align-items: center;
    }
    .logo {
        padding: 6px 8px;
        gap: 10px;
        min-width: 0;
    }
    .logo-text {
        min-width: 0;
    }
    .main-title {
        font-size: 18px;
        letter-spacing: 1px;
    }
    .sub-title {
        letter-spacing: 2px;
    }
    .nav-toggle {
        display: inline-flex;
    }
    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        height: auto;
        padding: 14px;
        border-radius: 18px;
        border: 1px solid rgba(125, 180, 255, 0.18);
        background: rgba(8, 16, 34, 0.96);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
        max-height: calc(100vh - 96px);
        overflow: auto;
    }
    .navbar.nav-open .nav-links {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
    .nav-item-wrapper {
        height: auto;
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }
    .nav-item {
        width: 100%;
        display: block;
        padding: 14px 10px;
        font-size: 15px;
    }
    .nav-item::after {
        left: 10px;
        transform: none;
        bottom: 6px;
    }
    .nav-item-wrapper:hover .nav-item::after,
    .nav-item.active::after {
        width: calc(100% - 20px);
    }
    .dropdown-menu,
    .nav-item-wrapper:hover .dropdown-menu {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        min-width: 0;
        padding: 0 0 0 10px;
        border: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease, padding 0.25s ease;
    }
    .nav-item-wrapper.submenu-open .dropdown-menu {
        max-height: 320px;
        pointer-events: auto;
        padding: 2px 0 8px 10px;
    }
    .dropdown-menu::before {
        display: none;
    }
    .dropdown-item {
        padding: 10px 12px;
        font-size: 13px;
    }
    .nav-item-wrapper.has-submenu > .nav-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .nav-item-wrapper.has-submenu > .nav-item::before {
        content: "";
        width: 7px;
        height: 7px;
        border-right: 2px solid rgba(255, 255, 255, 0.8);
        border-bottom: 2px solid rgba(255, 255, 255, 0.8);
        transform: rotate(45deg);
        transition: transform 0.25s ease, border-color 0.25s ease;
        order: 2;
        margin-left: auto;
    }
    .nav-item-wrapper.submenu-open > .nav-item::before {
        transform: rotate(-135deg) translateY(-1px);
        border-color: #23f7ff;
    }
}

@media (max-width: 640px) {
    .navbar {
        min-height: 68px;
    }
    .nav-container {
        width: calc(100vw - 20px);
        padding: 12px 0;
    }
    .logo-icon-wrapper {
        width: 32px;
        height: 32px;
    }
    .main-title {
        font-size: 16px;
    }
    .sub-title {
        font-size: 9px;
        letter-spacing: 1.5px;
    }
    .nav-links {
        top: calc(100% + 6px);
        padding: 12px;
    }
}

@media (max-width: 430px) {
    .navbar {
        min-height: 64px;
    }
    .nav-container {
        width: calc(100vw - 16px);
        padding: 10px 0;
    }
    .logo {
        gap: 8px;
        padding: 4px 6px;
    }
    .logo-icon-wrapper {
        width: 30px;
        height: 30px;
    }
    .main-title {
        font-size: 15px;
        letter-spacing: 0.5px;
    }
    .sub-title {
        font-size: 8px;
    }
    .nav-toggle {
        width: 40px;
        height: 40px;
    }
    .nav-links {
        max-height: calc(100vh - 84px);
    }
}

@media (max-width: 375px) {
    .main-title {
        font-size: 14px;
    }
    .sub-title {
        letter-spacing: 1px;
    }
    .nav-item {
        font-size: 14px;
        padding: 12px 8px;
    }
    .dropdown-item {
        padding: 8px 10px;
        font-size: 12px;
    }
}

@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) {
    .navbar {
        height: 72px;
    }
    .nav-container {
        width: min(100%, calc(100vw - 28px));
    }
    .nav-links {
        gap: 16px;
    }
    .nav-item {
        font-size: 14px;
    }
}

@media (min-width: 1440px) {
    .navbar {
        height: 86px;
    }
    .nav-container {
        width: min(1500px, 90vw);
    }
    .main-title {
        font-size: 22px;
    }
    .nav-item {
        font-size: 16px;
    }
    .nav-links {
        gap: 36px;
    }
}
