/* 全局样式 */
:root {
    --background-color: #010101;
    --text-color: #ffffff;
    --accent-color: #ff3366;
    --secondary-color: #333366;
    --card-bg-color: #0a0a0a;
    --button-color: #ff3366;
    --font-family: 'Sohne', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

section {
    padding: 5rem 10%;
}

/* 导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 10%;
    z-index: 100;
    background-color: rgba(1, 1, 1, 0.8);
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    margin-right: 2rem;
    font-weight: 500;
    position: relative;
}

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

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-right {
    display: flex;
    align-items: center;
}

.language-switch {
    margin-right: 2rem;
}

.language-switch .lang {
    margin-right: 0.5rem;
    opacity: 0.6;
}

.language-switch .lang:hover {
    opacity: 1;
}

.contact-btn {
    background-color: var(--button-color);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 51, 102, 0.3);
}

/* 首页英雄区域 */
.hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start; /* 改为左对齐 */
    min-height: 100vh;
    padding: 0; /* 移除内边距，使模型有更多空间 */
    position: relative;
    background-color: #010101;
    color: white;
    overflow: visible; /* 允许内容溢出，确保模型完整显示 */
}

.hero-content {
    flex: 0 0 40%; /* 减小文字内容区域的比例 */
    z-index: 1;
    text-align: left;
    padding-right: 2rem;
    padding-left: 10%; /* 添加左侧padding，与导航栏Home对齐 */
}

/* 3D模型容器样式 */
.hero-3d-model {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible; /* 允许内容溢出 */
    z-index: 0; /* 置于文字内容之下 */
}

/* 3D模型的canvas样式 */
.hero-3d-model canvas {
    width: 100vw !important; /* 使用视口宽度 */
    height: 100vh !important; /* 使用视口高度 */
    display: block;
    object-fit: contain; /* 确保内容适应且完整显示 */
    transform-origin: center center; /* 设置变换原点为中心 */
    transform: translateX(20vw); /* 向右移动20%的视口宽度 */
}

/* Spline Viewer样式 */
spline-viewer {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.hero-3d-model iframe {
    border: none;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.name {
    display: block;
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #ffffff, #ff3366);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 500px;
    opacity: 0.9; /* 提高不透明度 */
    margin-left: 0;
    margin-right: auto;
}

.more-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
}

.more-btn .material-symbols-outlined {
    margin-left: 0.5rem;
    font-size: 1.2rem;
}

.more-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}



/* 项目部分 */
.projects {
    background-color: var(--background-color);
}

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

.project-card {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.project-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-info {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 50%;
    color: var(--background-color);
}

/* 关于我部分 */
.about {
    background-color: var(--background-color);
}

.about-container {
    display: flex;
    align-items: center;
}

.about-text {
    flex: 1;
    padding-right: 3rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.social h3 {
    margin: 2rem 0 1rem;
    font-size: 1.2rem;
}

.social-links {
    display: flex;
}

.social-link {
    margin-right: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px);
}

.social-link img {
    width: 24px;
    height: 24px;
}

.about-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-stack {
    position: relative;
    width: 100%;
    max-width: 500px; /* 限制最大宽度 */
}

.image-stack img {
    width: 100%;
    height: auto; /* 改为自动高度，保持宽高比 */
    object-fit: contain; /* 改为contain，确保整个图片可见 */
    border-radius: 12px;
}

/* 感谢部分 */
.thanks {
    text-align: center;
    padding: 8rem 10%;
}

.hand-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    animation: wave 2s infinite;
}

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(20deg);
    }
    50% {
        transform: rotate(0deg);
    }
    75% {
        transform: rotate(20deg);
    }
}

.thanks h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.thanks p {
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.8;
}

/* 页脚 */
footer {
    background-color: var(--card-bg-color);
    padding: 4rem 10%;
}

.contact-info h2 {
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    justify-content: space-between;
}

.contact-left p {
    margin-bottom: 1rem;
}

.qr-code {
    text-align: center;
}

.qr-code img {
    width: 150px;
    height: 150px;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    section {
        padding: 4rem 5%;
    }
    
    header {
        padding: 1.5rem 5%;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .about-container {
        flex-direction: column;
    }
    
    .about-text {
        padding-right: 0;
        margin-bottom: 3rem;
    }
    
    /* 在中等屏幕上调整3D模型大小 */
    .hero-3d-model {
        height: 60vh;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .name {
        font-size: 3.5rem;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero p {
        margin: 0 auto 2rem;
    }
    
    /* 在小屏幕上调整3D模型 */
    .hero-3d-model {
        width: 100%;
        height: 50vh;
        min-height: 300px;
    }
    
    .contact-details {
        flex-direction: column;
    }
    
    .contact-left {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        margin-right: 1rem;
        font-size: 0.9rem;
    }
    
    .language-switch {
        margin-right: 1rem;
    }
    
    .contact-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
} 