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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
}

.nav-links a:hover,
.nav-links a.active {
    text-decoration: underline;
}

.nav-user-dropdown {
    position: relative;
}

.nav-language-selector {
    margin-left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-language-icon {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.nav-language-wrapper {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.lang-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-icon svg {
    width: 18px;
    height: 18px;
}

.nav-language-select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.nav-language-select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-language-select option {
    background: #2c3e50;
    color: white;
    padding: 0.5rem;
}

.nav-user-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.nav-user-trigger:hover {
    background: rgba(255,255,255,0.1);
}

.nav-user-icon {
    width: 28px;
    height: 28px;
    color: white;
}

.nav-user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    min-width: 120px;
    margin-top: 0.5rem;
    overflow: hidden;
    z-index: 100;
}

.nav-user-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    margin: 0;
}

.nav-user-menu a:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.nav-menu-divider {
    height: 1px;
    background: #eee;
    margin: 0;
}

.hidden {
    display: none !important;
}

.page {
    min-height: calc(100vh - 60px);
    padding: 2rem;
}

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

.main-layout {
    display: flex;
    gap: 2rem;
    width: 100%;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 120px;
    padding-top: 0;
    align-self: flex-start;
}

.main-layout .container {
    flex: 1;
    min-width: 0;
}

.main-layout .container h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.0rem;
}

.main-layout .container h2:first-child {
    margin-top: 0;
}

.main-layout .container .tasks-list {
    margin-top: 0.5rem;
}

.main-layout .container .tasks-list:first-of-type {
    margin-top: 0;
}

.main-layout .container .admin-stats {
    margin-top: 0.5rem;
}

.sidebar a {
    color: #666;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar a:hover {
    background: #f5f5f5;
    color: #333;
}

.sidebar a.active {
    background: #3498db;
    color: white;
}

