/* ========================================
   Starlumina - 星芒主题完整样式表
   Theme: Starlumina Cosmic Design System
   Version: 1.0.0
   Author: StarLumina Studio
   License: MIT
   ======================================== */

/* ========== 1. 核心变量与基础设置 ========== */
:root {
    /* 星芒主题色板 */
    --cosmic-purple: #667eea;
    --cosmic-indigo: #764ba2;
    --stardust-pink: #f093fb;
    --stardust-orange: #fda085;
    --galaxy-blue: #4facfe;
    --nebula-green: #43e97b;
    --star-yellow: #f6d365;
    
    /* 渐变系统 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --stardust-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --galaxy-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --cosmic-gradient: linear-gradient(135deg, #a78bfa 0%, #c084fc 100%);
    
    /* 玻璃态材质 */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glass-blur: blur(20px);
    
    /* 光影效果 */
    --glow-primary: 0 0 30px rgba(102, 126, 234, 0.5);
    --glow-stardust: 0 0 40px rgba(240, 147, 251, 0.4);
    --glow-galaxy: 0 0 35px rgba(79, 172, 254, 0.4);
    
    /* 动画曲线 */
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* 安全区域 */
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

/* ========== 2. 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* 优化滚动性能 */
    -webkit-overflow-scrolling: touch;
}

body.stardust-theme {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #e2e8f0 !important;
    background: #0f172a !important;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    text-size-adjust: 100%; /* 防止移动端自动调整字体大小 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 3. 宇宙背景系统 ========== */
.universe-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
}

#stars-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: nebulaFloat 20s ease-in-out infinite;
}

.nebula-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--cosmic-purple) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

.nebula-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--galaxy-blue) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: -10s;
}

@keyframes nebulaFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 30px) scale(1.1); }
}

.meteor-shower {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ========== 4. 星芒 Logo - 核心视觉符号 ========== */
.stardust-logo {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    z-index: 1001;
    cursor: pointer;
    perspective: 1000px;
}

.star-core {
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
    animation: starPulse 3s ease-in-out infinite;
}

.star-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 50%;
    animation: ringRotate 10s linear infinite;
}

.ring-1 { transform: rotateX(70deg); }
.ring-2 { transform: rotateY(70deg); animation-direction: reverse; }
.ring-3 { transform: rotateX(70deg) rotateY(45deg); }

.orbit {
    position: absolute;
    inset: 0;
    border: 1px dashed rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: orbitRotate 15s linear infinite;
}

.orbit-1 { transform: scale(1.3); }
.orbit-2 { transform: scale(1.6); animation-direction: reverse; }

.planet {
    position: absolute;
    background: var(--galaxy-gradient);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.5);
}

.planet-small {
    width: 8px;
    height: 8px;
    top: -4px;
    left: 50%;
}

.planet-medium {
    width: 12px;
    height: 12px;
    bottom: -6px;
    right: 50%;
}

@keyframes starPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 60px rgba(102, 126, 234, 0.8);
    }
}

@keyframes ringRotate {
    from { transform: rotateX(70deg) rotateZ(0deg); }
    to { transform: rotateX(70deg) rotateZ(360deg); }
}

@keyframes orbitRotate {
    from { transform: rotateZ(0deg); }
    to { transform: rotateZ(360deg); }
}

/* ========== 5. 玻璃态效果 ========== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}

/* ========== 6. 导航栏 - 星际飞船驾驶舱 ========== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s var(--ease-smooth);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-symbol {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.logo-symbol::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.logo-symbol:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.logo-symbol i {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.nav-logo h3 {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.3;
}

.nav-logo .main-title {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.nav-logo .subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #a5b4fc 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-radius: 12px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s var(--ease-bounce);
}

.nav-link:hover::before {
    opacity: 1;
    transform: scale(1);
}

.nav-link i {
    font-size: 1.1rem;
    transition: all 0.3s var(--ease-bounce);
}

.nav-link:hover i {
    transform: translateY(-3px) scale(1.2);
}

.nav-link.active-link {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    color: #c084fc;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    background: transparent;
    border: none;
    gap: 6px;
}

.bar {
    width: 24px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
    transition: all 0.3s var(--ease-bounce);
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ========== 7. 英雄区域 - 宇宙中心 ========== */
.cosmic-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 30px;
    color: #c084fc;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
    animation: fadeInDown 0.8s var(--ease-smooth) forwards;
    opacity: 0;
    transform: translateY(-20px);
}

.hero-badge i {
    animation: meteorGlow 2s ease-in-out infinite;
}

