/* 全局样式 */
:root {
    --primary-color: #73defe;
    --secondary-color: #5e60ce;
    --dark-bg: #0a1128;
    --darker-bg: #16193b;
    --text-light: rgba(255, 255, 255, 0.85);
    --transition: all 0.3s ease;
}

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

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--dark-bg);
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: white;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(10, 17, 40, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(10, 17, 40, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(115, 222, 254, 0.3);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

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

.mobile-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* 背景Canvas */
canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

/* 主页英雄区 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content {
    width: 100%;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(115, 222, 254, 0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-light);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-links a:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-3px);
}

/* 自定义图标样式 */
.social-links .icon {
    width: 20px;  /* 图标宽度 */
    height: 20px; /* 图标高度 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(94, 96, 206, 0.4);
    margin: 0 10px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(94, 96, 206, 0.6);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

/* 关于区域 */
.about .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.section-image {
    max-width: 400px;  /* 限制最大宽度 */
    margin: 0 auto;    /* 居中显示 */
}

.section-image img {
    width: 100%;
    height: auto;      /* 保持宽高比 */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    object-fit: cover; /* 确保图片填充方式合适 */
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, white, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.skill-bar {
    margin-bottom: 20px;
}

.skill-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 1s ease;
}

/* 项目区域 */
.projects {
    text-align: center;
}

.projects-intro {
    max-width: 700px;
    margin: 0 auto 50px;
}

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

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
}

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

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 20px;
    text-align: left;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.project-tags span {
    background: rgba(115, 222, 254, 0.1);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.project-links .qrcode-wrapper {
    position: relative;
    display: inline-block;
    width: 100%; /* 让按钮容器占满宽度 */
}

.project-links .qrcode-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    width: 100%; /* 让按钮占满容器宽度 */
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap; /* 防止文字换行 */
}

.project-links .qrcode-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(115, 222, 254, 0.3);
}

.project-links .qrcode-trigger .icon {
    width: 18px; /* 稍微增大图标尺寸 */
    height: 18px;
    fill: currentColor;
    flex-shrink: 0; /* 防止图标被压缩 */
}

.project-links .qrcode-image {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    visibility: hidden;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.project-links .qrcode-image img {
    width: 120px;
    height: 120px;
    display: block;
}

.project-links .qrcode-wrapper:hover .qrcode-image {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* 技能区域 */
.skills {
    text-align: center;
}

.skills-intro {
    max-width: 700px;
    margin: 0 auto 50px;
}

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

.skill-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-name {
    font-weight: 500;
}

/* 删除联系方式相关样式 */
.contact,
.contact-intro,
.contact-form,
.form-group,
.form-control,
.contact-cards,
.contact-card,
.contact-icon {
    display: none;
}

/* 页脚 */
.footer {
    padding: 50px 0 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-links {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-social {
    margin-bottom: 30px;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .about .container {
        grid-template-columns: 1fr;
    }
    
    .section-image {
        order: -1;
    }
    
    .contact-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-card {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        padding: 0 15px;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: rgba(10, 17, 40, 0.95);
        backdrop-filter: blur(10px);
        height: 0;
        overflow: hidden;
        transition: var(--transition);
    }
    
    .nav-links.active {
        height: auto;
    }
    
    .nav-links a {
        display: block;
        padding: 15px;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

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

/* 提示框动画 */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

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

.fade-in-delay-1 {
    animation-delay: 0.2s;
    opacity: 0;
}

.fade-in-delay-2 {
    animation-delay: 0.4s;
    opacity: 0;
}

.fade-in-delay-3 {
    animation-delay: 0.6s;
    opacity: 0;
}

/* 二维码显示样式 */
.qrcode-wrapper {
    position: relative;
    display: inline-block;
}

.qrcode-image {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.qrcode-image img {
    width: 150px;
    height: 150px;
    display: block;
    object-fit: contain;
}

/* 微信二维码特殊样式 */
.wx-qrcode img {
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 200px;
}

.qrcode-wrapper:hover .qrcode-image {
    display: block;
}

/* 确保图标样式正确 */
.qrcode-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.qrcode-trigger:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-3px);
}

/* 回到顶部按钮 */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    pointer-events: none;  /* 默认禁用鼠标事件 */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;  /* 可见时启用鼠标事件 */
}

.scroll-to-top:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-3px);
}

.rocket-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    filter: brightness(0) saturate(100%) invert(80%) sepia(32%) saturate(7493%) hue-rotate(157deg) brightness(101%) contrast(98%);  /* 使图标颜色匹配主题色 */
}

.scroll-to-top:hover .rocket-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(7500%) hue-rotate(345deg) brightness(103%) contrast(102%);  /* 悬停时变为白色 */
    transform: translateY(-2px);  /* 悬停时微微上浮 */
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
    pointer-events: none;  /* 确保进度环不影响点击 */
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.3s ease;
    transform-origin: center;
    stroke-dasharray: 125.6;  /* 2 * π * r */
    stroke-dashoffset: 125.6;
} 