/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00f5ff;
    --secondary-color: #7b2cbf;
    --accent-color: #ff006e;
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 35, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --gradient-1: linear-gradient(135deg, #00f5ff 0%, #7b2cbf 100%);
    --gradient-2: linear-gradient(135deg, #7b2cbf 0%, #ff006e 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* 粒子背景 */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero区域 */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero-content {
    max-width: 900px;
}

/* 故障文字效果 */
.glitch-wrapper {
    position: relative;
}

.glitch {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    color: var(--text-primary);
    letter-spacing: 0.1em;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    color: var(--primary-color);
    animation: glitch-effect 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    transform: translate(-2px, -2px);
}

.glitch::after {
    color: var(--accent-color);
    animation: glitch-effect 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    transform: translate(2px, 2px);
}

@keyframes glitch-effect {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    10% { transform: skew(-1deg); }
    20% { transform: skew(0deg); }
    30% { transform: skew(1deg); }
    40% { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin: 1.5rem 0;
    font-family: 'Orbitron', monospace;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.tag {
    padding: 0.5rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(0, 245, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 245, 255, 0.2);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    padding: 0.9rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(0, 245, 255, 0.1);
    transform: translateY(-3px);
}

.github-icon {
    width: 20px;
    height: 20px;
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 25px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    animation: scroll-anim 1.5s infinite;
}

@keyframes scroll-anim {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}


/* 通用Section样式 */
.section {
    padding: 100px 5%;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.title-decorator {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* 关于我 */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 245, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 245, 255, 0.1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 技能栈 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.skill-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(123, 44, 191, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-2);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.skill-item:hover::before {
    transform: scaleX(1);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(123, 44, 191, 0.2);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.skill-item h3 {
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.skill-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tags span {
    padding: 0.3rem 0.8rem;
    background: rgba(123, 44, 191, 0.2);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* 服务 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: scale(1.02);
}

.service-number {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 700;
    color: rgba(0, 245, 255, 0.1);
    position: absolute;
    top: 10px;
    right: 20px;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.service-line {
    width: 50px;
    height: 3px;
    background: var(--gradient-1);
    margin-top: 1.5rem;
    transition: width 0.3s ease;
}

.service-card:hover .service-line {
    width: 100px;
}

/* 联系区域 */
.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-text {
    margin-bottom: 2.5rem;
}

.highlight-text {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-btn.github {
    background: #333;
    color: #fff;
}

.contact-btn.github:hover {
    background: #555;
    transform: translateY(-3px);
}

.contact-btn.wechat {
    background: #07c160;
    color: #fff;
}

.contact-btn.wechat:hover {
    background: #06ad56;
    transform: translateY(-3px);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
    border: 1px solid var(--primary-color);
    max-width: 400px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--accent-color);
}

.modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.wechat-qrcode {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 245, 255, 0.2);
}

.wechat-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.wechat-id {
    color: var(--primary-color);
    user-select: all;
    cursor: pointer;
}

.modal-tip {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 页脚 */
.footer {
    background: rgba(5, 5, 10, 0.95);
    padding: 3rem 5%;
    border-top: 1px solid rgba(0, 245, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-top p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 2rem 0;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.beian {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.beian a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.3s;
}

.beian a:hover {
    color: var(--primary-color);
}

.beian .divider {
    color: var(--text-secondary);
    margin: 0 0.5rem;
}

.police-icon {
    width: 16px;
    height: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .glitch {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .hero-tags {
        gap: 0.5rem;
    }
    
    .tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 60px 5%;
    }
    
    .beian {
        flex-direction: column;
    }
    
    .beian .divider {
        display: none;
    }
}
