:root {
    --bg-color: #03050a;
    --primary: #0cf;
    --secondary: #f0f;
    --accent: #7b2cbf;
    --text-main: #f0f3f8;
    --text-muted: #8892b0;
    --glass-bg: rgba(10, 15, 25, 0.4);
    --glass-border: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, .cyber-btn, .placeholder-viz, .tag {
    font-family: 'Orbitron', 'Noto Sans SC', sans-serif;
}

/* 渐变流光背景 */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 15% 50%, rgba(0, 204, 255, 0.08), transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(123, 44, 191, 0.1), transparent 50%);
    z-index: -1;
    pointer-events: none;
    animation: breathing 8s ease-in-out infinite alternate;
}

@keyframes breathing {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

/* 全局扫描线效果 */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 2px, 3px 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.3;
}

/* 导航栏 */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 4rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.glass-nav h1 {
    font-size: 1.6rem;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.4);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    transition: 0.3s;
    letter-spacing: 1px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
}

.hero-content h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #fff, var(--primary), var(--accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 按钮 */
.cyber-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 1.1rem;
    border: 1px solid var(--primary);
    background: rgba(0, 204, 255, 0.05);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 204, 255, 0.2), transparent);
    transition: all 0.4s ease;
}

.cyber-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary), 0 0 30px var(--primary);
}

.cyber-btn:hover::before {
    left: 100%;
}

.glitch {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* 滚动揭露状态 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Projects Section */
.projects-section {
    padding: 6rem 4rem 4rem 4rem;
    min-height: 100vh;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* 卡片 */
.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s, border-color 0.4s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 204, 255, 0.15), 0 0 15px rgba(0, 204, 255, 0.1);
    border-color: var(--primary);
}

.media-container {
    width: 100%;
    height: 220px;
    background: #000;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}

.media-container video, 
.media-container img,
.project-media {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 改为 contain，确保头发和下巴都能完整显示 */
    background: rgba(0, 0, 0, 0.5); /* 增加一点深色背景，让 contain 模式下的空白处不突兀 */
    opacity: 0.7;
    transition: opacity 0.5s, transform 0.5s;
    display: block;
}

.project-card:hover .media-container video,
.project-card:hover .media-container img,
.project-card:hover .project-media {
    opacity: 1;
    transform: scale(1.05); /* 恢复稍微大一点的缩放感，让页面更灵动 */
}

.placeholder-viz {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 1.2rem;
    letter-spacing: 2px;
    background: repeating-linear-gradient(45deg, #050510, #050510 10px, #0a0a1a 10px, #0a0a1a 20px);
    opacity: 0.7;
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(123, 44, 191, 0.15);
    color: #e0b0ff;
    border-radius: 4px;
    border: 1px solid rgba(123, 44, 191, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-content h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
    flex-grow: 1;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.action-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    transition: 0.3s;
    position: relative;
}

.action-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s;
}

.action-link:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--primary);
}

.action-link:hover::before {
    width: 100%;
}

.glass-footer {
    text-align: center;
    padding: 2.5rem;
    background: rgba(5, 5, 10, 0.8);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .glass-nav {
        padding: 1rem 2rem;
        flex-direction: column;
        gap: 1rem;
    }
    .hero-content h2 {
        font-size: 2.5rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .projects-section {
        padding: 4rem 2rem;
    }
}

/* 启动加载动画 */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #03050a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 1s, visibility 1s;
}

.loader-content {
    text-align: center;
}

.loader-text {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    font-size: 1.2rem;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(0, 204, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    animation: loading 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary);
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
