:root {
    --primary-color: #FFFFFF;
    --secondary-color: #F5F5F5;
    --accent-color: #4A90E2;
    --text-color: #333333;
}

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

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

/* 头部样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav a {
    margin-left: 2rem;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

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

/* 主体内容样式 */
main {
    margin-top: 70px;
}

section {
    padding: 4rem 2rem;
}

.welcome-section {
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--secondary-color);
}

.highlight {
    color: var(--accent-color);
}

/* 轮播图样式 */
.carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    margin-bottom: 40px;
}

.carousel:last-child {
    margin-bottom: 0;
}

.carousel-container {
    display: flex;
    width: 100%;
    position: relative;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
}

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

.carousel-slide .caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 20px;
    margin: 0;
    border-radius: 20px;
    font-size: 14px;
    max-width: 80%;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-slide .caption:not(:empty) {
    opacity: 1;
}

.carousel-slide:hover .caption:not(:empty) {
    background-color: rgba(0, 0, 0, 0.75);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* 底部样式 */
.footer {
    background-color: var(--secondary-color);
    padding: 2rem;
    text-align: center;
}

.social-links {
    margin-bottom: 1rem;
}

.social-link {
    font-size: 1.5rem;
    margin: 0 1rem;
    color: var(--text-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-link:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

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

.modal-content {
    position: relative;
    background-color: var(--primary-color);
    margin: 10vh auto;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 5px;
    text-align: center;
}

.modal-content img {
    width: 100%;
    height: auto;
    max-width: 300px;
    display: block;
    margin: 0 auto;
}

.close {
    position: absolute;
    right: 10px;
    top: 5px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

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

    .nav {
        margin-top: 1rem;
    }

    .nav a {
        margin: 0 0.5rem;
    }

    section {
        padding: 2rem 1rem;
    }

    .carousel-slide img {
        height: 300px;
    }

    .carousel-slide .caption {
        bottom: 30px;
        padding: 6px 15px;
        font-size: 12px;
    }
}

/* 关于我部分的样式 */
.about-section {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

.about-content {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
    align-items: flex-start;
}

.about-text {
    flex: 1;
    padding-right: 20px;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.about-text ul {
    list-style-type: none;
    padding-left: 0;
}

.about-text li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.about-text li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #666;
}

.about-image {
    flex: 1;
    max-width: 400px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }

    .about-image {
        max-width: 100%;
        margin-top: 30px;
    }

    .about-text {
        padding-right: 0;
    }

    .carousel-slide img {
        height: 300px;
    }
}

/* 添加轮播箭头样式 */
.carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.carousel-arrow:hover {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}

.carousel-arrow i {
    color: #333;
    font-size: 1.2rem;
}

/* 响应式设计中添加箭头样式调整 */
@media (max-width: 768px) {
    .carousel-arrow {
        width: 35px;
        height: 35px;
    }

    .prev-arrow {
        left: 10px;
    }

    .next-arrow {
        right: 10px;
    }
}

/* 轮播点样式 */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid #666;
}

.dot.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* 轮播图基础样式 */
.carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    margin-bottom: 40px;
}

/* 第一个轮播区保持原样 */
.carousel:first-child .carousel-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* 第二个轮播区调整 */
.carousel:nth-child(2) {
    max-width: 800px; /* 调整宽度 */
}

.carousel:nth-child(2) .carousel-slide img {
    width: 100%;
    height: auto; /* 自适应高度 */
    max-height: 600px; /* 设置最大高度 */
    object-fit: contain; /* 保持图片比例 */
}

/* 第三个轮播区调整 */
.carousel:nth-child(3) {
    max-width: 900px; /* 调整宽度 */
}

.carousel:nth-child(3) .carousel-slide img {
    width: 100%;
    height: auto; /* 自适应高度 */
    max-height: 600px; /* 设置最大高度 */
    object-fit: contain; /* 保持图片比例 */
}

/* 调整轮播区间距 */
.gallery-section {
    padding: 2rem 1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel:nth-child(2),
    .carousel:nth-child(3) {
        max-width: 100%;
    }

    .carousel:nth-child(2) .carousel-slide img,
    .carousel:nth-child(3) .carousel-slide img {
        max-height: 400px;
    }
}

/* 轮播区包装器样式 */
.carousel-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.carousel-wrapper:last-child {
    margin-bottom: 0;
}

/* 轮播区标题样式 */
.carousel-title {
    writing-mode: vertical-lr;
    text-orientation: upright;
    padding: 20px 10px;
    background: var(--accent-color);
    color: white;
    border-radius: 8px;
    font-size: 1.5rem;
    letter-spacing: 4px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-title:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 调整轮播区在包装器中的样式 */
.carousel-wrapper .carousel {
    flex: 1;
    margin-bottom: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-bottom: 40px;
    }

    .carousel-title {
        writing-mode: horizontal-tb;
        min-height: auto;
        width: 100%;
        padding: 10px 20px;
        letter-spacing: 2px;
    }
}

/* 笔记区域样式 */
.notes-section {
    margin-top: 0;
    padding-top: 20px;
    background-color: var(--secondary-color);
}

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

.notes-filter {
    margin-bottom: 2rem;
    text-align: center;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    margin: 0 0.5rem;
    border: none;
    border-radius: 20px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: white;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.note-card {
    background-color: white;
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
}

.note-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
    opacity: 0.8;
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.note-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.5px;
}

.note-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
}