@keyframes meteorGlow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(240, 147, 251, 0.5)); }
    50% { filter: drop-shadow(0 0 15px rgba(240, 147, 251, 1)); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: slideInLeft 0.8s var(--ease-smooth) 0.2s forwards;
    opacity: 0;
    transform: translateX(-30px);
}

.stardust-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.5));
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #a0aec0;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.4s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.typing-text {
    display: inline-block;
    min-width: 200px;
}

.cursor {
    display: inline-block;
    color: var(--cosmic-purple);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 35px;
    color: #cbd5e0;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.6s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.8s forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* 基础按钮样式 */
.btn {
    position: relative;
    padding: 16px 36px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
    letter-spacing: 0.5px;
    min-width: 180px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn i {
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn:hover i {
    transform: translateX(4px) scale(1.1);
}

/* 主要按钮 - 查看项目 */
.galaxy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.4),
        0 0 0 0 rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 
            0 10px 30px rgba(102, 126, 234, 0.4),
            0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 
            0 10px 30px rgba(102, 126, 234, 0.6),
            0 0 0 8px rgba(102, 126, 234, 0);
    }
}

.galaxy-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #667eea);
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.galaxy-btn:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.6),
        0 0 0 8px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.galaxy-btn:hover::after {
    opacity: 1;
}

.galaxy-btn:active {
    transform: translateY(-2px) scale(1.01);
}

/* 次要按钮 - 联系我 */
.quantum-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(167, 139, 250, 0.5);
    color: #e2e8f0;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.quantum-btn::before {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(118, 75, 162, 0.2));
}

.quantum-btn:hover {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.9);
    color: white;
    transform: translateY(-5px) scale(1.03);
    box-shadow: 
        0 15px 40px rgba(167, 139, 250, 0.4),
        0 0 0 8px rgba(167, 139, 250, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.quantum-btn:active {
    transform: translateY(-2px) scale(1.01);
}

/* 按钮光效动画 */
@keyframes buttonGlow {
    0%, 100% {
        box-shadow: 
            0 10px 30px rgba(102, 126, 234, 0.4),
            0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 
            0 10px 30px rgba(102, 126, 234, 0.6),
            0 0 0 10px rgba(102, 126, 234, 0);
    }
}

.orbit-decoration {
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    pointer-events: none;
}

.orbit-ring {
    position: absolute;
    border: 1px dashed rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    animation: orbitRotate 20s linear infinite;
}

.orbit-ring:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orbit-ring:nth-child(2) {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    animation-direction: reverse;
}

.orbit-ring:nth-child(3) {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(30deg);
}

.avatar-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: zoomIn 0.8s var(--ease-smooth) 0.4s forwards;
    opacity: 0;
    transform: scale(0.8);
}

@keyframes zoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.avatar-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.avatar-ring {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 50%;
    animation: ringRotate 15s linear infinite;
}

.avatar {
    width: 240px;
    height: 240px;
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: white;
    border: 5px solid rgba(102, 126, 234, 0.5);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 40px rgba(102, 126, 234, 0.2);
    animation: float 4s var(--ease-bounce) infinite;
    position: relative;
    z-index: 1;
}

.floating-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.star-1, .star-2, .star-3, .star-4 {
    position: absolute;
    color: var(--stardust-pink);
    font-size: 1.2rem;
    animation: starFloat 3s ease-in-out infinite;
}

.star-1 { top: 10%; left: 10%; animation-delay: 0s; }
.star-2 { top: 20%; right: 10%; animation-delay: 0.5s; }
.star-3 { bottom: 20%; left: 20%; animation-delay: 1s; }
.star-4 { bottom: 10%; right: 20%; animation-delay: 1.5s; }

@keyframes starFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-15px) scale(1.2); opacity: 1; }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #a0aec0;
    font-size: 0.85rem;
    animation: bounce 2s var(--ease-bounce) infinite;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-gradient);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(10px); opacity: 0; }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ========== 8. 通用区块样式 ========== */
.cosmic-section {
    padding: 100px 0;
    position: relative;
}

.cosmic-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cosmic-purple), transparent);
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #e2e8f0;
}

.stardust-title i {
    color: var(--cosmic-purple);
    font-size: 2.5rem;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.title-glow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: var(--primary-gradient);
    border-radius: 3px;
    box-shadow: var(--glow-primary);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleX(0.8); }
    50% { opacity: 1; transform: translateX(-50%) scaleX(1.2); }
}

