:root {
    --primary-color: #e0eafc;
    --secondary-color: #cfdef3;
    --text-color: #333;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, rgba(224, 234, 252, 0.8), rgba(207, 222, 243, 0.8));
    min-height: 100vh;
    position: relative;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 2rem;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: 0.3s ease;
}
.navbar .logo,
.hero-content h1,
.about h2,
.ai-assistant h2,
#portfolio-section h2,
.video-title,
.modal-content h2,
.footer-info h3,
.footer-links h3,
.effect-text h3,
.photo-info {
    font-family: '隶书', LiSu, sans-serif;
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1500px;
    margin: 0 auto;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    transition: 0.3s ease;
}

/* Hero区域样式 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 0; /* Hero 区域不需要额外的顶部内边距 */
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--card-bg);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 50%; /* 调整图片位置，向下移动 */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--text-color);
    opacity: 0.7;
}

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

/* 区块间距调整 */
section {
    padding: 6rem 0;
}

/* 个人简介区域样式 */
.profile-card {
    background: linear-gradient(135deg, #e6e9f0 0%, #eef1f5 100%);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

/* 作品展示区域样式 */
.portfolio {
    margin-top: 5rem; /* 增加与上方区块的间距 */
}

.portfolio h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.section-description {
    text-align: left;
    margin-bottom: 0;
    color: var(--text-color);
    padding: 1rem 0;
    float: left;
    width: 35%;
}

.section-description h3 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: #e67e22;
    font-weight: bold;
}

.section-description p {
    margin: 0.5rem 0;
    font-size: 1.8rem;
    color: #e67e22;
    font-weight: bold;
}

.section-description .subtitle {
    color: #e67e22;
    font-size: 1rem;
    margin-top: 1.5rem;
}

.section-description .tools {
    color: #e67e22;
    font-style: italic;
    font-size: 1rem;
}
.section-description .subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

.section-description .tools {
    color: #666;
    font-style: italic;
    font-size: 1rem;
}

.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.portfolio-main-image {
    margin-bottom: 3rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.portfolio-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.portfolio-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 4rem;
    grid-template-areas:
        "main main"
        "grid grid"
        "effect effect";
}

.portfolio-main-image {
    grid-area: main;
    width: 100%;
    height: 550px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.portfolio-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%; /* 将图片内容向下移动，显示更多上部内容，从15%调整到10% */
    transition: transform 0.3s ease;
}

.portfolio-main-image:hover img {
    transform: scale(1.05);
}

.portfolio-grid-2x2 {
    grid-area: grid;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.grid-item {
    aspect-ratio: 2.5;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

.effect-images img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.effect-comparison {
    grid-area: effect;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 1rem;
}

.effect-text {
    flex: 1;
}

.effect-text h3 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.effect-text p:first-of-type {
    font-size: 1.8rem;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.effect-text .photo-info {
    color: #333;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    -webkit-text-fill-color: initial;
    background: none;
}

.effect-text .software-info {
    color: #666;
    font-size: 1rem;
    font-style: italic;
    -webkit-text-fill-color: initial;
    background: none;
}

.effect-images {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2rem;
}

.before-image,
.after-image {
    width: 50%;
    height: 250px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-left: auto; /* 确保图片靠右对齐 */
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.before-image:hover img,
.after-image:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .portfolio-grid-2x2 {
        grid-template-columns: 1fr;
    }

    .effect-comparison {
        flex-direction: column;
    }

    .effect-images {
        width: 100%;
    }
}
.before span, .after span {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--card-bg);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: none;
}

/* AI助手区域样式 */
.ai-assistant {
    background: linear-gradient(135deg, #e2e8f0 0%, #e6e9f0 100%);
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 12rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-assistant:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.ai-assistant h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.ai-assistant p {
    color: #666;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ai-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.ai-button i {
    font-size: 1.2rem;
}

/* AI助手弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--text-color);
}

.ai-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: nowrap;
}

.ai-card {
    text-decoration: none;
    color: var(--text-color);
    text-align: center;
    transition: transform 0.3s ease;
    padding: 1.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    width: 150px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.ai-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.8);
}

.ai-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-name {
    font-size: 1rem;
    margin-top: 0.5rem;
}

.modal-open {
    overflow: hidden;
}

/* 响应式设计 */
@media (max-width: 768px) {
    section {
        padding: 4rem 0; /* 移动端适当调整内边距 */
    }
    
    .portfolio {
        margin-top: 4rem;
    }

    .profile-card {
        align-items: center;
        text-align: center;
    }

    .nav-links {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-image {
        width: 150px;
        height: 150px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr; /* 移动端显示为1列 */
    }

    .portfolio-item img {
        height: 200px;
    }

    .ai-assistant {
        padding: 1.5rem;
        margin-bottom: 8rem;
        max-width: 100%;
    }

    .ai-assistant p {
        font-size: 0.9rem;
    }

    .portfolio h2 {
        margin-bottom: 2rem; /* 还原到之前的距离 */
    }
}

/* 粒子背景样式 */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* 视频区域样式 */
.video-section {
    margin-top: 12rem;
    text-align: center;
    position: relative;
}

.video-title {
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 2rem;
}
.video-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.video-container video {
    width: 100%;
    display: block;
    cursor: pointer;
}
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.play-button i {
    font-size: 24px;
    color: #333;
    margin-left: 4px; /* 稍微调整播放图标位置 */
}
.play-button:hover {
    background: white;
    transform: translate(-50%, -50%) scale(1.1);
}

/* 表情装饰 */
.decoration-emoji {
    position: absolute;
    bottom: 30px;
    right: -60px; /* 修改位置，使其显示在视频外部 */
    width: 120px;
    height: 120px;
    background-image: url('imgs/IMG_20250225_204704.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    box-shadow: var(--shadow);
    z-index: 100; /* 增加z-index值，确保显示在最上层 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .video-section {
        margin-top: 8rem;
    }
    
    .video-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .video-container {
        max-width: 100%;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-button i {
        font-size: 20px;
    }

    .decoration-emoji {
        width: 90px;
        height: 90px;
        bottom: 20px;
        right: -30px; /* 响应式布局下的位置调整 */
    }
}

/* 页脚样式 */
.footer {
    background: var(--card-bg);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.05);
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    margin-bottom: 3rem;
}
.footer-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}
.contact-info i {
    color: #333;
    font-size: 1.1rem;
}
.footer-info h3,
.footer-links h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}
.footer-info p {
    color: #666;
    line-height: 1.6;
}
.footer-links ul {
    list-style: none;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: var(--text-color);
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #666;
}
/* 响应式调整 */
@media (max-width: 768px) {
    .footer {
        padding: 3rem 0 1.5rem;
        margin-top: 4rem;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .footer-links li {
        margin-bottom: 0;
    }
}
/* 添加滚动偏移量 */
html {
    scroll-padding-top: 80px; /* 导航栏的高度 */
}
/* AI助手区域调整 */
#ai-assistant {
    scroll-margin-top: 80px; /* 为特定元素添加滚动偏移 */
}
/* 米塔视频区域调整 */
#mita {
    scroll-margin-top: 80px;
}
/* 作品区域调整 */
#portfolio-section {
    scroll-margin-top: 80px;
}
/* 更新页脚样式 */
.contact-info i {
    color: #333;
    font-size: 1.1rem;
}
.footer .social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}
.footer .social-icon {
    color: #666;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}
.footer .social-icon:hover {
    color: var(--text-color);
    transform: translateY(-3px);
}
