/* 全局样式 */
:root {
    --primary-color: #333;
    --secondary-color: #666;
    --accent-color: #ff6b6b;
    --background-color: #f8f9fa;
    --text-color: #333;
    --light-text: #fff;
}

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

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

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* 章节通用样式 */
.section {
    min-height: 100vh;
    padding: 6rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 欢迎区样式 */
.welcome-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('./images/gallery/01.png');
    background-size: cover;
    background-position: center;
    color: var(--light-text);
    text-align: center;
}

.welcome-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 画廊样式 */
.gallery-section {
    background-color: var(--background-color);
    padding: 6rem 2rem;
}

.gallery-grid {
    columns: 3 300px;
    column-gap: 20px;
    padding: 20px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    width: 100%;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    margin: 0;
    font-size: 1.2rem;
}

.gallery-overlay p {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 关于我样式 */
.about-section {
    background-color: #fff;
    padding: 6rem 2rem;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.profile-image::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6e8efb, #000000);
    z-index: -1;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 50%;
}

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

.about-text-container {
    flex: 1;
    max-width: 800px;
    display: flex;
    align-items: center;
}

.about-text {
    text-align: justify;
    max-width: 1400px;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-color);
}

/* 联系表单样式 */
.contact-section {
    background-color: var(--background-color);
    min-height: 100vh;
}

.contact-content {
    max-width: 600px;
    width: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

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

.contact-form button {
    padding: 1rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #ff5252;
}

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

.social-icon {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.social-icon:hover {
    background-color: var(--accent-color);
}

.social-icon img.icon {
    width: 24px;
    height: 24px;
    fill: #fff;
    transition: transform 0.3s ease;
}

.social-icon:hover img.icon {
    transform: scale(1.2);
    fill: #00f2ea;
}

/* 特别为微信图标调整 */
.social-icon[title="微信"] .icon {
    width: 40px;
    height: 40px;
}

/* 特别为小红书图标调整 */
.social-icon[title="小红书"] .icon {
    width: 35px;
    height: 35px;
    color: #fff;
}

.social-icon:hover[title="小红书"] .icon {
    color: #00f2ea;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .gallery-grid {
        columns: 2 300px;
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        columns: 2 300px;
    }

    .about-container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .profile-image {
        width: 250px;
        height: 250px;
    }

    .about-text {
        max-width: 100%;
    }
    
    .about-text p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        columns: 1 300px;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .welcome-content h1 {
        font-size: 2rem;
    }
}

/* 底部栏样式 */
.footer {
    background-color: #1a1a1a;
    color: white;
    padding: 3rem 0;
    margin-top: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

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

.social-icon {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.icon {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.footer-text {
    text-align: center;
    margin-top: 20px;
}

.footer-text p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.footer-text .icp {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .social-icons {
        gap: 1.5rem;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
    }
    
    .icon {
        width: 25px;
        height: 25px;
    }
}

/* Vela聊天機器人樣式 */
.vela-section {
    background-color: #f8f9fa;
    padding: 4rem 2rem;
}

.vela-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.vela-header {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
}

.vela-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.vela-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.chat-container {
    max-width: 800px;
    margin: 2rem auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #6e8efb, #000000);
    color: white;
}

.chat-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.chat-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - 200px);
}

.message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

.message-content {
    max-width: 80%;
    padding: 1rem;
    border-radius: 12px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    overflow: visible;
}

.message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.message-content th,
.message-content td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.message-content th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.message-content tr:nth-child(even) {
    background-color: #f9f9f9;
}

.message-content tr:hover {
    background-color: #f0f0f0;
}

.message-content.long-text {
    max-width: 100%;
    background-color: transparent;
    padding: 0;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: visible;
}

.message-content.long-text table {
    width: 100%;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    table-layout: fixed;
}

.message-content.long-text th,
.message-content.long-text td {
    word-break: break-word;
    min-width: 100px;
}

.nocturne-x-message .message-content {
    background-color: #f0f2f5;
    align-self: flex-start;
    max-width: 90%;
}

.user-message .message-content {
    background-color: #6e8efb;
    color: white;
    align-self: flex-end;
    max-width: 90%;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    background-color: white;
}

.chat-input input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.chat-input button {
    padding: 0.8rem 1.5rem;
    background-color: #6e8efb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.chat-input button:hover {
    background-color: #5a7de8;
}

@media (max-width: 768px) {
    .chat-container {
        margin: 0;
        height: 100vh;
        border-radius: 0;
    }
    
    .message-content {
        max-width: 90%;
    }
}

/* Nocturne-X搜索框樣式 */
.nocturne-x-search {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px 16px;
    z-index: 1000;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.nocturne-x-search:hover {
    transform: translateY(-2px);
    background: #f8f9fa;
}

.nocturne-x-search input {
    border: none;
    outline: none;
    padding: 8px;
    width: 200px;
    font-size: 0.9rem;
    background: transparent;
    cursor: pointer;
}

.nocturne-x-search input::placeholder {
    color: #666;
}

.nocturne-x-search button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon {
    width: 20px;
    height: 20px;
    fill: #6e8efb;
}

@media (max-width: 768px) {
    .nocturne-x-search {
        bottom: 10px;
        right: 10px;
    }
    
    .nocturne-x-search input {
        width: 150px;
    }
}

/* AI声明样式 */
.ai-disclaimer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    z-index: 999;
    border-top: 1px solid #eee;
}

.ai-disclaimer p {
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .ai-disclaimer {
        padding: 8px 15px;
        font-size: 0.7rem;
    }
}

/* 特别为小红书图标调整 */
.footer .social-icons .social-icon[title="小红书"] .icon {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
}

.footer .social-icons .social-icon:hover[title="小红书"] .icon {
    filter: brightness(0) invert(1);
} 

/* 随笔页面样式 */
.essays-section {
    padding: 100px 20px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.essays-container {
    max-width: 1200px;
    margin: 0 auto;
}

.essays-container h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    color: #333;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
}

.essays-container h1:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #333;
}

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

.essay-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
}

