/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.2rem;
    font-weight: 400;
}

/* 日历导航样式 */
.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 15px;
}

.calendar-navigation h2 {
    color: #2c3e50;
    font-size: 1.6rem;
    font-weight: 500;
    margin: 0;
}

.nav-btn, .today-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-btn:hover, .today-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* 日历网格样式 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e9ecef;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

/* 星期标题样式 */
.weekday-header {
    background-color: #f8f9fa;
    padding: 15px 8px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
}

/* 日历日期单元格样式 */
.calendar-day {
    background-color: white;
    min-height: 80px;
    padding: 10px;
    position: relative;
    transition: background-color 0.2s ease;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

/* 今天日期 - 仅浅色背景 */
.calendar-day.today {
    background-color: #f0f8ff;
}

.calendar-day.other-month {
    background-color: #f8f9fa;
    color: #adb5bd;
}

.calendar-day.other-month .day-number {
    color: #adb5bd;
}

/* 日期数字样式 */
.day-number {
    font-size: 16px;
    font-weight: 700;
    color: #ff3e50;
    margin-bottom: 6px;
    cursor: pointer;
    padding: 0px 6px;
    border-radius: 4px;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.day-number:hover {
    background-color: #e9ecef;
}

/* 事件列表样式 - 所有日期统一 */
.event-list {
    margin-top: 0px;
}

.event-item {
    font-size: 12px;
    padding: 3px 6px;
    margin-bottom: 2px;
    background-color: #f8f9fa;
    color: #495057;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    border: 1px solid #e9ecef;
}

.event-item:hover {
    background-color: #e9ecef;
}

/* 事件指示点样式 - 所有日期统一 */
.event-indicator {
    width: 6px;
    height: 6px;
    background-color: #dc3545;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
}

/* 更多事件提示 */
.more-events {
    font-size: 10px;
    color: #6c757d;
    text-align: center;
    padding: 2px 4px;
    background-color: #e9ecef;
    border-radius: 3px;
    margin-top: 2px;
    cursor: default;
}

/* 富文本编辑器样式 */
.rich-text-editor {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    overflow: hidden;
}

.rich-text-editor .toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 8px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.rich-text-editor .tool-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    min-width: 36px;
    text-align: center;
}

.rich-text-editor .tool-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.rich-text-editor .tool-btn:active {
    background: #dee2e6;
}

.rich-text-editor .editor-content {
    min-height: 200px;
    max-height: 400px;
    padding: 12px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
}

.rich-text-editor .editor-content:empty:before {
    content: attr(placeholder);
    color: #6c757d;
    font-style: italic;
}

.rich-text-editor .editor-content:focus {
    background: #fafafa;
}

.rich-text-editor .editor-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 6px 12px;
    font-size: 12px;
    color: #6c757d;
}

.rich-text-editor .paste-hint {
    font-style: italic;
}

/* 编辑器内容样式 */
.editor-content h1,
.editor-content h2,
.editor-content h3 {
    margin: 8px 0;
    color: #2c3e50;
}

.editor-content p {
    margin: 6px 0;
}

.editor-content ul,
.editor-content ol {
    margin: 6px 0;
    padding-left: 24px;
}

.editor-content li {
    margin: 2px 0;
}

.editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 4px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.editor-content blockquote {
    border-left: 3px solid #007bff;
    margin: 8px 0;
    padding-left: 12px;
    color: #6c757d;
    font-style: italic;
}

/* 图片上传状态 */
.image-uploading {
    opacity: 0.6;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.image-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    color: #721c24;
    border-radius: 4px;
    margin: 4px 0;
}

/* 事件预览弹窗样式 */
.event-preview {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1002;
    max-width: 400px;
    max-height: 500px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.4;
}

.event-preview-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
}

.event-preview-content {
    color: #495057;
    margin-bottom: 8px;
    max-height: 300px;
    overflow-y: auto;
}

/* 预览内容中的图片样式 */
.event-preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 6px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.event-preview-content p {
    margin: 4px 0;
}