.profile-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.profile-section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.form-container {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.hint {
    font-size: 0.85rem;
    color: #666;
}

.hint.error {
    color: #e74c3c;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 2.5rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1rem;
    user-select: none;
}

.hint.success {
    color: #27ae60;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #e74c3c;
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #2980b9;
}

/* 紧凑按钮：不占满宽度，保持原始大小 */
.btn-compact {
    width: auto !important;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
}

.form-footer a {
    color: #3498db;
}

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

.section-header .btn {
    width: auto;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-back {
    font-size: 0.9rem;
    color: #3498db;
    text-decoration: none;
    margin-left: auto;
}

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

.btn-back-large {
    font-size: 1.1rem;
    color: #3498db;
    text-decoration: none;
}

.btn-back-large:hover {
    text-decoration: underline;
}

.tasks-list {
    display: grid;
    gap: 0.5rem;
}

.tasks-list > .task-card {
    margin: 0;
}

.empty-hint {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.task-card {
    background: white;
    padding: 1.5rem;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.task-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-filename {
    font-weight: 600;
    font-size: 1.1rem;
}

.task-ocr-badge {
    background: #9b59b6;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 500;
}

.task-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending { background: #f39c12; color: white; }
.status-queued { background: #9b59b6; color: white; }
.status-processing, .status-converting, .status-translating { background: #3498db; color: white; }
.status-completed { background: #27ae60; color: white; }
.status-failed { background: #e74c3c; color: white; }

.task-meta {
    color: #666;
    font-size: 0.9rem;
}

.task-progress {
    margin: 1rem 0;
}

.progress-bar {
    background: #ecf0f1;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    background: #3498db;
    height: 100%;
    transition: width 0.3s;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.task-actions .btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-download {
    background: #27ae60;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.task-diagnostic {
    margin-top: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.diagnostic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

.diagnostic-header:hover {
    background: #e9ecef;
}

.toggle-icon {
    font-size: 0.75rem;
    color: #999;
}

.diagnostic-content {
    padding: 0.75rem;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.diagnostic-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
}

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

.diagnostic-step {
    font-weight: 600;
    color: #666;
    min-width: 120px;
}

.diagnostic-message {
    flex: 1;
    color: #333;
}

.diagnostic-message.diagnostic-success {
    color: #27ae60;
}

.diagnostic-message.diagnostic-error {
    color: #e74c3c;
}

.diagnostic-message.diagnostic-info {
    color: #3498db;
}

.diagnostic-time {
    color: #999;
    font-size: 0.75rem;
    min-width: 80px;
    text-align: right;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.modal-actions .btn {
    width: auto;
    padding: 0.6rem 1.2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal h3 {
    margin-bottom: 1.5rem;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: #333;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

/* Upload Progress Styles */
.upload-progress {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.upload-progress h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.progress-bar-large {
    background: #e0e0e0;
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-large .progress-fill {
    background: linear-gradient(90deg, #3498db, #2980b9);
    height: 100%;
    transition: width 0.3s ease;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    .page {
        padding: 1rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
}

/* 密码输入框样式 */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 32px;
    height: 32px;
    z-index: 10;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    color: #666;
}

.password-toggle:hover {
    color: #333;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Select下拉框样式 */
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrapper select {
    flex: 1;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    cursor: pointer;
}

.select-wrapper .select-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #666;
    pointer-events: none;
}

/* 文件输入框样式 */
.file-input-wrapper {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.75rem;
    background: white;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.file-input-wrapper input[type="file"] {
    flex: 1;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.file-input-hint {
    color: #999;
    font-size: 0.9rem;
    pointer-events: none;
}

/* Checkbox样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    cursor: pointer;
}

/* 按钮禁用状态 */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 10;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.password-toggle:hover {
    color: #333;
}

.password-toggle:active {
    color: #000;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* 拖拽上传区域 */
.drop-zone {
    background: white;
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.drop-zone-active {
    border-color: #3498db;
    background: #e3f2fd;
    transform: scale(1.02);
}

.drop-zone-has-file {
    border-color: #27ae60;
    border-style: solid;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.drop-zone-icon {
    width: 64px;
    height: 64px;
    color: #999;
    transition: color 0.3s ease;
}

.drop-zone:hover .drop-zone-icon {
    color: #3498db;
}

.drop-zone-active .drop-zone-icon {
    color: #3498db;
}

.drop-zone-has-file .drop-zone-icon {
    color: #27ae60;
}

.drop-zone-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.drop-zone-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.drop-zone-hint {
    font-size: 0.9rem;
    color: #999;
}

/* 右下角浮动按钮 - 已移除，按钮现在在标题栏 */

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #3498db;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.pagination-page {
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pagination-page:hover {
    background: #f5f5f5;
    border-color: #3498db;
}

.pagination-page.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: #999;
}

.pagination-info {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

@media (max-width: 600px) {
    .drop-zone {
        padding: 2rem 1rem;
    }

    .drop-zone-icon {
        width: 48px;
        height: 48px;
    }
}

/* ==================== 归档页面样式 ==================== */
.archive-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
}

.archive-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.archive-actions-right {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.archive-actions .btn-compact {
    margin-left: auto;
}

.task-card {
    position: relative;
    transition: all 0.2s;
}

.task-checkbox {
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 1;
}

.task-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-main {
    flex: 1;
}

.task-selected {
    background: #e3f2fd !important;
    border-color: #3498db !important;
}

.btn-archive {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-archive:hover {
    background: #7f8c8d;
}

@media (max-width: 600px) {
    .archive-stats {
        grid-template-columns: 1fr;
    }

    .task-checkbox {
        position: static;
        transform: none;
        margin-right: 0.5rem;
    }
}

/* ==================== 管理员面板样式 ==================== */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e9ecef;
}

.admin-stat-label {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.admin-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 后台侧边栏菜单 */
.admin-sidebar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-sidebar a {
    padding: 0.5rem 1rem;
    background: #e9ecef;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.admin-sidebar a:hover {
    background: #dee2e6;
}

.admin-sidebar a.active {
    background: #3498db;
    color: white;
}

.admin-content {
    margin-top: 1rem;
}

/* 统计卡片样式 */
.stats-period-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stats-period-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.stats-period-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.stats-numbers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    color: #3498db;
}

.chart-container {
    margin-top: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.chart-container h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.chart-container canvas {
    max-height: 300px;
}

/* 图片浏览弹窗 */
.image-viewer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    min-height: 400px;
}

.image-viewer-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.image-nav-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
}

.image-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.image-nav-btn:hover:not(:disabled) {
    background: #2980b9;
}

/* Markdown查看器 */
.markdown-viewer-content {
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

.markdown-body {
    line-height: 1.6;
    color: #333;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.markdown-body h1 { font-size: 1.8em; }
.markdown-body h2 { font-size: 1.5em; }
.markdown-body h3 { font-size: 1.3em; }

.markdown-body p {
    margin: 1em 0;
}

.markdown-body code {
    background: #f4f4f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-body pre {
    background: #f6f8fa;
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
}

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

.markdown-body img {
    max-width: 100%;
    height: auto;
}

.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.markdown-body table th,
.markdown-body table td {
    border: 1px solid #ddd;
    padding: 0.5em;
    text-align: left;
}

.markdown-body table th {
    background: #f4f4f4;
}

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

.markdown-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
    max-height: 65vh;
    overflow-y: auto;
}

/* OCR 限制提示 */
.ocr-hints {
    margin-top: 10px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 4px;
}

.hint-warning {
    color: #856404;
    font-size: 12px;
    margin: 5px 0;
}

/* 工具页面样式 */
.tool-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tool-section h2 {
    margin-bottom: 10px;
    color: #333;
}

.tool-description {
    color: #666;
    margin-bottom: 20px;
}

/* 关于页面样式 */
.about-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-section h2 {
    margin-bottom: 10px;
    color: #333;
}

.about-section ul {
    padding-left: 20px;
}

.about-section li {
    margin-bottom: 8px;
    color: #555;
}

.subscribe-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.subscribe-box h2 {
    color: white;
}

.subscribe-box p {
    color: rgba(255,255,255,0.9);
}

.tool-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.tool-upload-area:hover {
    border-color: #4CAF50;
    background: #f9f9f9;
}

.tool-upload-area .upload-prompt {
    color: #666;
}

.tool-upload-area .upload-prompt svg {
    color: #999;
    margin-bottom: 10px;
}

.tool-upload-area .file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-section {
    margin-top: 20px;
    padding: 20px;
    background: #d4edda;
    border-radius: 8px;
    text-align: center;
}

/* 工具页面样式 */
.tools-page {
    /* 与其他页面保持一致，不限制宽度 */
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.tool-description {
    color: #7f8c8d;
    font-size: 1rem;
}

.tool-upload-area {
    background: white;
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.tool-upload-area:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.tool-upload-area.drop-zone-active {
    border-color: #3498db;
    background: #e3f2fd;
}

.tool-upload-area .upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.tool-upload-area .upload-prompt svg {
    color: #3498db;
}

.tool-upload-area .upload-prompt p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.tool-upload-area .file-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tool-upload-area .file-info svg {
    color: #27ae60;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.file-size {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.tool-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.conversion-progress {
    width: 100%;
    max-width: 500px;
}

.conversion-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.conversion-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.conversion-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: #d4edda;
    border-radius: 12px;
    text-align: center;
}

.conversion-success svg {
    color: #27ae60;
}

.conversion-success p {
    color: #155724;
    font-weight: 600;
    font-size: 1.1rem;
}

