/* 全局样式补充 */
body {
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 表格悬停效果 */
tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 卡片悬停效果增强 */
.transform {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.transform:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 表单元素焦点效果 */
input:focus, textarea:focus, select:focus {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 按钮悬停效果增强 */
button:hover, a.button:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

button:active, a.button:active {
    transform: translateY(1px);
}

/* 富文本编辑器样式 - 确保编辑器容器z-index较低 */
#editor {
    min-height: 300px;
    position: relative;
    z-index: 10;
}

/* 富文本内容显示样式 */
.rich-text-content {
    line-height: 1.8;
}

.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4,
.rich-text-content h5,
.rich-text-content h6 {
    margin: 1.2em 0 0.8em;
    font-weight: bold;
}

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

.rich-text-content img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
    border-radius: 4px;
}

.rich-text-content ul,
.rich-text-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.rich-text-content blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1em;
    margin: 1em 0;
    color: #666;
}

.rich-text-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.rich-text-content table th,
.rich-text-content table td {
    border: 1px solid #ddd;
    padding: 0.5em 1em;
}

.rich-text-content table th {
    background-color: #f5f5f5;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    /* 移动端编辑器调整 */
    #editor {
        min-height: 200px;
    }
    
    /* 移动端富文本内容调整 */
    .rich-text-content {
        font-size: 0.9rem;
    }
    
    .rich-text-content h1 {
        font-size: 1.5rem;
    }
    
    .rich-text-content h2 {
        font-size: 1.3rem;
    }
    
    .rich-text-content h3 {
        font-size: 1.15rem;
    }
    
    /* 移动端导航栏和内容间距调整 */
    main {
        padding-top: 24px !important;
    }
}
