/* ==================== 备考错题本 - 现代化样式 ==================== */

:root {
    --primary-color: #f97316;
    --secondary-color: #ea580c;
    --accent-color: #f59e0b;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    --bg-light: #F5F4F0;
    --bg-white: #ffffff;
    --light-color: #F5F4F0;
    --light-gray: #e9ecef;
    --medium-gray: #cbd5e1;
    --dark-gray: #64748b;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --dark-color: #1e293b;
    
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 主容器样式 */
div.container-fluid {
    padding-top: 4px;
    padding-bottom: 4px;
}

/* ==================== 顶部导航栏 ==================== */
.top-navbar,
.navbar {
    background: #F5F4F0;
    padding: 12px 20px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-navbar .navbar-brand,
.navbar .navbar-brand {
    color: #f97316 !important;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.top-navbar .navbar-brand:hover,
.navbar .navbar-brand:hover {
    color: #ea580c !important;
    opacity: 0.9;
}

.navbar-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.navbar-target {
    color: #f97316;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(249, 115, 22, 0.1);
    padding: 4px 12px;
    border-radius: 16px;
}

.navbar-target strong {
    color: #ea580c;
    font-size: 1rem;
}

.navbar .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-md);
}

.subtitle {
    color: var(--text-secondary) !important;
    font-size: 0.95rem;
    border-left: 2px solid var(--medium-gray);
    padding-left: 10px;
}

.date-badge {
    background: rgba(255,255,255,0.2);
    color: white !important;
    padding: 5px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
}

.btn-status {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    color: white !important;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.btn-status:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white !important;
}

.btn-action {
    background: #F5F4F0 !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-action:hover {
    background: var(--primary-color) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* ==================== 标签页导航 ==================== */
.tab-navigation {
    background: #F5F4F0;
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.tab-navigation-simple {
    background: #F5F4F0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.tab-navigation-simple .custom-tabs {
    gap: 0;
}

.custom-tabs {
    border: none;
    gap: 8px;
    padding: 0 20px;
}

.custom-tabs .nav-link {
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 16px 24px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
}

.custom-tabs .nav-link:hover {
    color: var(--primary-color);
    background: rgba(74,144,226,0.05);
}

.custom-tabs .nav-link.active {
    color: var(--primary-color);
    background: #F5F4F0;
    font-weight: 700;
}

.custom-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--primary-color);
}

/* ==================== 主内容区域 ==================== */
.main-wrapper {
    padding: 20px 30px;
    min-height: calc(100vh - 200px);
}

/* ==================== 统计卡片区域 ==================== */
.stat-card {
    background: #F5F4F0;
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-total::before { background: linear-gradient(90deg, #f97316, #ea580c); }
.stat-card-error::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
.stat-card-guess::before { background: linear-gradient(90deg, #4facfe, #00f2fe); }
.stat-card-untested::before { background: linear-gradient(90deg, #43e97b, #38f9d7); }

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-card-total .stat-number { 
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card-error .stat-number { 
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card-guess .stat-number { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card-untested .stat-number { 
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 统计卡片区域样式 */
#questionStatistics,
#practiceStatistics,
#knowledgeStatistics,
#vocabularyStatistics {
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== 筛选工具栏 ==================== */
.filter-toolbar {
    background: #F5F4F0;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.filter-select,
.filter-date,
.filter-input {
    min-width: 140px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    background-color: #F5F4F0;
    padding: 0.35rem 0.6rem;
}

.filter-select:focus,
.filter-date:focus,
.filter-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74,144,226,0.1);
}

.filter-btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-1px);
}

.filter-btn .badge {
    transition: all 0.3s ease;
}

.search-input-group {
    position: relative;
    width: 100%;
}

.search-input-group .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 1;
}

.search-input-group input {
    padding-left: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    background-color: #F5F4F0;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.search-input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74,144,226,0.1);
}

.result-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.result-count strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ==================== 操作工具栏 ==================== */
.action-toolbar {
    background: #F5F4F0;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.question-card {
    background: #F5F4F0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    border-left: 4px solid var(--primary-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    height: auto !important;
    min-height: 200px;
    overflow: visible !important;
}

.question-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.question-card .card-body {
    border: none !important;
    padding: 0 !important;
}

.question-card .card-header {
    border: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

.question-card .card-footer {
    border: none !important;
    padding: 0 !important;
}

.question-card.selected {
    background: rgba(249, 115, 22, 0.12) !important;
}

.question-card.selected .tag-item {
    background: rgba(249, 115, 22, 0.2) !important;
}

.question-card.selected .question-footer-info {
    background: transparent !important;
}

.card.selected,
.practice-card.selected,
.knowledge-card.selected,
.vocabulary-card.selected {
    background: rgba(249, 115, 22, 0.12) !important;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), #ea580c);
    opacity: 1;
    transition: background 0.3s ease;
}

/* 已复盘的卡片 - 绿色左边框 */
.question-card.reviewed::before {
    background: linear-gradient(180deg, #28a745, #20c997);
}

/* 未复盘的卡片 - 橙色左边框 */
.question-card.unreviewed::before {
    background: linear-gradient(180deg, #fd7e14, #ffc107);
}

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

.question-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding: 0.75rem 1.25rem;
    background-color: #F5F4F0;
    border-radius: 0 0 12px 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.error-count {
    display: flex;
    align-items: center;
    color: #dc3545;
}

.last-error-time {
    display: flex;
    align-items: center;
}

.question-card-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 0.75rem;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.question-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.btn-card-action {
    background: none !important;
    border: none !important;
    color: var(--text-muted) !important;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-card-action:hover {
    color: var(--primary-color) !important;
    background: rgba(74,144,226,0.05) !important;
    transform: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.wrong {
    background: rgba(220,53,69,0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220,53,69,0.2);
}

.status-badge.guess {
    background: rgba(255,193,7,0.1);
    color: #d39e00;
    border: 1px solid rgba(255,193,7,0.2);
}

.status-badge.untested {
    background: rgba(108,117,125,0.1);
    color: #6c757d;
    border: 1px solid rgba(108,117,125,0.2);
}

.status-badge.reviewed-badge {
    background: rgba(40,167,69,0.1);
    color: var(--success-color);
    border: 1px solid rgba(40,167,69,0.2);
}

.status-badge.unreviewed-badge {
    background: rgba(253,126,20,0.1);
    color: #fd7e14;
    border: 1px solid rgba(253,126,20,0.2);
}

.subject-tag {
    display: inline-block;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
}

.question-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 1rem;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.question-content {
    padding: 2.3rem 1.25rem 0 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-height: 150px;
    overflow: hidden;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.question-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.5rem 0;
}

.question-content p {
    margin-bottom: 0.5rem;
}

.question-content ul,
.question-content ol {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.question-content blockquote {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.question-content code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.question-content pre {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.75rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.question-tags {
    padding: 0 1.25rem 0 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--primary-color);
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background-color: rgba(249, 115, 22, 0.2);
}

.question-card.selected .tag-item {
    background: rgba(249, 115, 22, 0.2) !important;
}
.question-table {
    background: #F5F4F0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.question-table thead th {
    background: linear-gradient(135deg, #F5F4F0 0%, #e9ecef 100%);
    font-weight: 700;
    color: var(--text-primary);
    border-bottom-width: 2px;
    padding: 16px 12px;
    white-space: nowrap;
}

.question-table tbody td {
    vertical-align: middle;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
}

.question-table tbody tr:hover {
    background-color: rgba(74,144,226,0.03);
}

.table-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.table-status-icon.wrong {
    background: rgba(220,53,69,0.1);
    color: var(--danger-color);
}

.table-status-icon.correct {
    background: rgba(40,167,69,0.1);
    color: var(--success-color);
}

/* ==================== 浮动添加按钮 ==================== */
.floating-add-btn,
.add-btn,
.btn.add-btn,
.btn.floating-add-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    font-size: 1.6rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.floating-add-btn:hover,
.add-btn:hover,
.btn.add-btn:hover,
.btn.floating-add-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.4);
    color: white;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.floating-add-btn i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ==================== 浮动按钮组（返回/保存） ==================== */
.floating-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

/* 关联词汇按钮样式 */
div#home-panel > div.filter-toolbar:nth-child(2) > div.row > div.col-auto:nth-child(5) > button.btn {
    border-width: 1px;
    border-style: solid;
    border-color: #b8b7b7;
}

/* 关联知识点按钮样式 */
div#home-panel > div.filter-toolbar:nth-child(2) > div.row > div.col-auto:nth-child(6) > button.btn {
    border-width: 1px;
    border-style: solid;
    border-color: #b8b7b7;
}

/* 错题管理统计样式 */
div#home-panel > div.row {
    margin-top: -28px;
    margin-bottom: -28px;
}

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
}

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

.floating-btn.back {
    background: linear-gradient(135deg, var(--dark-gray), var(--dark-color));
}

.floating-btn.edit,
.floating-btn.save {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

@media (max-width: 768px) {
    .floating-buttons {
        bottom: 1rem;
        right: 1rem;
    }
    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
}

/* ==================== 模态框样式优化 ==================== */
.modal-header-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    border: none;
    padding: 18px 24px;
}

.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-body {
    padding: 28px 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

/* ==================== 加载状态 ==================== */
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #F5F4F0;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
}

.empty-icon {
    font-size: 5rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* ==================== 分页样式 ==================== */
.pagination-wrapper {
    background: #F5F4F0;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.pagination .page-link {
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 14px;
    margin: 0 3px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 992px) {
    .main-wrapper {
        padding: 15px 20px;
    }
    
    .filter-toolbar .row > * {
        margin-bottom: 10px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .floating-add-btn {
        bottom: 25px;
        right: 25px;
        width: 54px;
        height: 54px;
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        padding: 10px 15px;
    }
    
    .subtitle {
        display: none;
    }
    
    .date-badge {
        font-size: 0.82rem;
        padding: 4px 10px;
    }
    
    .btn-action span {
        display: none;
    }
    
    .custom-tabs .nav-link {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .filter-toolbar {
        padding: 15px;
    }
    
    .stat-card {
        padding: 18px 15px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .question-card {
        padding: 18px;
    }
}

@media (max-width: 576px) {
    .main-wrapper {
        padding: 10px 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.82rem;
    }
    
    .question-title {
        font-size: 1rem;
    }
}

/* ==================== 动画效果 ==================== */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* ==================== 统一操作按钮样式（查看/编辑/删除） ==================== */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px !important;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: transparent;
    line-height: 1.5;
}

.action-btn i {
    font-size: 13px;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.action-btn-view {
    color: #17a2b8 !important;
}

.action-btn-view:hover {
    color: #138496 !important;
    background: rgba(23, 162, 184, 0.08) !important;
}

.action-btn-edit {
    color: #f97316 !important;
}

.action-btn-edit:hover {
    color: #ea580c !important;
    background: rgba(249, 115, 22, 0.08) !important;
}

.action-btn-delete {
    color: #dc3545 !important;
}

.action-btn-delete:hover {
    color: #c82333 !important;
    background: rgba(220, 53, 69, 0.08) !important;
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==================== 工具提示和提示框 ==================== */
.tooltip-custom {
    position: relative;
}

.tooltip-custom::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: rgba(0,0,0,0.85);
    color: white;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.tooltip-custom:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f97316, #ea580c);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ea580c, #c2410c);
}

/* ==================== 打印样式 ==================== */
@media print {
    .top-navbar,
    .tab-navigation,
    .filter-toolbar,
    .action-toolbar,
    .floating-add-btn,
    .add-btn,
    .pagination-wrapper {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .question-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ==================== 公共提示框样式 ==================== */
.alert-success {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.alert-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* ==================== 橙色主题辅助类 ==================== */
.text-orange-500 { color: #f97316 !important; }
.bg-orange-500 { background-color: #f97316 !important; }
.border-orange-500 { border-color: #f97316 !important; }

/* ==================== Bootstrap 按钮颜色覆盖 ==================== */
.btn-primary {
    background-color: #f97316 !important;
    border-color: #f97316 !important;
}
.btn-primary:hover {
    background-color: #ea580c !important;
    border-color: #ea580c !important;
}
.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.5) !important;
}
.btn-primary:disabled {
    background-color: #fdba74 !important;
    border-color: #fdba74 !important;
}
.btn-outline-primary {
    color: #f97316 !important;
    border-color: #f97316 !important;
}
.btn-outline-primary:hover {
    background-color: #f97316 !important;
    border-color: #f97316 !important;
    color: white !important;
}
.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.5) !important;
}

/* ==================== 表单元素公共样式 ==================== */
.form-control,
.form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    background-color: #F5F4F0;
}

.form-select {
    padding: 0.35rem 2rem 0.35rem 0.8rem;
}

.form-select-sm {
    padding: 0.25rem 1.8rem 0.25rem 0.6rem;
    font-size: 0.875rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.15);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ==================== 卡片样式 ==================== */
.card {
    background-color: #F5F4F0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-body {
    background-color: #F5F4F0;
}

.form-check-input:checked {
    background-color: #f97316;
    border-color: #f97316;
}

/* ==================== 按钮公共样式 ==================== */
.btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

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

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

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ==================== 下拉菜单样式 ==================== */
.dropdown-menu {
    background-color: #F5F4F0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0;
    min-width: 220px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 0.75rem 1.2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    background-color: transparent;
}

.dropdown-divider {
    border-top-color: var(--border-color);
    margin: 0.5rem 0;
}

.dropdown-item {
    padding: 0.65rem 1.2rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: rgba(249, 115, 22, 0.08);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.dropdown-item.text-danger {
    color: var(--danger-color);
}

.dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.08);
    color: var(--danger-color);
}

.dropdown-header {
    padding: 0.6rem 1.2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.dropdown-divider {
    border-top-color: var(--border-color);
    margin: 0.3rem 0;
}

.dropdown-item.text-danger {
    color: var(--danger-color);
}

.dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.btn-outline-primary:hover {
    color: white;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ==================== 模态框公共样式 ==================== */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ==================== 动画关键帧 ==================== */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

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