.event-preview-content ul,
.event-preview-content ol {
    margin: 4px 0;
    padding-left: 16px;
}

.event-preview-content li {
    margin: 2px 0;
}

.event-preview-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.event-preview-content em {
    font-style: italic;
    color: #6c757d;
}

.event-preview-content u {
    text-decoration: underline;
}

.event-preview-content h1,
.event-preview-content h2,
.event-preview-content h3 {
    margin: 6px 0;
    color: #2c3e50;
    font-weight: 600;
}

.event-preview-content h1 {
    font-size: 16px;
}

.event-preview-content h2 {
    font-size: 15px;
}

.event-preview-content h3 {
    font-size: 14px;
}

.event-preview-content blockquote {
    border-left: 3px solid #007bff;
    margin: 6px 0;
    padding-left: 10px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 0 4px 4px 0;
}

/* 无内容提示 */
.no-content {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

.event-preview-date {
    font-size: 11px;
    color: #adb5bd;
    margin-top: 8px;
    border-top: 1px solid #f8f9fa;
    padding-top: 6px;
}

/* 预览弹窗滚动条 */
.event-preview::-webkit-scrollbar {
    width: 6px;
}

.event-preview::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.event-preview::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.event-preview::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.event-preview-content::-webkit-scrollbar {
    width: 4px;
}

.event-preview-content::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 2px;
}

.event-preview-content::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 2px;
}

