* {
    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: linear-gradient(90deg, #C39BD8, #6A0DAD);
    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;
}

.nav-menu-item-with-badge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.nav-badge-warning {
    background: #ffc107;
    color: #856404;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}

.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;
    min-height: calc(100vh - 2rem);  /* 最小高度为视窗高度减去上下边距 */
    padding-top: 0;
    align-self: flex-start;
    position: sticky;  /* 固定在视窗中 */
    top: 1rem;  /* 距离顶部1rem */
    overflow-y: auto;  /* 内容过多时允许滚动 */
}

.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;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

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

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

.sidebar a.active .menu-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* 菜单标签 */
.menu-label {
    flex: 1;
}

/* 菜单徽章（显示统计数据） */
.menu-badge {
    background: #27ae60;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    line-height: 1.2;
}

.sidebar a:hover .menu-badge {
    background: #229954;
}

.sidebar a.active .menu-badge {
    background: rgba(255, 255, 255, 0.25);
}

.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-top: 3rem;
    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;
}

.success-message {
    background: #efe;
    color: #27ae60;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #27ae60;
    font-size: 0.9rem;
}

.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;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 200px;
    margin: 0;
}

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

.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-card .task-main {
    flex: 1;
    min-width: 0;
}

.task-card .task-actions {
    flex-shrink: 0;
}

.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.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

.task-status-inline {
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.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;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.task-meta-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.task-meta-info > div {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.task-meta-info > div:first-child {
    margin-bottom: 0.25rem;
}

.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;
    justify-content: flex-end;
    flex-shrink: 0;
}

.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;
    z-index: 9999;
}

.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;
    transition: opacity 0.2s, cursor 0.2s;
}

.modal-close.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

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

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: #3498db;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: 500;
}

.toast.success {
    background: #3498db;
    color: white;
}

.toast.error {
    background: #f39c12;
    color: white;
}

/* 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: 1.5rem;
    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-disabled {
    pointer-events: none;
}

.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;
}

/* CAJ转换操作区 */
.caj-conversion-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.btn-convert {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: auto;
    margin: 0 auto;
}

.conversion-progress-inline {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.conversion-progress-inline .progress-bar {
    height: 10px;
    background: #ecf0f1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.conversion-progress-inline .progress-text {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0;
}

.conversion-success-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-radius: 8px;
    color: #155724;
}

.conversion-success-inline svg {
    flex-shrink: 0;
    color: #27ae60;
}

.conversion-success-inline span {
    font-weight: 600;
}

.conversion-success-inline .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-left: auto;
}

/* ==================== 用户管理界面样式 ==================== */
.user-management-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.user-management-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-management-search input {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 250px;
    transition: all 0.2s;
}

.user-management-search input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 用户列表容器 */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 用户卡片 */
.user-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.user-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.user-card.selected {
    border-color: #3498db;
    background: #f8fbff;
}

/* 用户卡片头部 */
.user-card-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* 用户头像 */
.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.user-avatar.admin {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

/* 用户信息区 */
.user-info {
    flex: 1;
    min-width: 0;
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

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

/* 徽章样式 */
.user-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-badge-admin {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.user-badge-verified {
    background: #27ae60;
    color: white;
}

.user-badge-unverified {
    background: #95a5a6;
    color: white;
}

.user-email {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.8rem;
    color: #95a5a6;
}

.user-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.user-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* 用户操作区 */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-stats {
    text-align: center;
    min-width: 60px;
}

.user-stats-group {
    display: flex;
    gap: 1rem;
}

.user-stats-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #3498db;
    line-height: 1;
}

.user-stats-label {
    font-size: 0.7rem;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* 用户编辑面板 */
.user-edit-panel {
    margin-top: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    border-radius: 10px;
    border: 1px solid #d6e9ff;
}

.user-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.user-edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.user-edit-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #5a6c7d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-edit-field input,
.user-edit-field .readonly-field {
    padding: 0.65rem 0.85rem;
    border: 1px solid #cdd9e6;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.2s;
    box-sizing: border-box;
    line-height: 1.4;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.user-edit-field input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.user-edit-field .readonly-field {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.user-edit-status {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.user-edit-status .user-badge {
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
}

.user-edit-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #d6e9ff;
}

.user-edit-actions .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 6px;
    font-weight: 500;
}

.user-edit-actions .btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
}

.user-edit-actions .btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.user-edit-actions .btn-save {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
}

.user-edit-actions .btn-save:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
}

/* 配置警告提示 */
.configuration-warnings {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.configuration-warnings h3 {
    color: #856404;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    color: #856404;
}

.warning-item:last-child {
    margin-bottom: 0;
}

.warning-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-card {
        padding: 1rem;
    }

    .user-card-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .user-avatar {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .user-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 0.75rem;
    }

    .user-edit-grid {
        grid-template-columns: 1fr;
    }

    .user-management-search input {
        width: 180px;
    }
}

/* PDF查看器 */
.pdf-viewer-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.pdf-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-right: 0.75rem;
    border-right: 1px solid #ddd;
}

.pdf-toolbar-group:last-child {
    border-right: none;
}

.pdf-toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.pdf-toolbar-btn:hover:not(:disabled) {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pdf-toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pdf-toolbar-btn svg {
    width: 18px;
    height: 18px;
}

.pdf-page-input {
    width: 50px;
    padding: 0.25rem 0.5rem;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.pdf-page-separator {
    margin: 0 0.25rem;
    color: #666;
}

.pdf-page-total {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
}

.pdf-scale-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.pdf-viewer-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: auto;
    background: #525252;
    border-radius: 8px;
    padding: 1rem;
}

.pdf-canvas {
    max-width: 100%;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    background: white;
}

/* 认证页面语言切换器 */
.auth-language-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.auth-language-selector .lang-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

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

.auth-language-select {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.2s;
}

.auth-language-select:hover {
    border-color: #999;
}

.auth-language-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.auth-language-select option {
    background: white;
    color: #333;
    padding: 0.5rem;
}

/* 让表单容器支持相对定位，以容纳语言切换器 */
.form-container {
    position: relative;
}

/* ==================== 认证页面底部广告 ==================== */
.auth-page-ad {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.auth-ad-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-ad-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-ad-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: white;
    padding: 6px;
    flex-shrink: 0;
}

.auth-ad-content {
    flex: 1;
    text-align: left;
}

.auth-ad-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.auth-ad-desc {
    font-size: 0.85rem;
    color: #666;
}

/* ==================== 侧边栏广告 ==================== */
.sidebar-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.25rem 1.5rem;
    margin-top: auto;  /* 推到侧边栏底部 */
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: visible;
    min-height: 100px;
}

.sidebar-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sidebar-ad::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: adShine 3s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes adShine {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20%, 20%) rotate(180deg); }
}

