* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f7fa;
    --text-color: #333;
    --border-color: #e1e4e8;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --hover-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #e8dcc4;
    background-image: 
        repeating-linear-gradient(
            transparent,
            transparent 31px,
            #d4c5a9 31px,
            #d4c5a9 32px
        ),
        linear-gradient(90deg, #c9b896 1px, transparent 1px);
    background-size: 100% 32px, 40px 100%;
    background-position: 0 50px, 0 0;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0,0,0,0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0,0,0,0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 40px;
    width: 2px;
    height: 100%;
    background: #e8a5a5;
    box-shadow: 0 0 3px rgba(232, 165, 165, 0.5);
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

header {
    text-align: center;
    color: #5a4a3a;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    font-weight: 700;
    color: #4a3a2a;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.8;
    color: #6a5a4a;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.note-card {
    background: #fffef8;
    background-image: 
        repeating-linear-gradient(
            transparent,
            transparent 31px,
            rgba(212, 197, 169, 0.3) 31px,
            rgba(212, 197, 169, 0.3) 32px
        );
    background-size: 100% 32px;
    border-radius: 12px;
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.8);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #d4c5a9;
    position: relative;
}

.note-card::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(232, 165, 165, 0.3);
    pointer-events: none;
}

.note-card:hover {
    box-shadow: 
        0 4px 16px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.8);
    transform: translateY(-2px);
}

.note-header {
    padding: 20px;
    padding-left: 60px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(245, 240, 230, 0.8);
    border-bottom: 2px solid #d4c5a9;
}

.note-header:hover {
    background: rgba(240, 235, 220, 0.9);
}

.note-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #4a3a2a;
    flex: 1;
    text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}

.toggle-btn {
    background: #8b7355;
    color: #fffef8;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-btn:hover {
    background: #6a5a4a;
    transform: scale(1.05);
}

.note-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.note-content.expanded {
    max-height: 5000px;
}

.note-body {
    padding: 20px;
    padding-left: 60px;
}

.note-text {
    line-height: 2;
    color: #4a3a2a;
    white-space: pre-wrap;
    margin-bottom: 20px;
    font-size: 1.05em;
}

.note-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.note-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.note-image:hover {
    transform: scale(1.05);
}

.note-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.note-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(245, 240, 230, 0.8);
    border-radius: 6px;
    text-decoration: none;
    color: #8b7355;
    transition: all 0.3s ease;
    border: 1px solid #d4c5a9;
}

.note-link:hover {
    background: #8b7355;
    color: #fffef8;
    transform: translateX(5px);
}

.note-link::before {
    content: '🔗';
    margin-right: 8px;
}

/* 公告弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fffef8;
    background-image: 
        repeating-linear-gradient(
            transparent,
            transparent 31px,
            rgba(212, 197, 169, 0.3) 31px,
            rgba(212, 197, 169, 0.3) 32px
        );
    background-size: 100% 32px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
    border: 2px solid #d4c5a9;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid #d4c5a9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(245, 240, 230, 0.8);
}

.modal-header h2 {
    color: #4a3a2a;
}

.modal-header h2 {
    font-size: 1.5em;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.announcement-text {
    line-height: 2;
    margin-bottom: 20px;
    white-space: pre-wrap;
    color: #4a3a2a;
    font-size: 1.05em;
}

.announcement-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.announcement-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.announcement-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.announcement-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(245, 240, 230, 0.8);
    border-radius: 6px;
    text-decoration: none;
    color: #8b7355;
    transition: all 0.3s ease;
    border: 1px solid #d4c5a9;
}

.announcement-link:hover {
    background: #8b7355;
    color: #fffef8;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 2px solid #d4c5a9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(245, 240, 230, 0.5);
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #8b7355;
    color: #fffef8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background: #6a5a4a;
}

.btn-secondary {
    background: #a89080;
    color: #fffef8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-secondary:hover {
    background: #8b7a6a;
}

/* 图片查看器 */
.image-viewer {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
}

.image-viewer.show {
    display: flex;
    flex-direction: column;
}

.viewer-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.viewer-counter {
    font-size: 1.2em;
}

.viewer-close {
    background: none;
    border: none;
    color: white;
    font-size: 3em;
    cursor: pointer;
    line-height: 0.8;
}

.viewer-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.viewer-image-container {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#viewerImage {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: grab;
}

#viewerImage.grabbing {
    cursor: grabbing;
}

.viewer-nav {
    position: absolute;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 3em;
    padding: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
}

.viewer-nav:hover {
    background: rgba(255,255,255,0.3);
}

.viewer-prev {
    left: 20px;
}

.viewer-next {
    right: 20px;
}

.viewer-thumbnails {
    padding: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    overflow-x: auto;
}

.viewer-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.viewer-thumbnail:hover {
    opacity: 0.8;
}

.viewer-thumbnail.active {
    opacity: 1;
    border-color: var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    .note-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .note-title {
        font-size: 1.1em;
    }

    .note-images {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .note-image {
        height: 150px;
    }

    .viewer-nav {
        font-size: 2em;
        padding: 10px;
    }

    .viewer-prev {
        left: 10px;
    }

    .viewer-next {
        right: 10px;
    }

    .viewer-thumbnails {
        padding: 10px;
    }

    .viewer-thumbnail {
        width: 60px;
        height: 60px;
    }

    .modal-content {
        width: 95%;
    }

    .modal-footer {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
    }
}
