html, body {
    overflow-x: hidden;
    width: 100%;
}

/* --- 顶部导航栏 --- */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center; 
    /* 【核心修复】：移除导航栏本身的背景和模糊，防止它阻断子元素的毛玻璃效果 */
    background: transparent; 
}

/* 【核心修复】：用伪元素来承载导航栏的毛玻璃效果 */
.glass-header::before {
    content: '';
    position: absolute;
    inset: 0; /* 填满整个导航栏 */
    background: rgba(255, 255, 255, 0.65); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    z-index: -1; /* 放到内容后面 */
    pointer-events: none;
    transition: background-color 0.4s ease;
}

.header-container {
    width: 100%;
    max-width: 1080px; 
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 0 40px; 
    height: 100%;
}

/* 左侧标题区 */
.nav-brand {
    flex: 1; 
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center; 
    gap: 10px;
}

.brand-icon {
    background: linear-gradient(135deg, #87CEEB, #9370DB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 24px;
}

.dynamic-title {
    background: linear-gradient(90deg, #87CEEB, #9370DB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    white-space: pre;
}

.dynamic-title::after {
    content: '|';
    color: #9370DB;
    -webkit-text-fill-color: #9370DB;
    animation: blinkCursor 0.7s infinite step-end;
    margin-left: 2px;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 中间导航区 */
.top-nav {
    display: flex;
    align-items: center; 
    justify-content: center;
    gap: 10px;
}

.top-nav .nav-item {
    text-decoration: none;
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.top-nav .nav-item:hover {
    background: rgba(0, 0, 0, 0.05); /* 改用半透明悬停色更贴合玻璃质感 */
}

.top-nav .nav-item.active {
    color: var(--active-indicator);
    background: rgba(0, 0, 0, 0.05);
}

/* 右侧操作区 */
.nav-actions {
    flex: 1;
    display: flex;
    align-items: center; 
    justify-content: flex-end; 
    gap: 10px;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-only {
    display: none;
}

.login-btn {
    text-decoration: none;
    background: var(--active-indicator);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* 用户头像下拉容器 */
.user-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.user-avatar:hover {
    transform: scale(1.08); 
    border-color: var(--active-indicator);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* PC 端下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 55px;
    right: 0;
    width: 180px;
    /* 采用苹果标准玻璃质感参数 */
    background: rgba(255, 255, 255, 0.65); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.user-dropdown-wrapper.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--active-indicator);
}

.dropdown-item.danger:hover {
    color: #ef4444;
}

/* --- 移动端下拉导航 --- */
.mobile-nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 10px 20px;
    z-index: 999;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile-nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-item {
    padding: 15px 10px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-item.active {
    color: var(--active-indicator);
}

/* --- 首页主体与动画 --- */
.hero-section {
    min-height: 100vh;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.glow-bg {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: var(--active-indicator);
    top: -100px;
    left: -100px;
}

.glow-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: 10%;
    right: -50px;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    margin-bottom: 60px;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #87CEEB 0%, #9370DB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.primary-btn {
    background: var(--active-indicator);
    color: #fff;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    padding: 0 20px;
    width: 100%;
    z-index: 1;
    margin-bottom: 50px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

.feature-card .icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--active-indicator);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.feature-card p {
    font-size: 0.95rem;
    opacity: 0.7;
    line-height: 1.5;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 深色模式深邃玻璃质感（也对应了伪元素结构） --- */
[data-theme="dark"] .glass-header::before {
    background: rgba(20, 20, 20, 0.65); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .mobile-nav-menu {
    background: rgba(30, 30, 30, 0.65); 
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .dropdown-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .top-nav .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .feature-card {
    background: rgba(40, 40, 40, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

/* --- 响应式设计 --- */
@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }

    .top-nav {
        display: none; 
    }
    
    .mobile-only {
        display: flex; 
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .glow-1, .glow-2 {
        display: none; 
    }
}