/* 全局样式 */
:root {
    --primary-color: #00f0ff;
    --secondary-color: #7928ca;
    --background-color: #0a0a12;
    --card-background: rgba(20, 20, 30, 0.8);
    --text-color: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: rgba(0, 240, 255, 0.3);
    --glow-color: rgba(0, 240, 255, 0.5);
    --section-padding: 100px 0;
    --container-width: 1200px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 240, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(121, 40, 202, 0.1) 0%, transparent 50%);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 10, 18, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
}

.logo-subtext {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

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

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

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

/* 英雄区域 */
.hero {
    padding: 200px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero .highlight {
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--glow-color);
}

.hero p {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.hero .subtitle {
    font-size: 16px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.btn.primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.7);
}

.btn.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
}

.bg-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    animation: pulse 6s ease-in-out infinite;
}

.bg-element:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.bg-element:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 30%;
    animation-delay: 2s;
}

.bg-element:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 70%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
    100% {
        transform: scale(1);
        opacity: 0.1;
    }
}

/* 通用部分样式 */
.section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

/* 关于我 */
.about {
    padding: var(--section-padding);
    background-color: rgba(20, 20, 30, 0.5);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.2);
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
    margin-bottom: 10px;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 技能展示 */
.skills {
    padding: var(--section-padding);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    padding: 40px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

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

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.2);
    border-color: var(--primary-color);
}

.skill-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: var(--background-color);
    font-size: 24px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.skill-card h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 项目展示 */
.projects {
    padding: var(--section-padding);
    background-color: rgba(20, 20, 30, 0.5);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.2);
    border-color: var(--primary-color);
}

.project-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.3;
    transition: var(--transition);
}

.project-card:hover .image-placeholder {
    opacity: 0.5;
    transform: scale(1.1);
}

.project-card h3 {
    font-size: 20px;
    font-weight: bold;
    margin: 20px;
    color: var(--primary-color);
}

.project-card p {
    margin: 0 20px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.project-link {
    display: inline-block;
    margin: 0 20px 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.project-link:hover {
    text-shadow: 0 0 10px var(--glow-color);
}

.project-link:hover::after {
    width: 100%;
}

/* 联系方式 */
.contact {
    padding: var(--section-padding);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.2);
    border-color: var(--primary-color);
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: var(--background-color);
    font-size: 20px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 14px;
    transition: var(--transition);
}

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

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

/* 页脚 */
.footer {
    background-color: rgba(10, 10, 18, 0.9);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links li {
        margin: 0 10px;
    }

    .hero {
        padding: 150px 0 80px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-bg {
        display: none;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .section-title {
        font-size: 28px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .skill-card,
    .project-card {
        padding: 30px 20px;
    }

    .stat-number {
        font-size: 36px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}