/**
 * 信奥赛一本通答案 - 自定义样式
 * 开发者: SZY创新工作室
 */

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --info-color: #4299e1;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --border-color: #e2e8f0;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: var(--text-primary);
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ==================== 容器 ==================== */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 头部 ==================== */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 30px 0;
    box-shadow: var(--shadow-md);
}

.site-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.site-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* ==================== 主容器 ==================== */
.main-container {
    display: flex;
    gap: 30px;
    margin: 30px auto;
    flex: 1;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    width: 280px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.category-tree {
    padding: 15px;
}

.category-item {
    margin-bottom: 20px;
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-color);
    padding: 10px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e9d5ff 100%);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.category-title::after {
    content: '▼';
    position: absolute;
    right: 10px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.category-title.expanded::after {
    transform: rotate(-180deg);
}

.subcategory-item {
    margin-left: 10px;
    margin-bottom: 15px;
}

.subcategory-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 8px 10px;
    background: #f7fafc;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.subcategory-title::after {
    content: '▼';
    position: absolute;
    right: 10px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.subcategory-title.expanded::after {
    transform: rotate(-180deg);
}

.chapter-list {
    margin-left: 15px;
}

.chapter-link {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.chapter-link:hover {
    background: #edf2f7;
    color: var(--primary-color);
    transform: translateX(5px);
}

.chapter-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
}

/* ==================== 内容区域 ==================== */
.content-area {
    flex: 1;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    min-height: 500px;
}

.content-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.content-header h2 {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.problem-count {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== 题目网格 ==================== */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.problem-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.problem-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.problem-id {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.problem-title {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ==================== 欢迎屏幕 ==================== */
.welcome-screen {
    text-align: center;
    padding: 60px 20px;
}

.welcome-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.welcome-screen h2 {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.welcome-screen p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 40px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 18px;
}

/* ==================== 底部 ==================== */
.site-footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.site-footer a {
    color: white;
    text-decoration: underline;
}

/* ==================== 题目详情页 ==================== */
.problem-container {
    max-width: 1000px;
    margin: 30px auto;
}

.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb span {
    margin: 0 8px;
}

.problem-detail {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
}

.problem-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.problem-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.problem-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.update-time {
    color: var(--text-secondary);
    font-size: 13px;
}

.problem-title-large {
    font-size: 32px;
    color: var(--dark-color);
    line-height: 1.3;
}

.answer-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 24px;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* ==================== Markdown样式 ==================== */
.markdown-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

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

.markdown-body h1 {
    font-size: 2em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.markdown-body h2 {
    font-size: 1.5em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.markdown-body h3 {
    font-size: 1.25em;
}

.markdown-body p {
    margin-bottom: 16px;
}

.markdown-body code {
    background: #f6f8fa;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.markdown-body pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 16px;
}

.markdown-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 16px;
    padding-left: 32px;
}

.markdown-body li {
    margin-bottom: 8px;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.markdown-body table th,
.markdown-body table td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.markdown-body table th {
    background: #f7fafc;
    font-weight: 600;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 16px 0;
}

.markdown-body a {
    color: var(--primary-color);
    text-decoration: underline;
}

.markdown-body hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 24px 0;
}

/* ==================== 错误框 ==================== */
.error-box {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.error-box h2 {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.error-box p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 30px;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-back,
.btn-block {
    display: block;
    width: 100%;
}

.problem-actions {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* ==================== 登录页面 ==================== */
.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.login-footer a {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== 管理后台 ==================== */
.admin-page {
    background: #f5f7fa;
}

.admin-header {
    background: white;
    box-shadow: var(--shadow-sm);
    padding: 20px 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 24px;
    color: var(--dark-color);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-user span {
    color: var(--text-secondary);
    font-size: 14px;
}

.btn-logout {
    padding: 8px 16px;
    background: var(--danger-color);
    color: white;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
}

.btn-logout:hover {
    background: #e53e3e;
}

.admin-nav {
    background: white;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.admin-nav .container {
    display: flex;
    gap: 0;
}

.nav-item {
    padding: 15px 25px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: var(--primary-color);
    background: #f7fafc;
}

.nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-container {
    margin-bottom: 40px;
}

/* ==================== 统计卡片 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 48px;
}

.stat-info .stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-info .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== 管理区块 ==================== */
.admin-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 30px;
}

.admin-section h2 {
    font-size: 22px;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin-bottom: 0;
}

/* ==================== 表格 ==================== */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: #f7fafc;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 14px;
}

.admin-table td {
    color: var(--text-primary);
    font-size: 14px;
}

.admin-table tbody tr:hover {
    background: #f7fafc;
}

.text-center {
    text-align: center;
}

.btn-link {
    color: var(--primary-color);
    font-size: 13px;
    margin-right: 10px;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-danger {
    color: var(--danger-color);
}

/* ==================== 快速操作 ==================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #e9d5ff 100%);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.action-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.action-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.code-editor {
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 13px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* ==================== 分类管理 ==================== */
.category-management {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.category-block {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.category-header-admin {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 15px 20px;
}

.category-header-admin h3 {
    font-size: 18px;
}

.subcategory-block {
    border-bottom: 1px solid var(--border-color);
}

.subcategory-block:last-child {
    border-bottom: none;
}

.subcategory-header-admin {
    background: #f7fafc;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subcategory-header-admin h4 {
    font-size: 16px;
    color: var(--dark-color);
}

.btn-delete {
    padding: 6px 12px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
}

.btn-delete:hover {
    background: #e53e3e;
}

.chapter-list-admin {
    padding: 15px 20px;
}

.chapter-item-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.chapter-item-admin span {
    font-size: 14px;
    color: var(--text-primary);
}

.btn-delete-small {
    padding: 4px 10px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 11px;
    cursor: pointer;
}

.btn-delete-small:hover {
    background: #e53e3e;
}

.empty-hint {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* ==================== 模态框 ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--dark-color);
}

.modal-content h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

/* ==================== 过滤栏 ==================== */
.filter-bar {
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-form input,
.filter-form select {
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
}

.filter-form input {
    flex: 1;
}

.filter-form select {
    min-width: 200px;
}

/* ==================== 题目表单 ==================== */
.problem-form {
    max-width: 900px;
}

/* ==================== 提示框 ==================== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* ==================== 底部 ==================== */
.admin-footer {
    background: white;
    text-align: center;
    padding: 20px;
    border-top: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 24px;
    }
    
    .problem-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-nav .container {
        flex-wrap: wrap;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form select {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .content-area,
    .problem-detail,
    .admin-section {
        padding: 20px;
    }
    
    .problem-title-large {
        font-size: 24px;
    }
}

/* ==================== 全局搜索 ==================== */
.global-search-container {
    position: relative;
    max-width: 100%;
    margin-bottom: 10px;
}

.global-search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.global-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: 500px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    margin-top: -10px;
}

.search-result-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f7fafc;
    padding-left: 25px;
}

.search-result-left {
    flex: 1;
}

.search-result-pid {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 5px;
}

.search-result-title {
    color: var(--text-primary);
    font-size: 14px;
}

.search-result-chapter {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 5px;
}

.search-no-results {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.search-result-count {
    padding: 10px 20px;
    background: #f7fafc;
    color: var(--text-secondary);
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}

/* 高亮匹配文本 */
.highlight {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}
