/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS变量定义 */
:root {
    --primary-color: #00ffff;
    --secondary-color: #ff00ff;
    --accent-color: #ffff00;
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text-light: #ffffff;
    --text-dim: #a0a0a0;
    --gradient-1: linear-gradient(45deg, #00ffff, #ff00ff);
    --gradient-2: linear-gradient(135deg, #ff00ff, #ffff00);
    --neon-glow: 0 0 20px rgba(0, 255, 255, 0.8);
}

/* 基础样式 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
}

/* 星空背景 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
}

.stars::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent);
    background-size: 200% 200%;
    animation: stars 120s linear infinite;
}

@keyframes stars {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

/* 网格覆盖层 */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* 导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    z-index: 1000;
    padding: 1rem 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::before {
    width: 80%;
}

.nav-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 英雄区域 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.glitch {
    font-family: 'Orbitron', monospace;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    color: var(--text-light);
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--primary-color);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--secondary-color);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(-2px, 1px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(1px, -1px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    40% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(30% 0 40% 0); transform: translate(1px, -2px); }
    80% { clip-path: inset(5% 0 80% 0); transform: translate(-1px, 1px); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--neon-glow);
}

.stat-number {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-matrix {
    width: 300px;
    height: 300px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    animation: rotate 20s linear infinite;
}

.code-matrix::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 255, 255, 0.1),
        transparent,
        rgba(255, 0, 255, 0.1),
        transparent
    );
    animation: matrix-scan 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes matrix-scan {
    0% { transform: translateX(-100%) translateY(-100%); }
    100% { transform: translateX(100%) translateY(100%); }
}

/* 通用区块样式 */
.section {
    padding: 5rem 0;
    position: relative;
}

.section:nth-child(even) {
    background: rgba(0, 255, 255, 0.05);
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 关于我区块 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

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

.about-text p {
    margin-bottom: 1.5rem;
}

.about-interests h3 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.interest-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.interest-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--neon-glow);
}

.interest-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* 项目区块 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.project-card p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.project-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--gradient-1);
    color: var(--bg-dark);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}

.project-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid rgba(255, 165, 0, 0.5);
    border-radius: 15px;
    color: orange;
    font-size: 0.9rem;
}

/* 技能区块 */
.skills-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.skill-category h3 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: grid;
    grid-template-columns: 120px 1fr 80px;
    align-items: center;
    gap: 1rem;
}

.skill-name {
    font-weight: 600;
    color: var(--text-light);
}

.skill-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 5px;
    width: 0;
    transition: width 2s ease;
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: skill-shine 2s linear infinite;
}

@keyframes skill-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skill-level {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-align: right;
}

/* 团队区块 */
.team-content {
    text-align: center;
}

.team-content p {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.team-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-item {
    padding: 2rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--neon-glow);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-item h3 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-item p {
    color: var(--text-dim);
    font-size: 1rem;
}

/* 联系区块 */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: var(--neon-glow);
}

.contact-icon {
    font-size: 2rem;
    min-width: 60px;
    text-align: center;
}

.contact-details h3 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-details p {
    color: var(--text-dim);
}

.contact-form {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
}

.contact-form h3 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-1);
    color: var(--bg-dark);
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}

/* 页脚 */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid rgba(0, 255, 255, 0.3);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: var(--text-dim);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-visual {
        margin-top: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .skills-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .team-services {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .glitch {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .interests-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}