/* 模态框基础样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    pointer-events: auto;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fefefe;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    border: none;
    user-select: none;
    pointer-events: auto;
}

.modal-content.dragging {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    cursor: grabbing;
    transition: none;
}

/* 模态框头部 */
.modal-header {
    cursor: grab;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-content.dragging .modal-header {
    cursor: grabbing;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.modal-body {
    padding: 25px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    background: #fafbfc;
    pointer-events: auto;
}

/* 关闭按钮样式 */
.modal-header .close {
    color: white;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    pointer-events: auto;
    z-index: 1001;
}

.modal-header .close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* 表单样式 */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: white;
    font-family: inherit;
    pointer-events: auto;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-actions button[type="submit"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.form-actions button[type="submit"]:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#deleteEvent {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

#deleteEvent:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* 文件上传样式 */
.file-upload-section {
    margin-top: 10px;
}

.file-upload-area {
    border: 3px dashed #e1e8ed;
    border-radius: 12px;
    padding: 10px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    background: #f8f9fa;
    pointer-events: auto;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #e8f0ff;
    transform: scale(1.02);
}

.upload-placeholder span {
    display: block;
    font-size: 18px;
    color: #667eea;
    margin-bottom: 3px;
    font-weight: 600;
}

.upload-placeholder small {
    color: #6c757d;
    font-size: 12px;
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
    background: white;
    border: 1px solid #e1e8ed;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    margin-bottom: 0;
    background-color: white;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
}

.file-name {
    font-size: 14px;
    margin-bottom: 4px;
    color: #2c3e50;
	width:300px;
}

.file-size {
    font-size: 11px;
    color: #adb5bd;
    margin-top: 2px;
	width:100px;
}

.upload-time {
    font-size: 11px;
    color: #adb5bd;
    margin-top: 2px;
	width:120px;
}

.file-actions {
    display: flex;
    gap: 4px;
}

.file-download, .file-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 3px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.file-download {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.file-delete {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.file-download:hover {
    background: rgba(40, 167, 69, 0.2);
    transform: scale(1.1);
}

.file-delete:hover {
    background: rgba(220, 53, 69, 0.2);
    transform: scale(1.1);
}

.upload-progress {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .calendar-navigation {
        flex-direction: column;
        gap: 12px;
        padding: 0 10px;
    }
    
    .calendar-navigation h2 {
        font-size: 1.4rem;
        order: -1;
    }
    
    .calendar-day {
        min-height: 90px;
        padding: 8px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .weekday-header {
        padding: 12px 5px;
        font-size: 13px;
    }
    
    .event-item {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95% !important;
        max-width: 95% !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .modal-content.dragging {
        transform: translate(-50%, -50%) scale(1.02) !important;
    }
    
    .nav-btn, .today-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .rich-text-editor .editor-content {
        min-height: 150px;
        max-height: 300px;
        font-size: 16px;
    }
    
    .rich-text-editor .toolbar {
        padding: 6px;
        gap: 3px;
    }
    
    .rich-text-editor .tool-btn {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 44px;
    }
    
    .event-preview {
        max-width: 300px;
        max-height: 400px;
        font-size: 12px;
    }
    
    .event-preview-title {
        font-size: 13px;
    }
    
    .event-preview-content {
        max-height: 250px;
    }
    
    .event-preview-content img {
        max-width: 100%;
    }
    
    .modal-header {
        padding: 15px 20px;
        cursor: default;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .file-upload-area {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        min-height: 80px;
        padding: 6px;
    }
    
    .day-number {
        font-size: 13px;
    }
    
    .event-item {
        font-size: 9px;
        padding: 1px 3px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .calendar-navigation h2 {
        font-size: 1.2rem;
    }
    
    .weekday-header {
        padding: 10px 3px;
        font-size: 12px;
    }
    
    .modal-content {
        margin: 2% auto;
        padding: 15px;
    }
    
    .rich-text-editor .editor-content {
        min-height: 120px;
        max-height: 250px;
    }
    
    .rich-text-editor .toolbar {
        justify-content: center;
    }
    
    .editor-content img {
        max-width: 100%;
    }
    
    .event-preview {
        max-width: 250px;
        max-height: 350px;
        padding: 10px;
    }
    
    .event-preview-content {
        max-height: 200px;
    }
    
    .event-preview-content h1 {
        font-size: 14px;
    }
    
    .event-preview-content h2 {
        font-size: 13px;
    }
    
    .event-preview-content h3 {
        font-size: 12px;
    }
}

/* 左侧悬浮框样式 */
.sidebar {
    position: fixed;
    left: -320px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 800px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0 12px 12px 0;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    z-index: 999;
    transition: left 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.sidebar-actions {
    display: flex;
    gap: 8px;
}

.sidebar-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.save-btn {
    font-size: 12px;
}

.toggle-btn {
    font-size: 16px;
    font-weight: bold;
}

.sidebar-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 内容编辑器 */
.content-editor {
    flex: 1;
    padding: 10px;
    display: flex;
}

.sidebar-editor {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sidebar-editor::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* 编辑器统计 */
.editor-stats {
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
    flex-shrink: 0;
}

.auto-save {
    color: #28a745;
    font-weight: 500;
}

.auto-save.saving {
    color: #ffc107;
}

.auto-save.error {
    color: #dc3545;
}

/* 侧边栏触发按钮 */
.sidebar-trigger {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 998;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-trigger:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* 滚动条样式 */
.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        height: 700px;
        left: -290px;
    }
    
    .sidebar-trigger {
        left: 10px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .sidebar-header {
        padding: 12px 15px;
    }
    
    .content-editor {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 260px;
        height: 600px;
        left: -270px;
    }
    
    .sidebar-trigger {
        left: 5px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .sidebar-header h3 {
        font-size: 14px;
    }
    
    .sidebar-editor {
        font-size: 16px;
    }
}

/* 保存成功动画 */
@keyframes saveSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.save-success {
    animation: saveSuccess 0.3s ease;
}

/* 侧边栏富文本编辑器样式 */
.sidebar-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 8px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.sidebar-toolbar .tool-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    min-width: 32px;
    text-align: center;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toolbar .tool-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.sidebar-toolbar .tool-btn:active {
    background: #dee2e6;
}

/* 颜色选择器样式 */
.color-picker-container {
    position: relative;
    display: inline-block;
}

.color-picker {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    width: 80px;
}

.color-option {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: transform 0.2s ease;
}

.color-option:hover {
    transform: scale(1.2);
    border-color: #333;
}

/* 侧边栏编辑器内容区域 */
.sidebar-editor {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    overflow-y: auto;
    min-height: 200px;
}

.sidebar-editor:empty:before {
    content: attr(placeholder);
    color: #adb5bd;
    font-style: italic;
}

.sidebar-editor:focus {
    background: #fafafa;
}

/* 侧边栏编辑器内容样式 */
.sidebar-editor h1,
.sidebar-editor h2,
.sidebar-editor h3 {
    margin: 8px 0;
    color: #2c3e50;
}

.sidebar-editor p {
    margin: 6px 0;
}

.sidebar-editor ul,
.sidebar-editor ol {
    margin: 6px 0;
    padding-left: 24px;
}

.sidebar-editor li {
    margin: 2px 0;
}

.sidebar-editor strong {
    font-weight: bold;
}

.sidebar-editor em {
    font-style: italic;
}

.sidebar-editor u {
    text-decoration: underline;
}

.sidebar-editor s {
    text-decoration: line-through;
}

/* 内容编辑器布局调整 */
.content-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    .sidebar-toolbar {
        padding: 6px;
        gap: 3px;
    }
    
    .sidebar-toolbar .tool-btn {
        padding: 8px 10px;
        font-size: 14px;
        min-width: 36px;
        height: 32px;
    }
    
    .color-picker {
        width: 90px;
    }
    
    .color-option {
        width: 18px;
        height: 18px;
    }
    
    .sidebar-editor {
        font-size: 16px;
        padding: 10px;
    }
}

#divAll {
	width:1280px;
	margin:1em auto;
	padding:1em 0 0 0;
}
#divPage {
	width:100%;
	margin:0 auto;
	padding:0 0 0 0;
}
#divTop {
	width:100%;
	margin:0 auto;
	padding:0 0 2em 0;
	text-align:left;
	float:left;
	clear:both;
}

#BlogTitle {
	font-size:1.5em;
	margin:0;
	padding:0 0 0 0;
	font-weight:normal;
	clear:both;
	line-height:1em;
	text-align:center;
	letter-spacing :0.05em;
}
#divNavBar li:hover ul {
  display: block;
}

.function {
	float:left;
	width:100%;
	margin:0 0 1em 0;
	padding:0;
	text-align:left;
	line-height:1.5em;
	overflow:hidden;
}
.function .function_t {
	font-size:1.15em;
	height:1.5em;
	line-height:1.5em;
	margin:0 0 0 0;
	padding:0.33em 0 0.33em 0.9em;
}
.function ul {
	text-align:left;
	width:auto;
	margin:0 0 0 0;
	padding:0 0 0 1em;
	list-style-type:disc;
	list-style-position:inside;
}
.function li {
	font-size:1em;
	margin:0 0 0 0;
	padding:0.33em 0 0.33em 0;
	width:auto;
}
.function .function_c div {
	padding:0.4em 0 0.4em 1em;
}
.function a {
	margin-left:-0.3em;
		line-height:1.66em;
}
@-moz-document url-prefix(){
.function a {
	margin-left:-0.1em;
}
}

#divNavBar {
	float:left;
	width:100%;
	padding:0 0;
	margin:0 0;
	clear:both;
}
#divNavBar hr{
	float:left;
	width:100%;
	border: none;
	border-top:1px solid #888;
	opacity:0.2;filter:alpha(opacity=20);
	height: 1px;
    padding: 0px;
    margin: 0px;
}
#divNavBar ul {
	margin:0;
	padding:0 0 0 0;
	float:left;
}
#divNavBar li {
	float:left;
	padding:0 0 0 0;
	margin:0 0 0 0;
	height:3em;
}
#divNavBar a {
	float:left;
	margin:0 1em 0 1em;
	padding:0 1em;
	text-decoration:none;
	line-height:3em;
	font-weight:lighter;
}
#divNavBar a.on {
	font-weight:lighter;
	text-shadow:0 0  0.05em #888;
}
#divNavBar a:hover {
	color:#B22222;
	text-shadow:0 0  0.05em #888;
}
#divNavBar li {
  position: relative;
}
#divNavBar li ul {
  display: none;
  position: absolute;
  left: 0;
  white-space: nowrap;
  top: 3em;
  z-index: 1000;
  border-left:1px solid rgb(88,88,88,0.2);;
  border-right:1px solid rgb(88,88,88,0.2);;
  border-bottom:1px solid rgb(88,88,88,0.2);;
}

