:root {
    --primary-color: #4a90e2;
    --secondary-color: #2ecc71;
    --background-color: #f8f9fa;
    --text-color: #2c3e50;
    --gradient-primary: linear-gradient(135deg, #4a90e2, #2ecc71);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 4rem;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links a {
    margin-left: 2rem;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

/* 轮播图样式 */
.carousel-section {
    height: 100vh;
    position: relative;
    margin-top: 0;
    padding-top: 80px;
}

.carousel {
    height: calc(100% - 80px);
    position: relative;
    overflow: hidden;
}

.carousel-inner {
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 20%;
    left: 10%;
    max-width: 600px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    z-index: 2;
}

.carousel-caption h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: slideInLeft 1s ease;
}

/* 其他部分样式将在下一部分继续... */

/* 在现有样式后添加聊天界面样式 */
.chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-widget.active .chat-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header h3 {
    flex-grow: 1;
    margin: 0;
}

.chat-header button {
    padding: 5px 10px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px;
    border-radius: 10px;
    margin: 5px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
}

.ai-message {
    background: #f0f0f0;
    color: var(--text-color);
    align-self: flex-start;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
}

.typing-indicator {
    padding: 5px;
    display: flex;
    gap: 5px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.input-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: none;
    height: 60px;
    font-family: inherit;
}

.chat-send-btn {
    padding: 10px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.chat-send-btn:hover {
    background: var(--secondary-color);
}

.chat-clear-btn, .chat-export-btn {
    transition: background 0.3s;
}

.chat-clear-btn:hover, .chat-export-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* 其他部分样式将在下一部分继续... */

/* 添加全局动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 滚动显示动画 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-widget-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.chat-widget-button:hover {
    transform: scale(1.05);
    background: var(--secondary-color);
}

/* 图标切换样式 */
.chat-widget-button .fa-comments {
    display: block;
    color: white;
    font-size: 24px;
}

.chat-widget-button .fa-times {
    display: none;
    color: white;
    font-size: 24px;
}

.chat-widget.active .chat-widget-button .fa-comments {
    display: none;
}

.chat-widget.active .chat-widget-button .fa-times {
    display: block;
}

/* 聊天容器样式 */
.chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-widget.active .chat-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 添加新的页脚样式 */
.footer {
    background: linear-gradient(to right, #2c3e50, #3498db);
    color: #fff;
    padding: 60px 0 20px;
    position: relative;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 0 20px;
}

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

.footer-section h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: var(--secondary-color);
}

.footer-section p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info li i {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 100px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

#back-to-top.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-info li {
        justify-content: center;
    }
}

/* 添加联系部分的样式 */
.contact-section {
    padding: 80px 0;
    background: var(--background-color);
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--text-color);
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 20px;
}

/* 表单卡片样式 */
.contact-form-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.contact-form-card h3 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.5rem;
}

.form-description {
    color: #666;
    margin-bottom: 30px;
}

.contact-form {
    display: grid;
    gap: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.submit-button {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* 地图卡片样式 */
.contact-map-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-container {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.contact-map-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.location-info {
    padding: 30px;
}

.location-info h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.3rem;
}

.working-hours {
    display: grid;
    gap: 15px;
}

.time-slot {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.time-slot:last-child {
    border-bottom: none;
}

.time-slot span:first-child {
    color: var(--text-color);
    font-weight: 500;
}

.time-slot span:last-child {
    color: #666;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-form-card,
    .contact-map-card {
        padding: 20px;
    }
}

/* 优化视频容器样式 */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 宽高比 */
    background: #f5f5f5;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 移除之前的视频加载相关样式 */
.video-container:not(.loaded)::before {
    display: none;
}

.video-error {
    display: none;
}

/* 视频控制器样式优化 */
video::-webkit-media-controls {
    background-color: rgba(0, 0, 0, 0.5);
}

/* 添加视频器的hover效果 */
.portfolio-item:hover .video-container {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* 作品集部分样式 */
.portfolio-section {
    padding: 80px 20px;
    background: var(--background-color);
}

.portfolio-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.portfolio-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

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

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-content {
    padding: 20px;
}

.portfolio-title {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.portfolio-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portfolio-tag {
    padding: 4px 12px;
    background: var(--background-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-color);
}

/* 作品集过滤器样式 */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-button {
    padding: 8px 20px;
    border: none;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
}

.filter-button:hover,
.filter-button.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .portfolio-filters {
        padding: 0 20px;
    }
}

/* 作品集标题样式 */
.portfolio-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 15px;
}

.portfolio-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* 优化作品集卡片内容样式 */
.portfolio-content {
    padding: 25px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95), white);
}

.portfolio-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.portfolio-item:hover .portfolio-title {
    color: var(--primary-color);
}

.portfolio-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portfolio-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #888;
}

.portfolio-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.portfolio-tag {
    padding: 6px 15px;
    background: var(--background-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.portfolio-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 添加查看更多按钮 */
.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    gap: 12px;
    color: var(--secondary-color);
}

.portfolio-link i {
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.portfolio-link:hover i {
    transform: translateX(3px);
}

/* 照片集样式 */
.photos-section {
    padding: 80px 0;
    background: var(--background-color);
}

.photo-carousel {
    position: relative;
    width: 100%;
    max-width: calc(100% - 40px);
    margin: 40px auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.photo-carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.photo-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.photo-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播按钮样式 */
.photo-carousel-prev,
.photo-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 2;
    transition: all 0.3s ease;
}

.photo-carousel-prev {
    left: 20px;
}

.photo-carousel-next {
    right: 20px;
}

.photo-carousel-prev:hover,
.photo-carousel-next:hover {
    background: var(--primary-color);
    color: white;
}

/* 统一的标题样式 */
.photos-section h2,
.portfolio-section h2,
.contact-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 15px;
}

.photos-section h2::after,
.portfolio-section h2::after,
.contact-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* 统一section的内边距 */
.photos-section,
.portfolio-section,
.contact-section {
    padding: 80px 20px;
    background: var(--background-color);
}

/* 统一container的样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 调整作品集网格布局以确保宽度参考 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* 社交媒体图标样式 */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    margin: 0 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Bilibili 图标特殊处理 */
.social-links a:first-child {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
}
.social-links a:first-child::before {
    content: "B";
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}