.essay-card.reverse-layout {
    flex-direction: row-reverse;
}

.essay-image {
    width: 70%;
    height: 300px;
    overflow: hidden;
}

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

.essay-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.essay-card:hover .essay-image img {
    transform: scale(1.1);
}

.essay-content {
    width: 30%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.essay-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.essay-content p {
    font-family: 'Open Sans', sans-serif;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: justify;
}

.essay-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.essay-date {
    font-size: 0.85rem;
    color: #888;
}

.read-more {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-right: 20px;
}

.read-more:after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.read-more:hover:after {
    transform: translate(5px, -50%);
}

@media (max-width: 768px) {
    .essay-card {
        flex-direction: column;
    }
    
    .essay-image {
        width: 100%;
        height: 250px;
    }
    
    .essay-content {
        width: 100%;
    }
}

/* 文章页面样式 */
.article-section {
    padding: 100px 20px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.article-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.article-header {
    padding: 40px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.article-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.article-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 40px;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.8;
    color: #333;
}

.article-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .article-header {
        padding: 30px;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-image {
        height: 300px;
    }
    
    .article-content {
        padding: 30px;
    }
}

/* 模态窗口样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #666;
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.modal-date {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 5px;
}

.modal-text {
    color: #444;
    line-height: 1.8;
    font-size: 16px;
    text-align: justify;
}

.modal-text p {
    margin-bottom: 15px;
    text-align: justify;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-text {
        font-size: 14px;
    }
}

.function-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

.function-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.function-btn:hover {
    background-color: #f0f0f0;
}

.function-btn.active {
    background-color: #333;
    color: white;
    border-color: #333;
}

.chat-messages .message img {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin: 10px 0;
    border-radius: 8px;
    display: none;
}

#image-upload {
    display: none;
}

.upload-btn {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

.upload-btn:hover {
    background-color: #e0e0e0;
}

.disclaimer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    z-index: 999;
    border-top: 1px solid #eee;
}

.disclaimer p {
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .disclaimer {
        padding: 8px 15px;
        font-size: 0.7rem;
    }
}

.thinking-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin: 10px 0;
    background-color: #f0f0f0;
    border-radius: 10px;
    width: fit-content;
}

.thinking-dots {
    display: flex;
    gap: 4px;
    margin-right: 8px;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    background-color: #666;
    border-radius: 50%;
    animation: thinking 1.4s infinite ease-in-out;
}

.thinking-dots span:nth-child(1) {
    animation-delay: 0s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.thinking-text {
    color: #666;
    font-size: 14px;
}

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

/* 优化滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
} 