#divNavBar li:hover ul {
  display: block;
}
a {
	color:#333;
	text-decoration:none;
}
a:hover {
	color:#B22222;
	text-decoration:none;
}
ol,ul {
	list-style-type:none;
	list-style-position:inside;
	margin:0 0 0 0;
	padding:0 0 0 0;
}
li {
	margin:0 0 0 0;
	padding:0 0 0 0;
}

#divSearchPanel input[type="text"] {
	height:1.4em;
	width:10em;
	font-size:0.9em;
}
#divSearchPanel input[type="submit"] {
	height:1.8em;
	font-size:0.9em;
}
#divBottom {
	width:100%;
	margin:0 0 0 0;
	padding:4em 0 0 0;
	text-align:center;
	height:8em;
	clear:both;
	float:left;
}
#divNavBar {
	float:left;
	width:100%;
	padding:0 0;
	margin:0 0;
	clear:both;
}
#divNavBar hr{
	float:left;
	width:100%;
	border: none;
	border-top:1px solid #888;
	opacity:0.2;filter:alpha(opacity=20);
	height: 1px;
    padding: 0px;
    margin: 0px;
}
#divNavBar ul {
	margin:0;
	padding:0 0 0 0;
	float:left;
}
#divNavBar li {
	float:left;
	padding:0 0 0 0;
	margin:0 0 0 0;
	height:3em;
}
#divNavBar a {
	float:left;
	margin:0 1em 0 1em;
	padding:0 1em;
	text-decoration:none;
	line-height:3em;
	font-weight:lighter;
}
#divNavBar a.on {
	font-weight:lighter;
	text-shadow:0 0  0.05em #888;
}
#divNavBar a:hover {
	color:#B22222;
	text-shadow:0 0  0.05em #888;
}
#divNavBar li {
  position: relative;
}
#divNavBar li ul {
  display: none;
  position: absolute;
  left: 0;
  white-space: nowrap;
  top: 3em;
  z-index: 1000;
  border-left:1px solid rgb(88,88,88,0.2);;
  border-right:1px solid rgb(88,88,88,0.2);;
  border-bottom:1px solid rgb(88,88,88,0.2);;
}

#divNavBar li:hover ul {
  display: block;
}

/* 确保模态框不会被拖出视口 */
.modal-content {
    min-width: 300px;
    min-height: 200px;
}

/* 在移动设备上禁用拖动 */
@media (max-width: 768px) {
    .modal-header {
        cursor: default;
    }
}

/* 搜索结果样式 */
.search-result-item {
    transition: all 0.3s ease;
}

.search-result-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.search-pagination button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-pagination button:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-1px);
}

.no-results {
    font-size: 16px;
    color: #666;
}

/* 搜索表单样式 */
#divSearchPanel input[type="text"] {
    height: 25px;
    width: 180px;
    font-size: 14px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#divSearchPanel input[type="submit"],
#divSearchPanel input[type="button"] {
    height: 27px;
    font-size: 12px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

#divSearchPanel input[type="submit"]:hover,
#divSearchPanel input[type="button"]:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}
/* 搜索高亮样式 */
mark {
    background: #ffeb3b !important;
    padding: 1px 2px !important;
    border-radius: 2px;
}

/* 搜索结果项悬停效果 */
.search-result-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* 分页按钮悬停效果 */
.search-pagination button:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 操作按钮悬停效果 */
.result-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}