.sidebar-ad .ad-logo {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: white;
    padding: 6px;
    flex-shrink: 0;
}

.sidebar-ad .ad-text {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.sidebar-ad .ad-badge {
    position: relative;
    z-index: 1;
    background: #ff6b6b;
    color: white;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: bold;
    animation: adPulse 2s ease-in-out infinite;
    white-space: nowrap;
}

.fixed-ad .ad-text {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    color: white;
}

.fixed-ad .ad-badge {
    position: relative;
    z-index: 1;
    background: #ff6b6b;
    color: white;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: bold;
    animation: adPulse 2s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes adPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* 认证页面分隔线 */
.auth-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 1.5rem 0 1rem 0;
    width: 100%;
}

/* 在表单容器中的广告样式调整 */
.form-container .sidebar-ad {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.sidebar-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sidebar-ad::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: adShine 3s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes adShine {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20%, 20%) rotate(180deg); }
}

.ad-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: white;
    padding: 4px;
    flex-shrink: 0;
}

.ad-text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.ad-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ff6b6b;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    animation: adPulse 2s ease-in-out infinite;
}

@keyframes adPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* ==================== 固定广告栏（左下角） ==================== */
.fixed-ad {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    max-width: 300px;
    overflow: visible;
    min-height: 100px;
}

.fixed-ad::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: adShine 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.fixed-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.fixed-ad .ad-logo {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: white;
    padding: 6px;
    flex-shrink: 0;
}

/* ==================== 广告弹窗 ==================== */
.ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: adModalFadeIn 0.3s ease;
}

@keyframes adModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ad-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: adModalSlideUp 0.4s ease;
}

@keyframes adModalSlideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ad-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 16px 16px 0 0;
    text-align: center;
}

.ad-modal-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.ad-modal-header .subtitle {
    margin-top: 0.5rem;
    opacity: 0.9;
    font-size: 0.95rem;
}

.ad-modal-body {
    padding: 1.5rem 2rem;
}

.ad-modal-section {
    margin-bottom: 1.25rem;
}

.ad-modal-section h3 {
    color: #667eea;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ad-modal-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ad-modal-section li {
    padding: 0.35rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
    line-height: 1.4;
}

.ad-modal-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.ad-modal-section .ad-highlight {
    color: #e74c3c;
    font-weight: bold;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.ad-coupon-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.ad-coupon-section h3 {
    margin-top: 0;
}

.ad-promo-code {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    margin: 1.5rem 0;
}

.ad-promo-code .code {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    letter-spacing: 2px;
    margin: 0.5rem 0;
    user-select: all;
}

.ad-promo-code .hint {
    font-size: 0.85rem;
    color: #888;
}

.ad-coupon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: white;
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    margin: 0.75rem 0;
}

.ad-coupon code {
    font-size: 1.35rem;
    font-weight: 700;
    color: #667eea;
    letter-spacing: 2px;
    user-select: all;
    flex: 1;
    text-align: center;
}

.ad-copy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ad-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ad-hint {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}

.ad-modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid #eee;
}

.ad-modal-footer button,
.ad-modal-footer a {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    min-width: 0;
}

.ad-modal-footer .btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.ad-modal-footer .btn-secondary:hover {
    background: #e0e0e0;
}

.ad-modal-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ad-modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ad-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.ad-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
