* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-cyan: #00f0ff;
    --neon-pink: #ff00ff;
    --neon-purple: #b829dd;
    --neon-green: #00ff88;
    --dark-bg: #0a0a0f;
    --card-bg: rgba(15, 15, 25, 0.85);
    --glass-border: rgba(0, 240, 255, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--dark-bg);
    color: #e0e0e0;
    overflow-x: hidden;
    min-height: 100vh;
    
    -webkit-user-select: none; /* Chrome, Opera, Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;      /* Internet Explorer/Edge */
    user-select: none;          /* Standard syntax */    
}

/* ===== 星空背景Canvas ===== */
#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== 动态线条背景Canvas ===== */
#line-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    padding: 10px 50px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: #b0b0c0;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.nav-links a:hover {
    color: var(--neon-cyan);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--neon-cyan);
}

.nav-links a.active::after {
    width: 100%;
}

/* ===== 通用板块样式 ===== */
.section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 120px 50px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 50px;
    text-align: center;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
    margin: 15px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 15px var(--neon-cyan);
}

/* ===== HOME 板块 ===== */
#home {
    min-height: 100vh;
    text-align: center;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 5px;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.5)); }
    50% { filter: drop-shadow(0 0 40px rgba(255, 0, 255, 0.5)); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #808090;
    margin-bottom: 30px;
    letter-spacing: 8px;
    text-transform: uppercase;
}

.hero-desc {
    font-size: 1.1rem;
    color: #a0a0b0;
    line-height: 1.8;
    margin-bottom: 40px;
}

/* ===== 打字机效果 ===== */
.typewriter-keywords {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 6px;
    margin-bottom: 15px;
    min-height: 2.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.typewriter-keyword {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 2rem;
    background: var(--neon-cyan);
    margin-left: 4px;
    animation: blinkCursor 0.8s step-end infinite;
    vertical-align: middle;
}

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

.typewriter-quotes {
    font-size: 1.1rem;
    color: #9090a0;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    min-height: 1.8rem;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.typewriter-quote-text {
    display: inline;
}

.typewriter-cursor-quote {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--neon-pink);
    margin-left: 2px;
    animation: blinkCursor 0.8s step-end infinite;
    vertical-align: text-bottom;
}

.hero-meta {
    font-size: 0.85rem;
    color: #505060;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    gap: 25px;
    justify-content: center;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    font-size: 1.3rem;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(0, 240, 255, 0.05);
}

.social-links a:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    color: var(--neon-cyan);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-15px); }
    60% { transform: translateX(-50%) translateY(-8px); }
}

/* ===== PROJECTS 板块 ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    width: 100%;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 240, 255, 0.15), 0 0 60px rgba(0, 240, 255, 0.05);
}

.project-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(255, 0, 255, 0.1));
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--neon-cyan);
    transition: all 0.3s ease;
}

.project-card:hover .project-icon {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(255, 0, 255, 0.2));
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.3);
}

.project-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.project-desc {
    font-size: 0.9rem;
    color: #808090;
    line-height: 1.6;
}

/* ===== MOVIES 板块 ===== */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    width: 100%;
}

.movie-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.movie-card:hover {
    border-color: var(--neon-pink);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 0, 255, 0.15), 0 0 60px rgba(255, 0, 255, 0.05);
}

.movie-poster {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, rgba(184, 41, 221, 0.2), rgba(0, 240, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.08);
}

.movie-poster::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 15, 0.95) 100%);
    pointer-events: none;
}

.movie-info {
    padding: 20px;
}

.movie-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.movie-year {
    font-size: 0.85rem;
    color: var(--neon-pink);
    margin-bottom: 10px;
}

.movie-summary {
    font-size: 0.85rem;
    color: #808090;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== CONTACT 板块 ===== */
.contact-wrapper {
    display: flex;
    gap: 50px;
    max-width: 1100px;
    width: 100%;
    align-items: flex-start;
}

.contact-form, .contact-info {
    flex: 1;
}

.contact-form-card, .contact-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 35px;
    backdrop-filter: blur(10px);
    height: 100%;
}

.form-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 25px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-title i {
    color: var(--neon-cyan);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: #808090;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #505060;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(255, 0, 255, 0.15));
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--neon-cyan);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(255, 0, 255, 0.25));
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

.contact-info-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 25px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info-title i {
    color: var(--neon-pink);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
    transform: translateX(5px);
}

.contact-item i {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(255, 0, 255, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item span {
    color: #c0c0d0;
    font-size: 1rem;
}

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

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    width: 90%;
    height: 90%;
    background: var(--dark-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 80px rgba(0, 240, 255, 0.1), 0 0 150px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.modal-container::before {
    content: '';
    position: absolute;
    top: -8px; left: -8px; right: -8px; bottom: -8px;
    border-radius: 22px;
    background: transparent;
    z-index: -1;
    animation: blueGlowPulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes blueGlowPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 136, 255, 0.4),
                    0 0 60px rgba(0, 136, 255, 0.3),
                    0 0 90px rgba(0, 136, 255, 0.2),
                    0 0 150px rgba(0, 136, 255, 0.1),
                    inset 0 0 30px rgba(0, 136, 255, 0.08);
    }
    50% {
        box-shadow: 0 0 50px rgba(0, 136, 255, 0.7),
                    0 0 100px rgba(0, 136, 255, 0.5),
                    0 0 150px rgba(0, 136, 255, 0.35),
                    0 0 220px rgba(0, 136, 255, 0.2),
                    0 0 300px rgba(0, 136, 255, 0.1),
                    inset 0 0 50px rgba(0, 136, 255, 0.15);
    }
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: rgba(15, 15, 25, 0.95);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.modal-title {
    font-size: 1rem;
    color: var(--neon-cyan);
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title i {
    color: var(--neon-green);
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: #b0b0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.modal-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.modal-btn.close-btn:hover {
    background: rgba(255, 50, 50, 0.2);
    border-color: #ff4444;
    color: #ff4444;
}

.modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

#iframeContainer {
    position: relative;
}

.modal-content-area {
    display: none;
    width: 100%;
    height: 100%;
}

.modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.modal-custom-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.03), rgba(255, 0, 255, 0.03));
}

.modal-custom-box {
    background: rgba(15, 15, 25, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 50px 60px;
    text-align: center;
    max-width: 500px;
}

.modal-custom-box i {
    font-size: 3rem;
    color: var(--neon-cyan);
    margin-bottom: 20px;
    display: block;
}

.modal-custom-box h3 {
    font-size: 1.5rem;
    color: #e0e0e0;
    margin-bottom: 15px;
}

.modal-custom-box p {
    font-size: 1.1rem;
    color: #a0a0b0;
    line-height: 1.8;
}

/* ===== 页脚 ===== */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--glass-border);
    color: #505060;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .movies-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar { padding: 15px 20px; }
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 0.8rem; }
    .hero-title { font-size: 3rem; }
    .section { padding: 100px 20px 60px; }
    .projects-grid { grid-template-columns: 1fr; }
    .movies-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 2rem; }
    .contact-wrapper { flex-direction: column; gap: 30px; }
}

/* 粒子连线Canvas */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* 加载动画 */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 240, 255, 0.1);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}