/* ========== 9. 关于我部分 - 星际档案 ========== */
.about-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.about-card {
    padding: 50px;
    position: relative;
    overflow: hidden;
    visibility: visible !important;
    opacity: 1 !important;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
}

.planet-icon {
    width: 80px;
    height: 80px;
    background: var(--galaxy-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.4);
    animation: planetRotate 10s linear infinite;
}

@keyframes planetRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.card-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 24px;
    color: #cbd5e0;
}

/* ========== 10. 技能专长系统 - 现代精致玻璃态卡片 ========== */
.skills-galaxy {
    margin-top: 50px;
}

.skills-galaxy h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 50px;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
}

.skills-galaxy h3 i {
    color: #f472b6;
    animation: starPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(244, 114, 182, 0.5));
}

@keyframes starPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }
}

.skill-orbits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.skill-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--cosmic-purple), transparent);
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: radial-gradient(circle at 50% 0%, rgba(102, 126, 234, 0.15), transparent 60%);
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.skill-card:hover::after {
    opacity: 1;
}

.skill-card:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.2),
        0 0 40px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-10px);
}

.skill-card-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    box-shadow: 
        0 10px 40px rgba(102, 126, 234, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 10;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-glow-ring {
    position: absolute;
    inset: -10px;
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 50%;
    animation: iconGlowPulse 3s ease-in-out infinite;
}

@keyframes iconGlowPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.6;
        border-color: rgba(102, 126, 234, 0.4);
    }
    50% { 
        transform: scale(1.15);
        opacity: 0.3;
        border-color: rgba(102, 126, 234, 0.6);
    }
}

.skill-card:hover .skill-card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 15px 50px rgba(102, 126, 234, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
}

.skill-card-icon i {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.skill-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e2e8f0;
    text-align: center;
    margin: 0;
    letter-spacing: 0.5px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.skill-tag {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: gentleFloat 4s ease-in-out infinite;
    animation-delay: calc(var(--delay, 0) * 0.3s);
}

.skill-tag:nth-child(1) { --delay: 0; }
.skill-tag:nth-child(2) { --delay: 1; }
.skill-tag:nth-child(3) { --delay: 2; }

@keyframes gentleFloat {
    0%, 100% { 
        transform: translateY(0);
        box-shadow: 
            0 4px 20px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% { 
        transform: translateY(-5px);
        box-shadow: 
            0 10px 30px rgba(102, 126, 234, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.skill-tag i {
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(96, 165, 250, 0.3));
}

.skill-tag:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 
        0 12px 35px rgba(102, 126, 234, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.18) 0%, rgba(118, 75, 162, 0.12) 100%);
    border-color: rgba(102, 126, 234, 0.4);
}

.skill-tag:hover i {
    transform: scale(1.15);
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 12px rgba(129, 140, 248, 0.5));
}

.skill-tag[data-tooltip] {
    position: relative;
}

.skill-tag[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.95);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 100;
    letter-spacing: 0.5px;
}

.skill-tag:hover[data-tooltip]::after {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
}



/* ========== 11. 项目展示 - 星系计划 ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    perspective: 1000px;
}

.project-card {
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-smooth);
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    /* 确保卡片本身不阻止内部元素的点击 */
    pointer-events: auto;
    /* 使用 Flexbox 实现垂直对齐 */
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(102, 126, 234, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    /* 光晕效果不阻止点击 */
    pointer-events: none;
}

.project-card:hover .card-glow {
    opacity: 1;
}

.project-icon {
    width: 90px;
    height: 90px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.4s var(--ease-bounce);
    position: relative;
}

.icon-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    /* 光晕效果不阻止点击 */
    pointer-events: none;
}

.project-card:hover .icon-glow {
    opacity: 1;
}

.project-card:hover .project-icon {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.project-card h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    color: #e2e8f0;
    font-weight: 700;
}

.project-card p {
    color: #a0aec0;
    line-height: 1.8;
    margin-bottom: 24px;
    /* 让描述占据剩余空间，将按钮推到底部 */
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--galaxy-blue);
    text-decoration: none;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 25px;
    background: rgba(79, 172, 254, 0.1);
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
}

.project-link i {
    transition: transform 0.3s var(--ease-bounce);
}

.project-link .arrow {
    transition: transform 0.3s var(--ease-smooth);
}

.project-link:hover {
    background: rgba(79, 172, 254, 0.2);
    transform: translateX(8px);
}

.project-link:hover .arrow {
    transform: translateX(4px);
}

.project-link:hover i:not(.arrow) {
    transform: scale(1.2);
}

