:root {
    --primary-color: #2196F3;
    --secondary-color: #FF4081;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --gradient: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

.navbar {
    position: fixed;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--dark-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transform: skewY(-6deg);
    transform-origin: top left;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.cta-button {
    padding: 1rem 2rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 2rem;
}

/* 作品卡片样式 */
.work-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.work-image {
    position: relative;
    background: #f0f0f0; /* 添加占位背景色 */
}

.work-image::before {
    content: '';
    display: block;
    padding-top: 75%; /* 保持4:3的图片比例 */
}

.work-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.work-card:hover .work-image img {
    transform: scale(1.1);
}

.work-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
    }
}

.section {
    margin-top: 80px; /* 为导航栏留出空间 */
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.work-info {
    padding: 1.5rem;
}

.work-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.work-info p {
    color: #666;
    font-size: 0.9rem;
}

.project-link {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    margin-top: 1rem;
    margin-left: 1rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    margin: 2rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* 添加淡入动画 */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 图片加载占位符 */
.lazy {
    opacity: 0;
}

.lazy.loaded {
    opacity: 1;
}

/* 移动端菜单样式 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: block;
    }
}

/* 确保视频容器正确显示 */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 2rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 修复图片显示问题 */
.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 添加卡片动画 */
.work-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.work-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    margin: 50px auto;
    background: white;
    border-radius: 12px;
    padding: 3rem;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--dark-color);
}

.project-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.project-images img {
    width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.project-images img:hover {
    transform: scale(1.05);
}

.view-details {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.view-details:hover {
    transform: translateY(-2px);
}

/* 修复图片加载样式 */
.work-image {
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
}

.work-image img.error {
    opacity: 0.5;
}

/* 添加加载动画 */
.work-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

.project-info {
    max-width: 800px;
    margin: 0 auto;
}

.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 2rem;
    background: var(--light-color);
    border-radius: 12px;
}

.project-details div {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 优化响应式布局 */
@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        margin: 20px;
    }

    .project-images {
        grid-template-columns: 1fr;
    }

    .project-details {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* 添加个人介绍样式 */
.hero-description {
    margin: 2rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-description p {
    margin: 0.5rem 0;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin: 1rem 0;
    font-weight: 600;
}

/* 添加视频项目样式 */
.video-item {
    margin-bottom: 2rem;
}

.video-item h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1.2rem;
}

.video-item p {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 1rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* 优化详情列表样式 */
.project-details ul {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0;
}

.project-details li {
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.2rem;
}

.project-details li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* 视频网格布局 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.video-item {
    width: 100%;
}

.video-item h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1.2rem;
    text-align: center;
}

/* 调整视频容器比例 */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* 添加标签样式 */
.tag {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    margin: 0.2rem;
    border-radius: 15px;
    font-size: 0.8rem;
    background: var(--light-color);
    color: var(--dark-color);
}

.tag.design { background: #E3F2FD; color: #1976D2; }
.tag.video { background: #F3E5F5; color: #7B1FA2; }
.tag.interactive { background: #E8F5E9; color: #388E3C; }
.tag.modeling { background: #FFF3E0; color: #F57C00; }

/* 优化加载动画 */
.loading-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loading-animation.hide {
    opacity: 0;
    pointer-events: none;
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 900;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
} 