:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --background-color: #f5f5f5;
    --text-color: #333;
    --transition: all 0.3s ease;
}

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

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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    box-sizing: border-box;
}

.logo {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: #4a90e2;
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    transition: color 0.3s ease;
}

.logo-text:hover {
    color: #357abd;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.1);
}

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

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

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

.nav-links a.active::after {
    width: 80%;
}

/* 轮播图样式 */
#home {
    padding-top: 60px;
    margin-bottom: 0;
    width: 100%;
    overflow: hidden;
    background-color: #fff;
}

.carousel {
    position: relative;
    height: 500px;
    width: 100vw;
    overflow: hidden;
    margin: 0;
    left: 50%;
    transform: translateX(-50%);
}

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

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 轮播按钮样式 */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.carousel:hover .carousel-button {
    opacity: 1;
}

.carousel-button:hover {
    background: white;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-button:focus {
    outline: none;
}

.carousel-button.prev {
    left: 25px;
}

.carousel-button.next {
    right: 25px;
}

/* 轮播指示器样式 */
.carousel-indicators {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator:hover {
    background: #999;
    width: 12px;
}

.indicator.active {
    background: var(--primary-color);
    width: 20px;
}

/* 内容区域样式 */
section {
    padding: 60px 20px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    scroll-margin-top: 60px;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* 关于我部分 */
#about {
    padding: 80px 20px;
    background-color: #f8f9fa;
    scroll-margin-top: 60px;
}

#about h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5em;
    color: #2c3e50;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.personal-intro {
    display: block;
    margin-bottom: 60px;
    text-align: center;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
}

.intro-text h3 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #2c3e50;
}

.intro-text .highlight {
    color: #3498db;
}

.intro-text .subtitle {
    font-size: 1.2em;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.intro-text .description {
    line-height: 1.8;
    color: #34495e;
}

/* 作品集样式 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.portfolio-item {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.portfolio-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.portfolio-item h3,
.portfolio-item p,
.portfolio-item .tags {
    padding: 5px 0;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    margin: 0 5px 5px 0;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* 联系方式样式 */
.contact-info {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.wechat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.wechat-id {
    font-size: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.wechat-id i {
    color: #07C160; /* 微信绿色 */
    font-size: 2rem;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 20px auto;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-links a {
    font-size: 1.5rem;
}

/* 页脚样式 */
footer {
    background: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 2rem 5%;
}

footer .social-icons {
    margin-top: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 15px;
    }

    .nav-links a {
        margin-left: 15px;
        font-size: 0.9rem;
    }

    section {
        padding: 60px 15px;
    }

    .carousel {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none; /* 在移动端可以改为汉堡菜单 */
    }

    section {
        padding: 60px 3%;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        padding: 0 15px;
    }

    .carousel {
        height: 200px;
    }
}

/* 聊天容器样式 */
.chat-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
}

.chat-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 5px;
}

.user-message {
    align-items: flex-end;
}

.bot-message {
    align-items: flex-start;
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
    border-radius: 12px 12px 0 12px;
}

.bot-message .message-content {
    background: #f0f0f0;
    color: var(--text-color);
    border-radius: 12px 12px 12px 0;
}

.chat-input-container {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
    background: #f8f8f8;
}

#chatInput {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-right: 10px;
    font-size: 14px;
}

#chatInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

#sendMessage {
    padding: 0 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

#sendMessage:hover {
    background: #357abd;
}

/* 适移动端 */
@media (max-width: 480px) {
    .chat-container {
        padding: 0 10px;
    }
    
    .chat-messages {
        height: 250px;
    }
    
    #chatInput {
        padding: 8px;
    }
    
    #sendMessage {
        padding: 0 15px;
    }
}

/* 联系表单样式 */
.contact-form-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background-color: #f8f9fa;
}

.contact-form-container {
    width: 100%;
    max-width: 500px;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.required {
    color: #e74c3c;
    margin-left: 4px;
}

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

.form-group input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
}

.form-group input.error {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #357abd;
}

.submit-btn:active {
    transform: translateY(1px);
}

.submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-form-container {
        padding: 30px 20px;
    }
}

/* 响应式处理 */
@media (max-width: 480px) {
    .logo-text {
        font-size: 1.2rem;
    }
}

/* 服务项目样式 */
#services {
    padding: 20px 20px;
    background-color: white;
    scroll-margin-top: 60px;
}

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

.service-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    padding: 0;
    text-align: left;
}

.service-features li {
    padding: 8px 0;
    color: #555;
    position: relative;
    padding-left: 25px;
}

.service-features li:before {
    content: "✓";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* 响应式处理 */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .service-card {
        padding: 20px;
    }
}

/* 作品集链接样式 */
.portfolio-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: transform 0.3s ease;
}

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

.portfolio-content {
    padding: 15px;
}

.portfolio-item {
    transition: box-shadow 0.3s ease;
}

.portfolio-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
} 