/* ========== 12. 联系我部分 - 星际通讯 ========== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
}

.contact-card {
    padding: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s var(--ease-smooth);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(10px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--galaxy-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
    position: relative;
    flex-shrink: 0;
}

.icon-pulse {
    position: absolute;
    inset: -5px;
    border: 2px solid rgba(79, 172, 254, 0.5);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0;
    }
}

.contact-details h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: #e2e8f0;
    font-weight: 700;
}

.contact-details span {
    color: #a0aec0;
    font-size: 0.95rem;
}

.gravity-wave {
    position: absolute;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    animation: waveExpand 3s ease-out infinite;
}

.wave-1 {
    width: 200px;
    height: 200px;
    top: -100px;
    right: -100px;
}

.wave-2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    left: -150px;
    animation-delay: -1.5s;
}

@keyframes waveExpand {
    0% { 
        transform: scale(0.8);
        opacity: 0.5;
    }
    100% { 
        transform: scale(1.2);
        opacity: 0;
    }
}

.contact-form-wrapper {
    width: 100%;
}

.form {
    padding: 40px;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header i {
    font-size: 3rem;
    color: var(--galaxy-blue);
    margin-bottom: 15px;
    display: block;
}

.form-header h3 {
    font-size: 1.6rem;
    color: #e2e8f0;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--galaxy-blue);
}

/* 验证成功状态 */
.form-group input.valid,
.form-group textarea.valid {
    border-bottom-color: #48bb78;
}

/* 验证失败状态 */
.form-group input.invalid,
.form-group textarea.invalid {
    border-bottom-color: #f56565;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: #a0aec0;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -20px;
    font-size: 0.85rem;
    color: var(--galaxy-blue);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--galaxy-gradient);
    transition: width 0.4s ease;
}

.form-group input:focus ~ .input-border,
.form-group textarea:focus ~ .input-border {
    width: 100%;
}

/* 错误消息样式 */
.error-message {
    position: absolute;
    bottom: -24px;
    left: 0;
    color: #f56565;
    font-size: 0.85rem;
    font-weight: 500;
    animation: shakeError 0.4s ease forwards;
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-message::before {
    content: '⚠️';
    font-size: 0.9rem;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); opacity: 0; }
    10% { transform: translateX(-5px); opacity: 1; }
    30% { transform: translateX(5px); }
    50% { transform: translateX(-5px); }
    70% { transform: translateX(5px); }
}

/* 通知动画 */
@keyframes slideInRight {
    from {
        transform: translateX(400px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(400px) scale(0.9);
        opacity: 0;
    }
}

/* 提交按钮禁用状态 */
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s var(--ease-bounce);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

.submit-btn:hover .btn-glow {
    opacity: 1;
}

.submit-btn:active {
    transform: translateY(-2px);
}

/* ========== 13. 页脚 - 星际边界 ========== */
.cosmic-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 0 30px;
    position: relative;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    margin-bottom: 30px;
}

.footer-logo i {
    font-size: 2rem;
    color: var(--cosmic-purple);
    margin-bottom: 15px;
    display: block;
    animation: starPulse 3s ease-in-out infinite;
}

.footer-logo p {
    color: #cbd5e0;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-link {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e0;
    font-size: 1.2rem;
    transition: all 0.3s var(--ease-bounce);
}

.footer-link:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.beian-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.beian-info a {
    color: #cbd5e0;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.beian-info a:hover {
    color: var(--cosmic-purple);
}

.beian-info img {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.footer-decoration {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-star {
    width: 8px;
    height: 8px;
    background: var(--cosmic-purple);
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
}

.footer-star:nth-child(1) { animation-delay: 0s; }
.footer-star:nth-child(2) { animation-delay: 0.5s; }
.footer-star:nth-child(3) { animation-delay: 1s; }

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.3);
    }
}

/* ========== 14. 响应式设计 ========== */
@media screen and (max-width: 1024px) {
    .skill-orbits {
        grid-template-columns: 1fr;
    }
    
    .hero-container {
        gap: 40px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s var(--ease-bounce);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        padding: 30px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 15px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-orbits {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-card,
    .form {
        padding: 30px 20px;
    }
    
    /* 移动端表单优化 */
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* 防止 iOS 自动缩放 */
    }
    
    .error-message {
        font-size: 0.8rem;
        bottom: -22px;
    }
    
    .form-notification {
        right: 15px !important;
        left: 15px !important;
        max-width: none !important;
    }
    
    /* 移动端按钮优化 */
    .btn {
        padding: 14px 28px;
        font-size: 0.95rem;
        min-width: 160px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
}
