/* ==================== V2布局样式 - 导航、Footer、主内容 ==================== */

/* ==================== 导航栏 ==================== */
.v2-navbar {
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    transition: var(--transition-normal);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.v2-navbar.scrolled {
    background: rgba(22, 33, 62, 0.98);
    padding: 0.5rem 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Logo品牌 */
.v2-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: white;
    transition: var(--transition-normal);
}

.v2-brand img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.v2-brand:hover {
    transform: scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--text-gray);
    letter-spacing: 1px;
}

/* 导航菜单 */
.v2-nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.v2-nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    white-space: nowrap;
}

.v2-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-light);
    transform: translateX(-50%);
    transition: var(--transition-normal);
}

.v2-nav-link:hover {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-light);
}

.v2-nav-link:hover::after {
    width: 80%;
}

.v2-nav-link.active {
    background: var(--accent-blue);
    color: white;
}

.v2-btn-login {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-light));
    color: white;
    font-weight: 600;
}

.v2-btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* 移动端切换按钮 */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: var(--transition-normal);
}

/* ==================== 主内容区 ==================== */
.v2-main-content {
    min-height: 100vh;
    padding-top: 70px; /* 导航栏高度 */
}

/* ==================== Footer ==================== */
.v2-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    position: relative;
}

/* Footer顶部金色装饰线 */
.v2-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-gold);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
}

.footer-brand img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.footer-brand h5 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-desc {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-normal);
}

.social-links a:hover {
    background: var(--accent-blue);
    transform: translateY(-3px);
}

/* 微信二维码弹窗 */
.social-links .wechat-link {
    position: relative;
}
.social-links .wechat-qr-popup {
    display: none;
    position: absolute;
    bottom: 58px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    width: 232px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.2);
    text-align: center;
    z-index: 1000;
}
.social-links .wechat-qr-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #fff;
}
.social-links .wechat-qr-popup img {
    display: block;
    border-radius: 4px;
    margin-bottom: 6px;
    width: 200px;
    height: 200px;
    object-fit: contain;
}
.social-links .wechat-qr-popup small {
    color: #666;
    font-size: 12px;
}
.social-links .wechat-link:hover .wechat-qr-popup {
    display: block;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition-normal);
}

.footer-links a:hover {
    color: var(--accent-light);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-gray);
}

.footer-contact i {
    color: var(--accent-blue);
    font-size: 1.1rem;
    margin-top: 3px;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--text-gray);
    margin: 0;
    font-size: 0.9rem;
}

/* ==================== 返回顶部按钮 - 火箭造型 ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border: 2px solid rgba(59,130,246,0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    overflow: visible;
}

/* 火箭图标旋转朝上 */
.back-to-top i {
    transform: rotate(-45deg);
}

/* 火箭尾焰 */
.back-to-top::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 0;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(180deg, #f59e0b 0%, #ef4444 50%, transparent 100%);
    transition: height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5), 0 0 15px rgba(245, 158, 11, 0.2);
}

/* 悬停时火箭喷火 */
.back-to-top:hover::after {
    height: 20px;
    opacity: 1;
    animation: rocketFlame 0.15s ease-in-out infinite alternate;
}

/* 点击发射动画 */
.back-to-top.launching {
    transform: translateY(-800px) scale(0.3);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.6, 0, 0.4, 1);
}

.back-to-top.launching::after {
    height: 35px;
    opacity: 1;
    width: 10px;
}

@keyframes rocketFlame {
    0% { height: 18px; opacity: 0.8; }
    100% { height: 24px; opacity: 1; }
}

/* ==================== 导航栏下拉菜单 ==================== */
.nav-dropdown {
    position: relative;
}

.nav-caret {
    font-size: 0.6rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 8px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    z-index: 9999;
}

/* 小三角 */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(15, 23, 42, 0.98);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown:hover .nav-caret {
    transform: rotate(180deg);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-dropdown-item i {
    font-size: 0.85rem;
    width: 20px;
    text-align: center;
    color: rgba(59,130,246,0.6);
}

.nav-dropdown-item:hover {
    background: rgba(59,130,246,0.1);
    color: #fff;
}

.nav-dropdown-item:hover i {
    color: #3b82f6;
}

/* ==================== 搜索按钮和弹框 ==================== */
.nav-search-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 1rem;
    padding: 8px 10px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}
.nav-search-btn:hover { color: #3b82f6; }

.search-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.15);
    z-index: 99998;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    backdrop-filter: blur(4px);
}
.search-overlay.active { display: flex; }

.search-modal {
    width: 90%;
    max-width: 700px;
    background: rgba(15,23,42,0.98);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
    animation: searchSlideIn 0.3s ease;
}
@keyframes searchSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 2;
}
.search-close:hover { color: #fff; }

.search-input-wrap {
    position: relative;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.search-input-icon {
    position: absolute;
    left: 36px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(59,130,246,0.6);
    font-size: 1.1rem;
}
.search-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 14px 16px 14px 44px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}
.search-input:focus { border-color: rgba(59,130,246,0.5); }
.search-input::placeholder { color: rgba(255,255,255,0.3); }

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}
.search-hint {
    padding: 30px 20px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.9rem;
}
.search-hint i { margin-right: 8px; }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    transition: background 0.2s ease;
}
.search-result-item:hover {
    background: rgba(59,130,246,0.1);
}
.search-result-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(59,130,246,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.search-result-text h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}
.search-result-text p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}
.search-no-result {
    padding: 30px 20px;
    text-align: center;
    color: rgba(255,255,255,0.4);
}
.search-no-result i { margin-right: 8px; }

/* ==================== 响应式设计 ==================== */
@media (max-width: 992px) {
    .mobile-toggle {
        display: flex;
    }
    
    .v2-nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateX(-100%);
        transition: var(--transition-normal);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .v2-nav-menu.active {
        transform: translateX(0);
    }
    
    .v2-nav-link {
        width: 100%;
        justify-content: center;
    }
    
    .v2-footer {
        padding: 3rem 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .brand-name {
        font-size: 1rem;
    }
    
    .brand-sub {
        font-size: 0.7rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}
