:root {
    --primary-color: #e0f2f1;
    --secondary-color: #80cbc4;
    --text-color: #333;
    --accent-color: #26a69a;
    --white: #ffffff;
}

body {
    font-family: 'Noto Serif SC', serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: var(--primary-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 700;
}

header {
    background-color: var(--secondary-color);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Noto Sans SC', sans-serif;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

main {
    margin-top: 60px; /* 为固定的header留出空间 */
    margin-bottom: 2rem; /* 为footer留出空间 */
}

.carousel {
    width: 100%;
    height: 80vh; /* 增加高度 */
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.carousel-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%; /* 调整宽度 */
    height: 100%;
    overflow: hidden;
}

.carousel img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 改为cover以填充整个容器 */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    opacity: 0;
    transform: scale(1.05);
}

.carousel img.active {
    opacity: 1;
    transform: scale(1);
}

.carousel-text {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 30%;
    color: var(--text-color);
    z-index: 10;
}

.carousel-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.carousel-text p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 添加轮播图控制按钮样式 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--text-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-control:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

/* 添加指示器样式 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicators span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-indicators span.active {
    background-color: var(--accent-color);
}

.intro, .portfolio, .contact {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

footer {
    background-color: var(--secondary-color);
    padding: 2rem 1rem;
    text-align: center;
    width: 100%;
}

footer h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem; /* 调整这个值来改变图标之间的间距 */
}

.social-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon i {
    margin-bottom: 0.5rem;
}

.social-icon span {
    font-size: 0.8rem;
}

.social-icon:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.intro, .portfolio, .contact {
    animation: fadeIn 1s ease-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 1rem;
    }

    .carousel {
        height: 50vh;
    }
}

/* 在文件末尾添加以下样式 */

.experience {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.chat-container {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.chat-message {
    display: flex;
    margin-bottom: 1rem;
}

.chat-message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.chat-message .message {
    background-color: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    max-width: 70%;
}

.chat-message.human {
    flex-direction: row-reverse;
}

.chat-message.human .avatar {
    margin-right: 0;
    margin-left: 1rem;
    background-color: var(--secondary-color);
}

.chat-message.human .message {
    background-color: var(--accent-color);
    color: var(--white);
}

/* 删除之前的 .timeline 相关样式 */

.chat-input {
    display: flex;
    margin-top: 1rem;
}

#user-input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid var(--secondary-color);
    border-radius: 20px 0 0 20px;
    outline: none;
}

#send-button {
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#send-button:hover {
    background-color: var(--secondary-color);
}

.portfolio-item.video-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .portfolio-item.video-item {
        grid-column: span 2;
    }
    
    .portfolio-item.video-item video {
        height: 300px;
    }
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.portfolio-item {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-item img,
.portfolio-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.portfolio-item h3,
.portfolio-item p {
    padding: 0.5rem 1rem;
}

.portfolio-item h3 {
    margin-top: 0.5rem;
}

.portfolio-item.video-item {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .portfolio-item.video-item {
        grid-column: span 1;
    }
}