/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e8e8e8;
    --bg-color: #f5f5f5;
    --card-bg: white;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 响应式容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* 内容盒子 */
.content-box {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    max-width: 100%;  /* 确保占满容器 */
}

/* 移动端优先的网格系统 */
.grid {
    display: grid;
    gap: 20px;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

/* 统计卡片 */
.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.stat-card.primary { border-left-color: var(--primary-color); }
.stat-card.success { border-left-color: var(--success-color); }
.stat-card.info { border-left-color: var(--info-color); }
.stat-card.warning { border-left-color: var(--warning-color); }

/* 表单元素响应式 */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
}

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

.btn-danger:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

/* 页面头部响应式 */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 表格响应式 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 600px;
}

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

.data-table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* 状态标签 */
.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-success {
    background: #d1edff;
    color: #155724;
    border: 1px solid #b8daff;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-cancelled {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* 错误提示 */
.error-notice {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--danger-color);
}

.success-notice {
    background: #d1edff;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--success-color);
}

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

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
}

/* 余额信息 */
.balance-info {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.balance-amount {
    font-size: 42px;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.balance-label {
    opacity: 0.9;
    font-size: 16px;
}

/* 头部导航 */
.main-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    font-size: 20px;
}

.logo {
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 30px 20px;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    color: var(--text-color);
}

/* 主导航 */
.main-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

/* 用户区域 */
.user-section {
    display: flex;
    align-items: center;
}

.user-info {
    position: relative;
    cursor: pointer;
}

.user-name {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-weight: 500;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    padding: 10px 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.user-info:hover .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-link {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.user-menu-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.user-menu-link.logout {
    color: var(--danger-color);
    border-top: 1px solid var(--border-color);
}

.auth-links {
    display: flex;
    gap: 15px;
}

.auth-link {
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-link.login {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.auth-link.login:hover {
    background: var(--primary-color);
    color: white;
}

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

.auth-link.register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
/* 底部样式 */
.main-footer {
    background: white;
    border-top: 1px solid #e8e8e8;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section h4 {
    color: #333;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.footer-section p {
    color: #666;
    line-height: 1.5;
    font-size: 13px;
    margin: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #0d6efd;
}

.footer-bottom {
    border-top: 1px solid #eee;
    padding-top: 15px;
    text-align: center;
}

.footer-bottom p {
    color: #999;
    font-size: 12px;
    margin: 3px 0;
}

.footer-bottom a {
    color: #999;
    text-decoration: none;
    font-size: 12px;
}

.footer-bottom a:hover {
    color: #666;
}

/* 移动端底部优化 */
@media (max-width: 768px) {
    .footer-container {
        padding: 20px 15px 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .footer-section {
        padding: 0;
    }
    
    .footer-section h4 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .footer-section p {
        font-size: 12px;
    }
    
    .footer-links {
        display: flex;
        justify-content: center;
        gap: 20px;
    }
    
    .footer-links li {
        margin-bottom: 0;
    }
    
    .footer-links a {
        font-size: 12px;
    }
    
    .footer-bottom {
        padding-top: 12px;
    }
    
    .footer-bottom p {
        font-size: 11px;
        margin: 2px 0;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 15px 12px 12px;
    }
    
    .footer-content {
        gap: 15px;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    .footer-links a {
        font-size: 11px;
    }
}

/* 服务选项 */
.service-options {
    margin-bottom: 30px;
}

.service-option {
    border: 2px solid var(--border-color);
    padding: 25px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.service-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.2);
}

.service-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    box-shadow: 0 8px 25px rgba(0,123,255,0.3);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.service-name {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 10px;
}

.service-price {
    font-size: 24px;
    color: var(--danger-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.service-desc {
    font-size: 14px;
    color: var(--text-light);
}

/* 金额选项 */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.amount-option {
    border: 2px solid var(--border-color);
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.amount-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.2);
}

.amount-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.amount-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color);
}

/* 支付选项 */
.pay-option {
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.pay-option:hover:not(.disabled) {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.pay-option.selected:not(.disabled) {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    box-shadow: 0 3px 10px rgba(0,123,255,0.2);
}

.pay-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pay-icon {
    width: 50px;
    height: 50px;
    margin-right: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 1px solid var(--border-color);
}

.pay-info {
    flex: 1;
}

.pay-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 16px;
    color: var(--text-color);
}

.pay-desc {
    color: var(--text-light);
    font-size: 14px;
}

.pay-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--success-color);
    color: white;
    margin-left: 10px;
}

.pay-status.unavailable {
    background: var(--danger-color);
}

/* 数量选择器 */
.count-selector {
    margin-bottom: 30px;
}

.count-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.count-label {
    font-weight: 600;
    color: var(--text-color);
    min-width: 100px;
}

.count-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

.count-unit {
    color: var(--text-light);
    min-width: 30px;
}

/* 费用信息 */
.cost-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid var(--success-color);
}

.cost-info.insufficient-balance {
    background: #f8d7da;
    border-left-color: var(--danger-color);
    color: #721c24;
}

.cost-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    text-align: center;
    margin: 20px 0;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay .loading-spinner {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 18px;
    color: var(--text-color);
    font-weight: bold;
}

/* 分页 */
.pagination {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

.pagination .btn {
    margin: 0 5px;
}

.pagination .btn-active {
    background: var(--success-color);
    color: white;
    border: none;
}

/* 筛选器 */
.filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

/* 操作按钮组 */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.action-button {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

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

.action-button .icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.action-button .text {
    font-weight: 600;
}

/* 用户信息区域 */
.user-info-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
}

.user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* 媒体查询 - 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .content-box {
        padding: 20px 15px;
        margin: 10px 0;
        border-radius: 10px;
    }
    
    /* 移动端导航 */
    .mobile-menu-btn {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-hover);
        z-index: 1000;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    /* 页面头部调整 */
    .page-header {
        text-align: center;
    }
    
    .page-actions {
        justify-content: center;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    /* 统计卡片调整 */
    .stat-card {
        padding: 20px 15px;
    }
    
    /* 网格调整 */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 表单调整 */
    .form-control {
        font-size: 16px;
    }
    
    /* 表格调整 */
    .data-table {
        font-size: 14px;
        min-width: unset;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
    
    /* 隐藏不重要的表格列 */
    .data-table-mobile td:nth-child(n+4),
    .data-table-mobile th:nth-child(n+4) {
        display: none;
    }
    
    /* 服务选项调整 */
    .service-option,
    .pay-option {
        padding: 15px;
    }
    
    .pay-option {
        flex-direction: column;
        text-align: center;
    }
    
    .pay-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    /* 用户菜单调整 */
    .user-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        border-radius: 0;
    }
    
    /* 底部调整 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    /* 余额信息调整 */
    .balance-amount {
        font-size: 32px;
    }
    
    /* 操作按钮调整 */
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    /* 费用网格调整 */
    .cost-grid {
        grid-template-columns: 1fr;
    }
    
    /* 数量选择器调整 */
    .count-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .count-label {
        min-width: auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .content-box {
        padding: 15px 10px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .amount-grid {
        grid-template-columns: 1fr;
    }
    
    .header-container {
        padding: 0 15px;
    }
    
    .auth-links {
        gap: 10px;
    }
    
    .auth-link {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .service-icon {
        font-size: 36px;
    }
    
    .service-name {
        font-size: 18px;
    }
    
    .service-price {
        font-size: 20px;
    }
    
    .balance-amount {
        font-size: 28px;
    }
    
    /* 搜索框修正 - 保持水平布局 */
    .search-form .input-group {
        flex-direction: row !important;
    }
    
    .search-form .input-group .form-control {
        border-radius: 8px 0 0 8px !important;
        border-right: none !important;
    }
    
    .search-form .input-group .btn {
        border-radius: 0 8px 8px 0 !important;
        width: auto !important;
        min-width: 80px;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.ml-1 { margin-left: 10px; }
.ml-2 { margin-left: 20px; }

.mr-1 { margin-right: 10px; }
.mr-2 { margin-right: 20px; }

.p-0 { padding: 0; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.flex-1 { flex: 1; }
.flex-column { flex-direction: column; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

.visibility-hidden { visibility: hidden; }
.visibility-visible { visibility: visible; }

.border-0 { border: 0; }
.border-1 { border: 1px solid var(--border-color); }
.border-2 { border: 2px solid var(--border-color); }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 15px; }
.rounded-circle { border-radius: 50%; }

.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-hover); }
.shadow-none { box-shadow: none; }

.bg-white { background: white; }
.bg-transparent { background: transparent; }
.bg-primary { background: var(--primary-color); }
.bg-success { background: var(--success-color); }
.bg-danger { background: var(--danger-color); }
.bg-warning { background: var(--warning-color); }
.bg-info { background: var(--info-color); }
.bg-light { background: #f8f9fa; }

.text-white { color: white; }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-muted { color: var(--text-light); }
.text-dark { color: var(--text-color); }

.font-weight-normal { font-weight: 400; }
.font-weight-medium { font-weight: 500; }
.font-weight-semibold { font-weight: 600; }
.font-weight-bold { font-weight: 700; }

.font-size-sm { font-size: 12px; }
.font-size-base { font-size: 14px; }
.font-size-lg { font-size: 16px; }
.font-size-xl { font-size: 18px; }
.font-size-2xl { font-size: 20px; }

/* 桌面端显示类 */
@media (min-width: 769px) {
    .d-md-none { display: none; }
    .d-md-block { display: block; }
    .d-md-flex { display: flex; }
    .d-md-grid { display: grid; }
    
    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .main-nav {
        display: flex !important;
    }
    
    .mobile-menu-btn {
        display: none;
    }
}

/* 移动端显示类 */
@media (max-width: 768px) {
    .d-sm-none { display: none; }
    .d-sm-block { display: block; }
    .d-sm-flex { display: flex; }
    .d-sm-grid { display: grid; }
}

/* 内容模块样式 */
.categories-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-color);
    text-decoration: none;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.article-excerpt {
    line-height: 1.6;
    color: var(--text-light);
}

/* 文章详情页样式 */
.article-detail .article-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.article-content.prose {
    line-height: 1.8;
    font-size: 16px;
}

.article-content.prose h1,
.article-content.prose h2,
.article-content.prose h3,
.article-content.prose h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.article-content.prose h1 { font-size: 1.8em; }
.article-content.prose h2 { font-size: 1.5em; }
.article-content.prose h3 { font-size: 1.3em; }
.article-content.prose h4 { font-size: 1.1em; }

.article-content.prose p {
    margin-bottom: 1em;
}

.article-content.prose ul,
.article-content.prose ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.article-content.prose li {
    margin-bottom: 0.5em;
}

.article-content.prose blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1em;
    margin-left: 0;
    color: var(--text-light);
    font-style: italic;
}

/* 协议页面样式 */
.protocol-page .protocol-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
}

.protocol-content.prose {
    line-height: 1.8;
    font-size: 16px;
}

/* 相关文章 */
.related-articles h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

.related-item .related-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.related-item .related-title a:hover {
    color: var(--primary-color);
}

/* 搜索表单 */
.search-form .input-group {
    max-width: 500px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.pagination-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 空状态 */
.empty-state {
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    opacity: 0.5;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .categories-filter {
        gap: 8px;
    }
    
    .categories-filter .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .article-detail .article-title {
        font-size: 20px;
    }
    
    .article-meta {
        gap: 10px;
    }
    
    .article-content.prose {
        font-size: 15px;
    }
    
    .protocol-page .protocol-title {
        font-size: 22px;
    }
    
    .pagination-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-state-icon {
        font-size: 48px;
    }
}

@media (max-width: 480px) {
    .article-card {
        padding: 15px;
    }
    
    .article-title {
        font-size: 16px;
    }
    
    .article-meta {
        font-size: 12px;
    }
}
/* 前台搜索框靠左 */
.search-form .input-group {
    max-width: 500px;
    margin: 0; /* 移除居中 */
}

.checkbox {
    margin: 15px 0;
}

.checkbox label {
    font-weight: normal;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.checkbox a {
    color: #007bff;
    margin-left: 4px;
}

.checkbox a:hover {
    text-decoration: underline;
}