/* ===================================
   科技风格导航栏样式
   作者: AI Assistant
   日期: 2025-12-14
   =================================== */

.tech-header-bar {
    background: linear-gradient(120deg, #0c0c1e 0%, #1a1a3a 50%, #0f0c29 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(64, 120, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5),
                inset 0 0 10px rgba(100, 150, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    padding: 0 24px;
    gap: 20px;
}

/* === Logo === */
.logo-box {
    flex-shrink: 0;
}

.logo-box a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-box img {
    height: 52px;
    transition: transform 0.3s ease;
}

.logo-box img:hover {
    transform: scale(1.03);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(90deg, #4fc3f7, #bb86fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
}

/* === 导航菜单 === */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 16px;
    justify-content: flex-start;
    flex: 1;
}

.nav-menu a {
    color: #a0b0d0;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: block;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #4fc3f7, #bb86fc);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ffffff;
    background: rgba(40, 50, 90, 0.4);
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.3);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 80%;
}

/* === 用户操作区 === */
.user-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.user-welcome {
    color: #4fc3f7;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* === 按钮样式 === */
.tech-btn {
    display: inline-block;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
}

.tech-btn-primary {
    background: linear-gradient(135deg, #2196f3, #6a1b9a);
    color: white;
}

.tech-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    color: white;
}

.tech-btn-outline {
    background: transparent;
    color: #a0b0d0;
    border: 1px solid rgba(100, 130, 200, 0.4);
}

.tech-btn-outline:hover {
    color: #e0e0ff;
    border-color: #4fc3f7;
    background: rgba(79, 195, 247, 0.08);
}

/* === 用户下拉菜单 === */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    color: #4fc3f7;
    font-weight: 600;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(40, 50, 90, 0.3);
    border: 1px solid rgba(100, 130, 200, 0.3);
    transition: all 0.2s ease;
    text-decoration: none;
}

.user-dropdown-toggle:hover {
    background: rgba(40, 50, 90, 0.5);
    border-color: #4fc3f7;
}

.user-dropdown-toggle .badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
}

.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0;
    padding-top: 8px;
    background: rgba(20, 25, 45, 0.98);
    border: 1px solid rgba(80, 120, 200, 0.4);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(79, 195, 247, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-out;
    z-index: 1001;
    pointer-events: none;
}

/* 添加一个不可见的桥接区域 */
.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
}

.user-dropdown:hover .user-dropdown-menu,
.user-dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-dropdown-menu a,
.user-dropdown-menu button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    color: #b0c0e0;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
    background: rgba(79, 195, 247, 0.15);
    color: #4fc3f7;
}

.user-dropdown-menu .divider {
    height: 1px;
    background: rgba(80, 120, 200, 0.2);
    margin: 6px 0;
}

.user-dropdown-menu .text-danger {
    color: #f44336 !important;
}

.user-dropdown-menu .text-danger:hover {
    background: rgba(244, 67, 54, 0.15);
    color: #ff5252 !important;
}

/* === 搜索框 === */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box input {
    background: rgba(20, 30, 50, 0.5);
    border: 1px solid rgba(80, 120, 200, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    color: #e0e6ff;
    font-size: 14px;
    width: 150px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #4fc3f7;
    box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.2);
    background: rgba(20, 30, 50, 0.8);
}

.search-box input::placeholder {
    color: #7a8ab0;
}

.search-box button {
    background: rgba(40, 50, 90, 0.5);
    border: 1px solid rgba(80, 120, 200, 0.3);
    color: #a0b0d0;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-box button:hover {
    background: rgba(79, 195, 247, 0.15);
    border-color: #4fc3f7;
    color: #4fc3f7;
}

/* === 响应式优化 === */
@media (max-width: 880px) {
    .header-inner {
        padding: 0 16px;
        display: flex;
        justify-content: space-between;
    }
    
    .nav-menu {
        display: none;
    }
    
    .user-welcome {
        display: none;
    }
    
    .search-box {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-inner {
        height: 60px;
    }
    
    .logo-box img {
        height: 40px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .tech-btn {
        padding: 5px 12px;
        font-size: 13px;
    }
}
