* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft Yahei', Arial, sans-serif; background: #f7f7f7; color: #333; }
a { color: #28a745; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.site-header { background: #111; color: #fff; }
.site-header .nav { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 12px 0; 
}
.site-header a { color: #fff; margin-left: 16px; position: relative; }
.site-title a { font-weight: 700; font-size: 18px; }

/* 用户下拉菜单样式 */
.user-dropdown { 
    position: relative; 
    display: inline-block; 
    margin-left: 16px;
}
.dropdown-toggle { 
    background: none; 
    border: none; 
    color: #fff; 
    cursor: pointer; 
    padding: 0; 
    font-size: 14px; 
    font-family: inherit;
}
.dropdown-toggle:hover { 
    color: #ccc; 
}
.dropdown-menu { 
    display: none; 
    position: absolute; 
    top: 100%; 
    right: 0; 
    background: #fff; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    min-width: 120px; 
    z-index: 1000;
    margin-top: 8px;
    /* 增加延迟关闭时间 */
    transition: opacity 0.2s ease;
}
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #fff;
}
.dropdown-menu a { 
    display: block; 
    padding: 10px 16px; 
    color: #333; 
    text-decoration: none; 
    border-bottom: 1px solid #eee; 
    margin: 0;
}
.dropdown-menu a:last-child { 
    border-bottom: none; 
}
.dropdown-menu a:hover { 
    background: #f5f5f5; 
    color: #28a745;
}
/* 移除CSS hover效果，现在由JavaScript控制 */
/* .user-dropdown:hover .dropdown-menu { 
    display: block; 
} */

/* 增加下拉菜单的稳定性 - 防止意外关闭 */
.dropdown-menu:hover {
    display: block !important;
}

/* 为下拉菜单添加一个小的延迟区域，防止鼠标移动时意外关闭 */
.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1;
}
.header-search { 
    position: absolute; 
    left: 50%; 
    transform: translateX(-50%);
    display: flex; 
    justify-content: center; 
}
.header-search * { 
    box-sizing: border-box; 
}
@media (max-width: 768px) {
    .site-header .nav { 
        flex-wrap: wrap; 
        gap: 12px; 
        justify-content: flex-start;
    }
    .header-search { 
        position: static; 
        transform: none; 
        order: 3; 
        flex-basis: 100%; 
        margin-top: 8px; 
    }
}
.header-search form { 
    display: flex !important; 
    align-items: center; 
    gap: 8px; 
    flex-direction: row !important;
}
.header-search input { 
    font-size: 14px; 
    padding: 6px 10px; 
    border: 1px solid #333; 
    border-radius: 4px; 
    background: #fff; 
    color: #333; 
    min-width: 120px;
    width: 120px;
    height: 32px;
    box-sizing: border-box;
    display: inline-block !important;
    float: none !important;
}
.header-search button { 
    font-size: 14px; 
    padding: 6px 12px; 
    border: 1px solid #333; 
    border-radius: 4px; 
    background: #333; 
    color: #fff; 
    cursor: pointer;
    height: 32px;
    box-sizing: border-box;
    white-space: nowrap;
    display: inline-block !important;
    float: none !important;
}

