/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 深色炫酷配色 */
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --primary: #4f8cff;
    --primary-glow: #6ba3ff;
    --secondary: #8b5cf6;
    --accent: #00d4ff;
    --text: #e8ecf1;
    --text-muted: #9aa4b2;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========== 动态背景动画 ========== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, 
        var(--bg-darker) 0%, 
        #1a1a2e 25%, 
        #16213e 50%, 
        #0f3460 75%, 
        var(--bg-dark) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 添加一些动态光点效果 */
.background-animation::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(79, 140, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* ========== 主容器 ========== */
.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* ========== 头像 ========== */
.avatar-wrapper {
    margin-bottom: 2rem;
    position: relative;
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    box-shadow: 
        0 0 30px rgba(79, 140, 255, 0.5),
        0 0 60px rgba(79, 140, 255, 0.3),
        inset 0 0 20px rgba(79, 140, 255, 0.1);
    animation: float 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 
        0 0 40px rgba(79, 140, 255, 0.8),
        0 0 80px rgba(79, 140, 255, 0.5);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ========== 名字打字机效果 ========== */
.name-typed {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    min-height: 4rem;
}

.cursor {
    display: inline-block;
    width: 3px;
    background: var(--primary);
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ========== 简介卡片 - 毛玻璃效果 ========== */
.intro-card {
    max-width: 600px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 40px rgba(79, 140, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.highlight {
    color: var(--primary-glow);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(79, 140, 255, 0.5);
}

/* ========== 按钮组 ========== */
.button-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: white;
    box-shadow: 0 4px 15px rgba(79, 140, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 140, 255, 0.6);
}

.btn-primary::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, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px rgba(79, 140, 255, 0.2);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 140, 255, 0.5);
}

.btn span {
    position: relative;
    z-index: 1;
}

/* ========== 社交链接 ========== */
.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(79, 140, 255, 0.4);
}

/* ========== 淡入动画 ========== */
.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.fade-in-up-delay {
    animation: fadeInUp 1s ease-out 0.5s forwards;
    opacity: 0;
}

.fade-in-up-delay-2 {
    animation: fadeInUp 1s ease-out 1s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .name-typed {
        font-size: 2.5rem;
    }
    
    .avatar {
        width: 150px;
        height: 150px;
    }
    
    .intro-card {
        padding: 1.5rem;
        margin: 0 1rem 2rem;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .name-typed {
        font-size: 2rem;
    }
    
    .button-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
}


/* ========== 弹窗样式 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(0.8) translateY(20px);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-overlay.active .modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.modal-content h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wechat-qrcode {
    text-align: center;
}

.wechat-qrcode img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    margin: 0 auto 1rem;
    border: 2px solid var(--glass-border);
}

.wechat-tip {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* 响应式 */
@media (max-width: 480px) {
    .modal-content {
        padding: 2rem 1.5rem;
        max-width: 90%;
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
    }
    
    .wechat-qrcode img {
        max-width: 240px;
    }
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* 背景图片 */
    background-image: url('../assets/images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 动态渐变遮罩层 */
.background-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(10, 10, 15, 0.7) 0%, 
        rgba(26, 26, 46, 0.6) 25%, 
        rgba(22, 33, 62, 0.6) 50%, 
        rgba(15, 52, 96, 0.6) 75%, 
        rgba(10, 10, 15, 0.7) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* ========== 自定义光标拖尾效果 ========== */
.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    will-change: transform;
    box-shadow: 0 0 20px var(--primary-glow);
    transition: width 0.3s, height 0.3s, opacity 0.3s;
}

.cursor-dot {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    will-change: transform;
    box-shadow: 0 0 10px var(--accent);
}