.note-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.note-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.tag {
    background-color: #f0f7ff;
    color: #3182ce;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: #e6f0ff;
    transform: translateY(-1px);
}

.load-more-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 0.8rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background-color: #357abd;
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .notes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .note-card {
        padding: 1.5rem;
    }
}

/* 添加到现有的笔记样式中 */
.note-preview {
    margin-bottom: 1.2rem;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

.note-preview p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more {
    display: inline-block;
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 0.4rem 0;
}

.read-more:hover {
    color: #357abd;
    transform: translateX(3px);
}

/* 添加联系方式样式 */
.contact-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.social-links-about {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links-about a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
}

.social-links-about a:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.social-links-about i {
    font-size: 1.2rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .social-links-about {
        flex-direction: column;
    }
    
    .social-links-about a {
        width: 100%;
        justify-content: center;
    }
}

/* Markdown Modal Styles */
.markdown-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.markdown-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #000;
}

/* Markdown 内容样式 */
.markdown-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 图片说明文字样式 */
.markdown-content img + em {
    display: block;
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-top: 0.5em;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.markdown-content p {
    margin-bottom: 1em;
    line-height: 1.6;
}

.fullscreen-note {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    overflow-y: auto;
    display: none;
    padding: 20px;
    box-sizing: border-box;
}

.fullscreen-note.active {
    display: block;
}

.note-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.back-button {
    background-color: #2ecc71;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.2);
}

.back-button:hover {
    background-color: #27ae60;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.back-button i {
    font-size: 16px;
}

.note-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.note-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
    line-height: 1.7;
}

/* 添加 Markdown 内容的样式 */
.note-content h1,
.note-content h2,
.note-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.note-content p {
    margin-bottom: 1em;
}

.note-content code {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 4px;
}

.note-content pre {
    background: #f5f5f5;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
}

/* Markdown 内容样式 */
.note-content {
    padding: 20px;
    line-height: 1.6;
    font-size: 16px;
}

.note-content h1,
.note-content h2,
.note-content h3,
.note-content h4,
.note-content h5,
.note-content h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.note-content img {
    max-width: 100%;
    height: auto;
    margin: 16px 0;
}

.note-content pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 6px;
    margin: 16px 0;
}

.note-content code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(175, 184, 193, 0.2);
    border-radius: 6px;
}

.note-content pre code {
    padding: 0;
    background-color: transparent;
}

.fullscreen-note {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1000;
    overflow-y: auto;
    display: none;
}

.fullscreen-note.active {
    display: block;
}

.note-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-button {
    padding: 8px 16px;
    border: none;
    background: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
}

.back-button:hover {
    background: #e0e0e0;
}

/* 添加错误消息样式 */
.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
}

/* 修改滚动行为 */
html {
    /* 移除全局平滑滚动 */
    scroll-behavior: auto;
}

/* 只在特定元素上保留平滑滚动 */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* 优化笔记卡片的焦点状态 */
.note-card:focus-within {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* 添加暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .note-card {
        background-color: #1a1a1a;
        border-color: rgba(255,255,255,0.1);
    }

    .note-card::after {
        background: linear-gradient(transparent, #1a1a1a);
    }

    .note-card h3 {
        color: #e1e1e1;
    }

    .note-preview {
        color: #b0b0b0;
    }

    .tag {
        background-color: #2d3748;
        color: #63b3ed;
    }

    .tag:hover {
        background-color: #2c5282;
    }
}

/* 评论区域样式 */
.comments-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 20px;
}

.comment-form {
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

#commentContent {
    width: 100%;
    min-height: 100px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    resize: vertical;
}

.comment-form button {
    background: #4a90e2;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.comment-form button:hover {
    background: #357abd;
}

/* 评论列表样式 */
.comment-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.commenter-name {
    font-weight: 600;
    color: #2c3e50;
}

.comment-date {
    color: #666;
    font-size: 0.9rem;
}

.comment-content {
    line-height: 1.6;
    color: #333;
}

/* 回复样式 */
.comment-actions {
    margin-top: 0.5rem;
}

.reply-button {
    color: #4a90e2;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}

.reply-button:hover {
    text-decoration: underline;
}

/* 添加消息提示样式 */
.message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.error-message {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.success-message {
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* 禁用状态的按钮样式 */
.comment-form button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* 已开发应用模块样式 */
.developed-apps {
    margin-top: 30px;
    margin-bottom: 20px;
}

.developed-apps h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    display: inline-block;
}

.apps-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-item {
    display: flex;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 15px;
    align-items: center;
    gap: 20px;
}

.app-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.app-info {
    flex: 2;
}

.app-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.app-info p {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #666;
}

.app-qrcode {
    flex: 1;
    max-width: 120px;
}

.app-qrcode img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* 已开发应用响应式样式 */
@media (max-width: 768px) {
    .app-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .app-qrcode {
        margin-top: 15px;
        max-width: 150px;
        align-self: center;
    }
} 