.site-footer { background: #111; color: #aaa; padding: 16px 0; margin-top: 32px; }

main.container { padding: 16px 0 24px; }

.card { background: #fff; border: 1px solid #eaeaea; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.card h3 { margin: 0 0 8px; }
.card .meta { color: #666; font-size: 13px; }

form .row { display: flex; gap: 16px; flex-wrap: wrap; }
form .col { flex: 1 1 260px; min-width: 240px; }
label { display: block; font-size: 14px; margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="email"], input[type="datetime-local"], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; background: #fff;
}
input[type="date"], select[name="open_hour"] {
  width: auto; padding: 8px 10px; border: 1px solid #bbb; border-radius: 8px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
input[type="date"]:focus, select[name="open_hour"]:focus {
      outline: none; border-color: #28a745; box-shadow: 0 0 0 3px rgba(40,167,69,0.12);
}
textarea { min-height: 120px; }

.btn { display: inline-block; padding: 8px 14px; border: 1px solid #28a745; background: #28a745; color: #fff; border-radius: 6px; cursor: pointer; }
.btn.secondary { background: #fff; color: #28a745; }
.btn.danger { background: #dc3545; border-color: #dc3545; }
.btn.disabled { opacity: 0.6; pointer-events: none; }
.btn + .btn { margin-left: 8px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tabs { display: flex; gap: 8px; align-items: flex-end; border-bottom: 1px solid #eaeaea; margin-bottom: 12px; }
.tabs .tab { display: inline-block; padding: 8px 12px; border: 1px solid #eaeaea; border-bottom: none; border-radius: 6px 6px 0 0; background: #f8f9fa; color: #333; font-size: 14px; }
.tabs .tab:hover { background: #fff; }
.tabs .tab.active { background: #fff; font-weight: 600; color: #28a745; border-color: #cfd4da; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #eaeaea; border-radius: 6px; overflow: hidden; }
.table th, .table td { padding: 10px; border-bottom: 1px solid #eee; }
.table th { background: #fafafa; text-align: left; font-weight: 600; }
.table.fixed { table-layout: fixed; }
.table .col-title { width: 25%; }
.table .col-time { width: 14%; }
.table .col-features { width: 50%; }
.table .col-actions { width: 80px; text-align: right; }
.table td:last-child { text-align: right; }

/* 可点击的标题和特点样式 */
.clickable .title-link,
.clickable .features-link {
    color: #28a745;
    text-decoration: none;
    transition: color 0.2s ease;
}

.clickable .title-link:hover,
.clickable .features-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 广告标题特殊样式 */
.ad-title {
    color: #e74c3c !important;
    font-weight: bold !important;
    text-shadow: 0 1px 2px rgba(231, 76, 60, 0.3);
    font-size: 16px;
}

.ad-title:hover {
    color: #c0392b !important;
    text-shadow: 0 1px 3px rgba(231, 76, 60, 0.5);
}

/* 小按钮样式 */
.btn.small {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}
.ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* 审核信息表格专用列宽与布局优化 */
.table-audit .col-id { width: 64px; color:#666; }
.table-audit .col-title { min-width: 260px; }
.table-audit .col-type { width: 72px; }
.table-audit .col-status { width: 90px; }
.table-audit .col-actions { width: 360px; }

.table-audit select { height: 32px; }
.table-audit input[type="number"] { height: 32px; }
.table-audit .btn { height: 32px; line-height: 16px; padding: 6px 10px; }

/* 分页优化（通用） */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pagination-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #333; text-decoration: none; font-size: 14px; }
.pagination-btn.active { background: #28a745; color: #fff; border-color: #28a745; }
.pagination-ellipsis { color: #999; padding: 0 4px; }

@media (max-width: 820px) {
	/* 保持横向排布，允许换行 */
	.pagination { flex-direction: row; flex-wrap: wrap; gap: 6px; justify-content: center; }
	.pagination-btn { min-width: 40px; height: 40px; padding: 0 12px; font-size: 15px; }
	/* 跳转区域在手机端靠下显示可隐藏或缩小，这里缩小 */
	.pagination-jump { width: 100%; text-align: center; margin-top: 8px !important; }
}

/* 推广大表（用户直推明细）在手机端的对齐布局 */
@media (max-width: 820px) {
	.table.aff-detail { width: 100%; border-collapse: separate; }
	.table.aff-detail thead { display: block !important; }
	.table.aff-detail thead tr { display: grid !important; grid-template-columns: minmax(120px,1fr) 106px 106px; align-items: center; }
	.table.aff-detail thead th { display: block; padding: 8px 8px; }
	.table.aff-detail tbody tr { display: grid !important; grid-template-columns: minmax(120px,1fr) 106px 106px; align-items: center; }
	.table.aff-detail th, .table.aff-detail td { padding: 8px 8px; }
	.table.aff-detail td:nth-child(2),
	.table.aff-detail thead th:nth-child(2) { text-align: center; }
	.table.aff-detail td:nth-child(3),
	.table.aff-detail thead th:nth-child(3) { text-align: right; }
}

/* 手机端后台审核列表（posts 审核）易用性增强 */
@media (max-width: 820px) {
	/* 将审核表转换为卡片式，按钮不再被挤出视口 */
	.table-audit thead { display: none; }
	.table-audit tbody tr { display: block; padding: 10px 12px; border-bottom: 8px solid #f5f5f5; }
	.table-audit td { display: block; padding: 6px 0; }
	.table-audit .col-title { font-weight: 600; margin-bottom: 4px; }
	.table-audit .col-type, .table-audit .col-status { color: #666; font-size: 13px; }
	/* 操作按钮区域换行显示且更大点击面积 */
	.table-audit .col-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
	.table-audit .col-actions .btn { padding: 8px 12px; font-size: 14px; }
}

/* 管理后台手机端优化 */
@media (max-width: 820px) {
	/* 顶部标签可换行且易点击 */
	.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
	.tabs .tab { flex: 1 1 auto; min-width: 120px; padding: 12px 10px; font-size: 14px; }
	.sub-tabs { flex-wrap: wrap; padding: 0 12px; }
	.sub-tab { padding: 10px 12px; font-size: 14px; }

	/* 工具栏与筛选表单垂直排列 */
	.toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
	.toolbar > div { flex-wrap: wrap; }
	.search-form, .date-filter { flex-direction: column; align-items: stretch; gap: 10px; }
	.search-form input, .search-form select, .date-filter input { width: 100%; }

	/* 表格在手机端横向滚动，避免错位/挤压 */
	.table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.table thead, .table tbody, .table tr { display: table; width: 100%; table-layout: fixed; }
	.table th, .table td { white-space: nowrap; }

	/* 小按钮更大可点区域 */
	.btn.small { padding: 8px 10px; font-size: 14px; }

	/* 卡片留白统一 */
	.card { padding: 16px; }

	/* 分页按钮换行且居中 */
	.pagination { flex-wrap: wrap; justify-content: center; gap: 8px; }

	/* 统计卡片与趋势网格改为单列 */
	.overview-cards { grid-template-columns: 1fr; }
	.summary-grid { grid-template-columns: 1fr; }
	.trend-data { grid-template-columns: 1fr; }

	/* 后台排行榜：名次与用户名更紧凑，用户名可省略显示 */
	.table.rankings { width: 100%; table-layout: fixed; }
	.table.rankings th:nth-child(1),
	.table.rankings td:nth-child(1) { width: 56px; }
	.table.rankings th:nth-child(2),
	.table.rankings td:nth-child(2) { width: auto; max-width: none; }
	.table.rankings td:nth-child(2) strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.table.rankings th:nth-child(3),
	.table.rankings td:nth-child(3) { width: 92px; text-align: right; }
	.table.rankings th:nth-child(4),
	.table.rankings td:nth-child(4) { width: 96px; }
}

.alert { padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }
.alert.success { background: #e7f6ec; color: #20794d; border: 1px solid #bfe6cc; }
.alert.error { background: #fde8e8; color: #b42318; border: 1px solid #f5c2c7; }

.badge { display: inline-block; padding: 2px 8px; font-size: 12px; border-radius: 999px; border: 1px solid transparent; }
.badge.success { background: #e7f6ec; color: #20794d; border-color: #bfe6cc; }
.badge.warning { background: #fff4e5; color: #ad6800; border-color: #ffd591; }
.badge.danger { background: #fde8e8; color: #b42318; border-color: #f5c2c7; }

.dot { position: absolute; right: -6px; top: -4px; width: 8px; height: 8px; background: #dc3545; border-radius: 50%; display: inline-block; }

.cat-nav { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px 12px; 
    margin-bottom: 12px; /* 为所有分类导航添加统一的底部间距 */
}
.cat-nav:last-child { 
    margin-bottom: 0; /* 最后一个分类导航不需要底部间距 */
}
.cat-nav a { display: inline-block; padding: 6px 10px; border: 1px solid #ddd; border-radius: 999px; background: #fff; color: #333; }
.cat-nav a.active { background: #28a745; color: #fff; border-color: #28a745; }

/* 后台管理优化样式 */
/* 管理后台分页样式 */
.pagination {
    margin: 30px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .btn {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pagination .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.pagination .btn.secondary {
    background: #28a745;
    color: white;
    border: 2px solid #28a745;
}

.pagination .btn.secondary:hover {
    background: #218838;
    border-color: #218838;
}

/* 管理后台徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.badge.danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.badge.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 搜索表单样式 */
.toolbar form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toolbar input[type="text"],
.toolbar input[type="email"],
.toolbar input[type="password"],
.toolbar select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.toolbar input[type="text"]:focus,
.toolbar input[type="email"]:focus,
.toolbar input[type="password"]:focus,
.toolbar select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* 统计信息样式 */
.statistics-info {
    margin: 16px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #666;
    border-left: 4px solid #007bff;
}

/* 管理后台工具栏样式 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.toolbar > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar .btn {
    white-space: nowrap;
}

/* 管理后台表格样式优化 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.table td {
    color: #666;
    font-size: 14px;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* 用户详情页面样式 */
.card h4 {
    margin: 0 0 16px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.card .row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.card .col {
    flex: 1 1 200px;
    min-width: 200px;
}

.card input[readonly] {
    background: #f8f9fa;
    color: #666;
    cursor: not-allowed;
}

.card .statistics-info {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 8px 0;
}

.card .statistics-info .number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.card .statistics-info .label {
    color: #666;
    font-size: 14px;
}

/* 危险操作区域样式 */
.card[style*="border-color: #dc3545"] {
    background: #fff5f5;
}

.card[style*="border-color: #dc3545"] h4 {
    border-bottom-color: #dc3545;
}

/* 最后登录时间样式 */
.card input[value*="从未登录"] {
    color: #999;
    font-style: italic;
}

.card input[value*="最后登录"] {
    color: #28a745;
    font-weight: 500;
}

/* 密码修改表单特殊样式 */
.card input[type="password"] {
    font-family: monospace;
    letter-spacing: 2px;
}

.card input[type="password"]::placeholder {
    font-family: inherit;
    letter-spacing: normal;
}

.card .btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 数字输入框样式 */
.card input[type="number"] {
    font-family: inherit;
    text-align: right;
    padding-right: 16px;
}

.card input[type="number"]::-webkit-outer-spin-button,
.card input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.card input[type="number"] {
    -moz-appearance: textfield;
}

/* K币调整表单样式 */
.card form[action*="adjust_kcoins"] input[type="number"],
.card input[name="amount"],
input[type="number"][name*="kcoin"],
input[type="number"][name*="amount"] {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.card form[action*="adjust_kcoins"] input[type="number"]:focus,
.card input[name="amount"]:focus,
input[type="number"][name*="kcoin"]:focus,
input[type="number"][name*="amount"]:focus {
    background: #ffffff;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
    transform: translateY(-1px);
}

.card form[action*="adjust_kcoins"] select {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.card form[action*="adjust_kcoins"] select:focus {
    background: #ffffff;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

/* 详情页长内容自动换行 */
.post-content {
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

/* 管理后台内部导航标签 */
.sub-tabs {
    display: flex;
    gap: 0;
    margin: 20px 0;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 6px 6px 0 0;
    padding: 0 20px;
}

.sub-tab {
    display: inline-block;
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.sub-tab:hover {
    color: #28a745;
    background: #e9ecef;
    text-decoration: none;
}

.sub-tab.active {
    color: #28a745;
    border-bottom-color: #28a745;
    background: #fff;
    font-weight: 600;
}

/* 管理后台主导航优化 */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tabs .tab {
    flex: 1;
    text-align: center;
    padding: 16px 12px;
    text-decoration: none;
    color: #666;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.tabs .tab:last-child {
    border-right: none;
}

.tabs .tab:hover {
    color: #28a745;
    background: #e9ecef;
    text-decoration: none;
}

.tabs .tab.active {
    color: #fff;
    background: #28a745;
    font-weight: 600;
}

/* 管理后台链接网格布局 */
.grid-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.grid-links .btn {
    text-align: center;
    padding: 12px 16px;
    font-size: 14px;
    white-space: nowrap;
}

/* 管理后台卡片样式优化 */
.card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

/* 管理后台搜索表单样式 */
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

.search-form input[type="text"]:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

/* 管理后台统计信息样式 */
.stats-info {
    margin: 16px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    border-left: 4px solid #28a745;
    font-size: 14px;
}

.stats-info strong {
    color: #333;
    font-weight: 600;
}

/* 管理后台批量操作样式 */
.bulk-actions {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.bulk-actions .btn.small {
    padding: 6px 12px;
    font-size: 13px;
}

/* 管理后台小按钮样式 */
.btn.small {
    padding: 6px 12px;
    font-size: 13px;
    min-width: auto;
}

.btn.disabled {
    background: #6c757d;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn.disabled:hover {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

/* VIP等级编辑表单样式 */
.vip-edit-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vip-edit-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
}

.vip-edit-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vip-edit-form label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vip-edit-form input[type="text"],
.vip-edit-form input[type="number"] {
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.vip-edit-form input[type="text"]:focus,
.vip-edit-form input[type="number"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    transform: translateY(-1px);
}

.vip-edit-form .btn-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.vip-edit-form .btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.vip-edit-form .btn[type="submit"] {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.vip-edit-form .btn[type="submit"]:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.vip-edit-form .btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border: none;
    color: white;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.vip-edit-form .btn.secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.4);
}

/* 手机端VIP编辑表单适配 */
@media (max-width: 768px) {
    .vip-edit-form {
        padding: 15px;
        margin: 8px 0;
    }
    
    .vip-edit-form .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .vip-edit-form input[type="text"],
    .vip-edit-form input[type="number"] {
        padding: 12px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .vip-edit-form .btn-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .vip-edit-form .btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}

/* 推广用户记录表格样式 */
.referred-users-table {
    margin-top: 15px;
}

.referred-users-table .table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.referred-users-table .table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.referred-users-table .table td {
    border-bottom: 1px solid #f1f3f4;
    padding: 12px 8px;
}

.referred-users-table .consumption-amount {
    font-weight: 600;
    color: #28a745;
}

.referred-users-table .referrer-name {
    color: #007bff;
    font-weight: 500;
}

.referred-users-table .register-date {
    color: #6c757d;
    font-size: 13px;
}

/* 手机端推广用户记录表格适配 */
@media (max-width: 768px) {
    .referred-users-table .table {
        font-size: 13px;
    }
    
    .referred-users-table .table th,
    .referred-users-table .table td {
        padding: 8px 6px;
    }
    
    .referred-users-table .table th:nth-child(3),
    .referred-users-table .table td:nth-child(3) {
        display: none; /* 隐藏注册时间列 */
    }
}

/* 公告系统样式 */
.announcement-marquee {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.4);
    border: 2px solid #3498db;
}

.announcement-marquee .marquee-content {
    display: flex;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
}

.announcement-marquee .announcement-item {
    display: inline-block;
    margin-right: 50px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: colorChange 4s ease-in-out infinite; /* 快速变色效果 */
    position: relative;
}

.announcement-marquee .announcement-item:hover {
    background: rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
    animation-play-state: paused; /* 悬停时暂停动画 */
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
    border: 1px solid rgba(52, 152, 219, 0.6);
}

/* 跑马灯公告标题快速变色动画 */
@keyframes colorChange {
    0% { color: #ffffff; }
    20% { color: #ffffcc; }
    40% { color: #e6f3ff; }
    60% { color: #f0fff0; }
    80% { color: #fff8dc; }
    100% { color: #ffffff; }
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 公告弹窗样式 */
.announcement-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.announcement-popup .popup-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.announcement-popup .popup-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f4;
}

.announcement-popup .popup-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: center;
}



.announcement-popup .popup-body {
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.announcement-popup .popup-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f1f3f4;
}

.announcement-popup .popup-settings {
    margin-bottom: 15px;
    text-align: left;
}

.announcement-popup .popup-settings label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.announcement-popup .popup-settings input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.announcement-popup .popup-close-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.announcement-popup .popup-close-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.announcement-popup .popup-close-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.announcement-popup .popup-close-btn .close-icon {
    font-size: 18px;
    font-weight: bold;
}

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

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

/* 公告详情页样式 */
.announcement-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.announcement-detail .detail-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f3f4;
}

.announcement-detail .detail-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.announcement-detail .detail-meta {
    color: #666;
    font-size: 14px;
}

.announcement-detail .detail-content {
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}

/* 管理后台公告样式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.primary { background: #007bff; color: white; }
.badge.warning { background: #ffc107; color: #212529; }
.badge.success { background: #28a745; color: white; }
.badge.danger { background: #dc3545; color: white; }
.badge.secondary { background: #6c757d; color: white; }

/* 模态框样式 */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: none !important; /* 默认隐藏 */
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
    /* 确保没有其他样式影响定位 */
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    /* 额外的居中保障 */
    box-sizing: border-box !important;
    overflow: hidden !important;
    /* 禁用背景点击事件，防止意外关闭 */
    pointer-events: none !important;
}

/* 当modal显示时的样式 */
.modal.show {
    display: flex !important;
}

/* 确保modal默认隐藏 */
.modal:not(.show) {
    display: none !important;
}

.modal-content {
    background: white !important;
    border-radius: 8px !important;
    padding: 30px !important;
    max-width: 800px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    position: relative !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    /* 确保没有其他样式影响定位 */
    margin: 0 !important;
    transform: none !important;
    float: none !important;
    /* 额外的显示保障 */
    box-sizing: border-box !important;
    display: block !important;
    /* 重新启用点击事件，让用户可以与表单交互 */
    pointer-events: auto !important;
}

.modal .close {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    font-size: 24px !important;
    cursor: pointer !important;
    color: #666 !important;
    background: none !important;
    border: none !important;
    padding: 5px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.modal .close:hover {
    color: #333 !important;
    background: #f1f3f4 !important;
}

/* 公告铃铛图标样式 */
.announcement-bell {
    font-size: 18px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.announcement-bell:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: scale(1.1);
}

/* 手机端公告适配 */
@media (max-width: 768px) {
    .announcement-marquee {
        padding: 8px 0;
        margin-bottom: 12px;
        border-radius: 6px;
    }
    
    .announcement-marquee .announcement-item {
        font-size: 14px;
        margin-right: 35px;
        padding: 4px 8px;
        font-weight: 600;
    }
    
    .announcement-popup .popup-content {
        padding: 20px;
        width: 95%;
    }
    
    .announcement-popup .popup-title {
        font-size: 20px;
    }
    
    .announcement-popup .popup-footer {
        padding-top: 15px;
    }
    
    .announcement-popup .popup-close-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .announcement-detail .detail-title {
        font-size: 22px;
    }
    
    .modal-content {
        padding: 20px !important;
        width: 95% !important;
        margin: 10px !important;
    }
    
    .modal {
        padding: 10px !important;
    }
    
    .announcement-bell {
        font-size: 16px;
        padding: 6px;
    }
}

/* 主页内容文字大小优化 - 仅影响手机端 */
@media (max-width: 768px) {
.table {
    font-size: 13px; /* 从14px缩小到13px */
}

.table th {
    font-size: 13px;
    padding: 8px 6px; /* 进一步减小padding */
}

.table td {
    font-size: 13px;
    padding: 6px 4px; /* 进一步减小padding */
}

.title-link {
    font-size: 13px;
}

.features-link {
    font-size: 12px; /* 特点文字更小 */
    color: #666;
}

.btn.small {
    font-size: 12px;
    padding: 3px 6px; /* 进一步减小按钮padding */
}

/* 表格行高优化 */
.table tbody tr {
    line-height: 1.2; /* 进一步减小行高 */
}

/* 表格行间距优化 */
.table tbody tr {
    margin-bottom: 2px; /* 减小行间距 */
}

.table tbody tr td {
    border-bottom: 1px solid #f0f0f0; /* 添加细线分隔 */
}

/* 卡片内容优化 */
.card {
    padding: 14px; /* 进一步减小padding */
}

.card h3 {
    font-size: 16px; /* 减小标题大小 */
    margin-bottom: 10px;
    }
}

/* CSS variable for header height */
:root {
	--header-h: 56px;
}

/* 手机端适配样式 */
@media (max-width: 768px) {
	/* 导航条锁定样式 */
	.site-header {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 1000;
		box-shadow: 0 2px 8px rgba(0,0,0,0.1);
		transition: transform 0.3s ease;
		background: #111;
		border-bottom: 1px solid #333;
	}

	/* 为固定导航条留出空间（使用实际高度变量） */
	body {
		padding-top: var(--header-h, 56px);
	}

	/* 导航条隐藏时的样式 */
	.site-header.nav-hidden { transform: translateY(-100%); }
	.site-header.nav-visible { transform: translateY(0); }

	/* 导航内部在手机端纵向排列，避免拥挤导致增高叠盖 */
	.site-header .nav {
		padding: 8px 0;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	/* 搜索表单充满整行 */
	.header-search { position: static; transform: none; margin: 6px 0; width: 100%; }
	.header-search input { width: 100%; max-width: none; }

	/* 隐藏特点列和操作列（通过类名与备选 nth-child） */
	.table .col-features,
	.table .col-actions { display: none; }
	.table thead th:nth-child(3),
	.table thead th:nth-child(4),
	.table tbody td:nth-child(3),
	.table tbody td:nth-child(4) { display: none; }

	/* 表格在手机端的可读性与分隔增强 */
	.table { font-size: 14px; }
	.table th, .table td { padding: 12px 10px; /* 足够触摸区域 */ }

	/* 移除可能造成错位的 flex 布局，保持表格单元格默认布局 */
	/* 覆盖之前的设置，确保不使用 flex 以防止列对不齐 */
	.table th, .table td { display: table-cell; vertical-align: middle; }

	/* 行分隔更清晰：加粗分隔与斑马纹 */
	.table tbody tr td { border-bottom: 8px solid #f5f5f5; }
	.table tbody tr { background: #fff; }
	.table tbody tr:nth-child(odd) { background: #fcfcfc; }

	/* 分类导航与内容留白 */
	.cat-nav { margin-top: 6px; }

	/* 分页在手机端换行居中 */
	.pagination { flex-wrap: wrap; gap: 6px; justify-content: center; }
	.pagination .btn { min-width: 36px; height: 36px; font-size: 13px; padding: 6px 8px; }
}

/* 扩大手机端断点到 820px，兼容更多手机浏览器 */
@media (max-width: 820px) {
	/* 强化隐藏特点/详情列（使用!important提升优先级，兼容部分浏览器解析差异） */
	.table .col-features,
	.table .col-actions { display: none !important; }
	.table thead th:nth-child(3),
	.table thead th:nth-child(4),
	.table tbody td:nth-child(3),
	.table tbody td:nth-child(4) { display: none !important; }

	/* body 顶部留白采用变量 + 回退值 */
	body { padding-top: var(--header-h, 56px) !important; }

	/* 导航内部堆叠，避免X浏览器内核下的错位 */
	.site-header .nav { flex-direction: column; align-items: stretch; gap: 8px; }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .table .col-title {
        width: 65%;
    }
    
    .table .col-time {
        width: 35%;
    }
    
    .table th,
    .table td {
        padding: 8px 6px;
        font-size: 13px;
    }
    
    .card {
        padding: 12px;
    }
    
    .card h3 {
        font-size: 15px;
    }
    
    .site-header .nav {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .site-title {
        text-align: center;
    }
    
    .user-dropdown {
        text-align: center;
        margin-left: 0;
    }
}

/* 确保在手机端点击整行都能进入帖子详情 */
@media (max-width: 820px) {
    .table tbody tr {
        position: relative;
    }
    
    .table tbody tr::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
    }
    
    .table tbody tr .title-link {
        position: relative;
        z-index: 2;
    }
    
    /* 添加触摸反馈 */
    .table tbody tr:active {
        background-color: #e9ecef;
        transform: scale(0.98);
    }
}

/* 功能提示样式 */
.mobile-tips {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 13px;
    color: #1976d2;
    display: none;
}

.mobile-tips.show {
    display: block;
}

.mobile-tips .tip-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1565c0;
}

.mobile-tips .tip-content {
    line-height: 1.5;
}

.mobile-tips .tip-close {
    float: right;
    background: none;
    border: none;
    color: #1976d2;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin: -8px -8px 0 0;
}

/* 导航条状态指示器 */
.nav-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #28a745;
    z-index: 1001;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-indicator.visible {
    transform: scaleX(1);
}

/* 当导航条隐藏时，显示指示器 */
.site-header.nav-hidden + .nav-indicator {
    transform: scaleX(1);
}

/* 手机端触摸优化和滚动优化 */
@media (max-width: 768px) {
    /* 触摸优化 */
    .table tbody tr {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* 滚动优化 */
    body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* 确保在手机端有足够的触摸区域 */
    .table th,
    .table td {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 820px) {
	/* 单行显示：固定两列比例并禁止换行 */
	.table.fixed { table-layout: fixed; }
	.table .col-title { width: 70% !important; }
	.table .col-time { width: 30% !important; text-align: right; }
	/* 兼容未加类名的单元格：第二列为开服时间，右对齐 */
	.table thead th:nth-child(2),
	.table tbody td:nth-child(2) { text-align: right !important; }
	.table td, .table .title-link, .table .col-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* 超小/手机端触摸与布局优化（修正为不使用flex以避免两行） */
@media (max-width: 768px) {
	/* 触摸优化 */
	.table tbody tr { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
	
	/* 滚动优化 */
	body { -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
	
	/* 保持表格单元格为表格布局，避免换行成两行 */
	.table th,
	.table td { min-height: 44px; display: table-cell; align-items: center; vertical-align: middle; }
}

/* 手机端：隐藏表头，保持每条只一行（标题+时间） */
@media (max-width: 820px) {
	.table thead { display: none; }
}

@media (max-width: 820px) {
	/* 右侧时间紧贴右边对齐（保留少量内边距） */
	.table .col-time { text-align: right; padding-right: 6px !important; }
	.table thead th:nth-child(2),
	.table tbody td:nth-child(2) { text-align: right !important; padding-right: 6px !important; }
}

@media (max-width: 820px) {
	/* 时间列紧贴右侧：去除右内边距与多余分隔影响 */
	.table tbody td:nth-child(2) {
		text-align: right !important;
		padding-right: 0 !important;
		border-right: 0 !important;
	}
	/* 行分隔使用极细线，避免看起来内缩 */
	.table tbody tr td { border-bottom: 1px solid #f0f0f0; }
}

@media (max-width: 820px) {
	/* 防止表格在某些Linux内核上溢出卡片 */
	.card { overflow: hidden; }
	.table { width: 100% !important; max-width: 100% !important; table-layout: fixed !important; box-sizing: border-box; }
	.table tbody td:first-child { width: auto !important; }
	.table tbody td:nth-child(2) { width: 8ch !important; }
}

@media (max-width: 820px) {
	/* 取消外扩，避免标题背景超出卡片 */
	.card > .table { margin-right: 0; width: 100%; }

	/* 列宽与间距：时间固定宽度，标题自适应；两列间约2字符间距 */
	.table.fixed { table-layout: auto; }
	.table .col-time { width: 9ch !important; text-align: right; }
	.table .col-title { width: auto !important; }
	/* 兼容未加类名：第二列为时间列，右对齐与固定宽度 */
	.table tbody td:nth-child(2) { text-align: right !important; width: 9ch; padding-left: 0 !important; padding-right: 0 !important; }
	/* 第一列（标题）右侧留约2字符的间隔 */
	.table tbody td:first-child { padding-right: 2ch !important; }

	/* 保持单行省略 */
	.table td, .table .title-link, .table .col-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 820px) {
	/* 列宽与间距（再收紧） */
	.table .col-time { width: 8ch !important; min-width: 8ch !important; max-width: 8.5ch !important; text-align: right; }
	.table .col-title { width: auto !important; }
	.table tbody td:nth-child(2) { text-align: right !important; width: 8ch !important; min-width: 8ch !important; max-width: 8.5ch !important; padding-left: 0 !important; padding-right: 0 !important; }
	.table tbody td:nth-child(2) a { display: inline-block; width: 100%; text-align: right; }
	.table tbody td:first-child { padding-right: 2ch !important; }
}

@media (max-width: 820px) {
	/* 卡片右侧无内边距，时间更靠右 */
	.card { padding-right: 0 !important; overflow: hidden; }
	/* 抵消容器右侧内边距（一般16px），让表格视觉更贴近屏幕右侧而不破卡片边框 */
	.card > .table { margin-right: -16px; width: calc(100% + 16px); }
	/* 时间列零内边距并右对齐 */
	.table tbody td:nth-child(2) { text-align: right !important; padding-right: 0 !important; }
}

@media (max-width: 820px) {
	/* 无论哪一列在最后显示，都贴右对齐并去右内边距 */
	.table tbody td:last-child { text-align: right !important; padding-right: 0 !important; }
}

@media (max-width: 820px) {
	/* 统一左右边距，左右留白一致 */
	.container { padding-left: 12px !important; padding-right: 12px !important; }
	.card { padding-left: 12px !important; padding-right: 12px !important; overflow: hidden; }
	/* 表格不再外扩，宽度100% */
	.card > .table { margin-right: 0 !important; width: 100% !important; }
}

@media (max-width: 820px) {
	/* 列表风格：用 flex 渲染每一行，跨内核更稳定 */
	.table { width: 100% !important; border-collapse: separate; border-spacing: 0; }
	.table thead { display: none; }
	.table tbody tr { display: flex; align-items: center; border-bottom: 1px solid #f0f0f0; }
	.table tbody td { display: block; border: none; padding: 10px 12px; }
	/* 标题列占满剩余空间，单行省略 */
	.table tbody td:first-child { flex: 1 1 auto; min-width: 0; padding-right: 2ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	/* 时间列自适应内容宽度并紧贴右侧 */
	.table tbody td:nth-child(2) { flex: 0 0 auto; text-align: right; padding-right: 0; white-space: nowrap; }
}

/* 排行榜在手机端：三列（排名 | 用户名 | 数值）并与表头对齐 */
@media (max-width: 820px) {
	.table.rankings { width: 100%; border-collapse: separate; }
	.table.rankings thead { display: block !important; }
	.table.rankings thead tr { display: grid !important; grid-template-columns: 44px minmax(120px,1fr) auto; align-items: center; column-gap: 0; }
	.table.rankings thead th { display: block; padding: 8px 8px; }
	/* 隐藏第3列(数值列)标题以及第4列及之后，避免"用户名"与"排名"之间出现大空隙 */
	.table.rankings thead th:nth-child(3) { display: none !important; }
	.table.rankings thead th:nth-child(n+4) { display: none !important; }
	/* 收紧表头两列间距 */
	.table.rankings thead th:nth-child(1) { padding-right: 4px !important; text-align: center; }
	.table.rankings thead th:nth-child(2) { padding-left: 4px !important; }

	.table.rankings tbody tr { display: grid !important; grid-template-columns: 44px minmax(120px,1fr) auto; align-items: center; column-gap: 0; }
	.table.rankings th, .table.rankings td { padding: 8px 8px; }
	.table.rankings td:nth-child(1) { justify-self: center; padding-left: 0 !important; padding-right: 0 !important; }
	.table.rankings td:nth-child(2) { white-space: normal; overflow: visible; text-overflow: clip; padding-left: 0 !important; padding-right: 8px !important; }
	.table.rankings td:nth-child(2) a { display: inline-block; max-width: 100%; white-space: normal; }
	.table.rankings td:nth-child(3),
	.table.rankings thead th:nth-child(3) { text-align: right; }
	.table.rankings tbody td:nth-child(n+4) { display: none !important; }
}

/* 管理后台统一样式 - 确保卡片容器和页签尺寸一致 */
/* 统一管理后台页面容器 */
.admin-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 统一管理后台卡片容器 */
.admin-page .card,
.admin-page > .card {
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

/* 统一管理后台页签容器 */
.admin-page .tabs,
.admin-page > .tabs {
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    box-sizing: border-box;
}

/* 统一管理后台页签样式 */
.admin-page .tabs .tab,
.admin-page > .tabs .tab {
    flex: 1;
    min-width: 0;
    height: 48px;
    line-height: 48px;
    text-align: center;
    padding: 0 12px;
    text-decoration: none;
    color: #666;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.admin-page .tabs .tab:last-child,
.admin-page > .tabs .tab:last-child {
    border-right: none;
}

.admin-page .tabs .tab:hover,
.admin-page > .tabs .tab:hover {
    color: #28a745;
    background: #e9ecef;
    text-decoration: none;
}

.admin-page .tabs .tab.active,
.admin-page > .tabs .tab.active {
    color: #fff;
    background: #28a745;
    font-weight: 600;
}

/* 确保所有管理后台页面都使用统一的容器结构 */
.container .tabs,
.container > .tabs {
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    box-sizing: border-box;
}

.container .tabs .tab,
.container > .tabs .tab {
    flex: 1;
    min-width: 0;
    height: 48px;
    line-height: 48px;
    text-align: center;
    padding: 0 12px;
    text-decoration: none;
    color: #666;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.container .tabs .tab:last-child,
.container > .tabs .tab:last-child {
    border-right: none;
}

.container .tabs .tab:hover,
.container > .tabs .tab:hover {
    color: #28a745;
    background: #e9ecef;
    text-decoration: none;
}

.container .tabs .tab.active,
.container > .tabs .tab.active {
    color: #fff;
    background: #28a745;
    font-weight: 600;
}

/* 统一卡片容器样式 */
.container .card,
.container > .card {
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .admin-page,
    .container {
        padding: 0 12px;
    }
    
    .admin-page .card,
    .admin-page > .card,
    .container .card,
    .container > .card {
        padding: 16px;
        margin: 0 0 16px 0;
    }
    
    .admin-page .tabs,
    .admin-page > .tabs,
    .container .tabs,
    .container > .tabs {
        margin: 0 0 16px 0;
        flex-wrap: wrap;
    }
    
    .admin-page .tabs .tab,
    .admin-page > .tabs .tab,
    .container .tabs .tab,
    .container > .tabs .tab {
        flex: 1 1 auto;
        min-width: 120px;
        height: 44px;
        line-height: 44px;
        font-size: 13px;
        padding: 0 8px;
    }
}

/* 确保页签文字不会换行 */
.tabs .tab {
    word-break: keep-all;
    white-space: nowrap;
}

/* 钱包界面推广员等级样式增强 */
.commission-info {
    background: #f8f9fa !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin-bottom: 20px !important;
    border-left: 4px solid #667eea !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.commission-info .commission-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.commission-info .commission-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.commission-info .commission-tip {
    color: #e74c3c;
    font-weight: 500;
}

.level-rates {
    margin: 8px 0 !important;
    padding: 8px !important;
    background: rgba(255,255,255,0.7) !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    border: 1px solid rgba(0,0,0,0.1);
}

.level-rates .direct-rate {
    color: #28a745 !important;
    font-weight: bold !important;
    margin-bottom: 4px;
}

.level-rates .second-rate {
    color: #17a2b8 !important;
    font-weight: bold !important;
}

.upgrade-benefits {
    margin-top: 20px !important;
    padding: 15px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 8px !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.upgrade-benefits .benefits-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
}

.upgrade-benefits .benefits-content {
    font-size: 13px;
    line-height: 1.6;
}

.upgrade-benefits .current-level-info {
    margin-bottom: 8px;
    padding: 6px 0;
}

.upgrade-benefits .next-level-info {
    margin-bottom: 8px;
    padding: 6px 0;
}

.upgrade-benefits .upgrade-gain {
    background: rgba(255,255,255,0.2);
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.3);
}

.upgrade-benefits .congrats-message {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .commission-info {
        padding: 12px !important;
        margin-bottom: 15px !important;
    }
    
    .level-rates {
        padding: 6px !important;
        font-size: 11px !important;
    }
    
    .upgrade-benefits {
        padding: 12px !important;
        margin-top: 15px !important;
    }
    
    .upgrade-benefits .benefits-content {
        font-size: 12px;
    }
}