/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: linear-gradient(to bottom, #0a0a1a, #1a1a3a);
    color: #fff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 优化后的星星背景效果 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image: 
        radial-gradient(1px 1px at 25% 25%, white 50%, transparent 100%),
        radial-gradient(1px 1px at 75% 75%, white 50%, transparent 100%),
        radial-gradient(2px 2px at 50% 50%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
    background-size: 150px 150px, 200px 200px, 100px 100px;
    will-change: transform;
}

@media (max-width: 768px) {
    .stars {
        background-size: 100px 100px, 150px 150px, 75px 75px;
    }
}

/* 导航栏样式 - 优化毛玻璃效果 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(10, 10, 26, 0.8);
    position: relative;
    z-index: 100;
}

@supports (backdrop-filter: blur(10px)) {
    .navbar {
        background: rgba(10, 10, 26, 0.3);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.logo {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.logo a {
    color: #fff;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: clamp(1rem, 2vw, 2rem);
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem clamp(0.5rem, 1.5vw, 1rem);
    transition: color 0.3s;
    font-size: clamp(0.875rem, 2vw, 1rem);
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #8a7aff;
}

/* 汉堡菜单按钮 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(85%, 300px);
        height: 100vh;
        background: rgba(10, 10, 26, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: clamp(1.5rem, 4vh, 2rem);
        transition: right 0.3s ease-in-out;
        z-index: 100;
        padding: 2rem 1rem;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
        width: 100%;
        text-align: center;
        border-radius: 0.5rem;
        background: rgba(255, 255, 255, 0.05);
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(138, 122, 255, 0.15);
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .nav-menu {
        width: 100%;
    }
}

/* 主要内容区样式 */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70vh;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #8a7aff, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateZ(0);
}

.subtitle {
    max-width: 600px;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #ccc;
    font-size: clamp(1rem, 3vw, 1.1rem);
}

/* 按钮样式 - 优化效果 */
.buttons {
    display: flex;
    gap: 1rem;
}

@media (max-width: 480px) {
    .buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateZ(0);
}

.btn:hover {
    transform: translateY(-2px);
}

.primary {
    background: rgba(138, 122, 255, 0.8);
}

.secondary {
    background: rgba(255, 255, 255, 0.1);
}

@supports (backdrop-filter: blur(5px)) {
    .primary, .secondary {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
}

/* 滚动提示样式 - 简化动画 */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #ccc;
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .scroll-hint {
        display: none;
    }
}

/* 性能优化 */
@media (prefers-reduced-motion: reduce) {
    .stars, .title, .btn {
        animation: none;
        transition: none;
    }
}

/* 添加内容延迟加载 */
.lazy-load {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lazy-load.visible {
    opacity: 1;
    transform: translateY(0);
} 