/* ============================
   pages.css - 页面布局样式
   包含：认证页、首页、搜索、资源列表、资源详情、
         用户中心、个人主页、激活页、错误页
   后台管理样式已迁移至 admin/css/ 目录独立维护
   ============================ */

/* ========== 认证页面（登录/注册） ========== */
.auth-page {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    padding: 16px 16px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 16px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* 注册/登录页面 - 紧凑表单样式 */
.auth-page .form-group { margin-bottom: 12px; }
.auth-page .form-label { margin-bottom: 3px; }
.auth-page .form-hint { margin-top: 2px; }
.auth-page .field-msg { margin-top: 1px; min-height: 16px; }
.auth-page .pwd-strength { margin-top: 3px; }
.auth-page button[type="submit"] { margin-top: 2px; }

.auth-title {
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

/* 注册提示框 */
.register-tip-closed {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    text-align: center;
}
.register-tip-closed .tip-icon { font-size: 1.3rem; margin-bottom: 4px; }
.register-tip-closed strong { color: #991b1b; font-size: 0.9rem; }
.register-tip-closed p { color: #b91c1c; font-size: .78rem; margin-top: 3px; line-height: 1.4; }

.register-tip-invite {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    text-align: center;
}
.register-tip-invite strong { color: #92400e; font-size: .85rem; }

/* 邀请码输入行（输入框 + 获取按钮） */
.invite-input-row {
    display: flex;
    gap: 8px;
}
.invite-input-row .form-input {
    flex: 1;
}
.btn-invite-get {
    flex-shrink: 0;
    padding: 0 16px;
    font-size: .85rem;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.btn-invite-get:hover { background: #1d4ed8; }
.btn-invite-get:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

/* ========== 首页搜索区域 ========== */
.home-search-section {
    background-color: var(--bg-secondary);
    padding: var(--spacing-2xl) 0;
}

/* 搜索卡片 */
.search-card {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-2xl) var(--spacing-xl);
    text-align: center;
}

/* 站点名称区域 */
.search-card-header {
    margin-bottom: var(--spacing-xl);
}

.search-site-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.search-site-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 搜索框 */
.search-box {
    margin-bottom: var(--spacing-lg);
}

.search-form {
    display: flex;
    gap: var(--spacing-sm);
    background-color: var(--bg-secondary);
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.search-input {
    flex: 1;
    border: none;
    padding: var(--spacing-md);
    font-size: 1rem;
    background: transparent;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    padding: var(--spacing-md) var(--spacing-xl);
}

/* 首页热门搜索标签 */
.home-hot-search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.home-hot-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.home-hot-tag {
    display: inline-block;
    padding: 5px 14px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.home-hot-tag:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 响应式适配 */
@media (max-width: 640px) {
    .search-card {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .search-site-name {
        font-size: 1.4rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }
}

/* ========== 搜索结果页 ========== */
.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.filter-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.filter-select {
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
}

/* ========== 资源卡片 ========== */
.resource-list {
    display: grid;
    gap: var(--spacing-lg);
}

.resource-card {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast);
}

.resource-card:hover {
    box-shadow: var(--shadow-md);
}

.resource-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.resource-content {
    flex: 1;
    min-width: 0;
}

.resource-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.resource-title a {
    color: inherit;
}

.resource-title a:hover {
    color: var(--primary-color);
}

.resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.resource-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-clamp: 2;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .resource-card {
        flex-direction: column;
    }

    .resource-actions {
        flex-direction: row;
        width: 100%;
    }
}

/* ========== 热门搜索 ========== */
.hot-search {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.hot-search-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.hot-search-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.hot-search-item {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.hot-search-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.hot-search-rank {
    font-weight: 600;
    color: var(--danger-color);
    min-width: 1.2rem;
    text-align: center;
}

/* 前三名排名特殊颜色 */
.hot-search-rank.rank-1 {
    color: #FF4757;
    font-weight: 700;
    font-size: 0.8rem;
}

.hot-search-rank.rank-2 {
    color: #FF6B81;
    font-weight: 650;
}

.hot-search-rank.rank-3 {
    color: #FFA502;
    font-weight: 650;
}

.hot-search-rank.rank-other {
    color: var(--text-muted);
    opacity: 0.7;
}

/* 搜索次数显示 */
.search-count {
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.8;
    margin-left: 0.15rem;
}

.search-count-small {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ========== 用户中心 ========== */
.user-center-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl);
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.user-info h2 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.user-info p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.user-menu {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

.user-menu-item:last-child {
    border-bottom: none;
}

.user-menu-item:hover, .user-menu-item.active {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.user-menu-icon {
    font-size: 1.25rem;
}

/* 用户等级标签 */
.user-info .badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: normal;
}

/* ========== 关注/粉丝 & 收藏列表（共用基础） ========== */
.user-follow-list,
.favorite-list { display: flex; flex-direction: column; gap: 0; }

.user-follow-item,
.favorite-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}
.user-follow-item:last-child,
.favorite-item:last-child { border-bottom: none; }
.user-follow-item:hover,
.favorite-item:hover { background: var(--bg-secondary); }

/* 关注头像 */
.follow-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
}

/* 名称链接（共用） */
.follow-name,
.fav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}
.follow-name:hover,
.fav-title:hover { color: var(--primary-color); }

/* fav-title 额外：单行截断 */
.fav-title {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 简介/描述（共用截断基础） */
.follow-bio,
.fav-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.follow-bio { max-width: 420px; margin: 2px 0 0; }
.fav-desc   { max-width: 450px; margin: 3px 0 0; }

/* 时间（共用颜色字号） */
.follow-time,
.fav-time { font-size: 0.78rem; color: var(--text-muted); }
.fav-time { display: block; margin-top: 2px; }

/* 关注列表独有 */
.follow-info { flex: 1; min-width: 0; }
.follow-action-btn { flex-shrink: 0; min-width: 72px; }

/* 收藏列表独有 */
.fav-info-wrap { flex: 1; min-width: 0; }
.fav-title {
    display: inline;
}
.fav-category,
.fav-pan {
    display: inline-block;
    font-size: 0.75rem;
    color: #fff;
    background: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
}
.fav-sharer {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.fav-sharer a {
    color: var(--primary-color);
    text-decoration: none;
}
.fav-sharer a:hover {
    text-decoration: underline;
}
.fav-times {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    align-items: center;
}
.fav-view-btn { flex-shrink: 0; min-width: 80px; }
.fav-unfav-btn { flex-shrink: 0; min-width: 72px; }

/* 分页链接 */
.pag-link {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.88rem;
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.pag-link:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ========== 批量操作栏（用户中心） ========== */
.batch-actions {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-lg);
    animation: slideDown 0.2s ease;
}
.batch-actions.active {
    display: flex !important;
}
.batch-actions-count {
    font-weight: 600;
    color: #0369a1;
    white-space: nowrap;
    font-size: 0.9rem;
}

/* ========== 资源详情页样式 ========== */
.detail-page {
    padding: var(--spacing-xl) 0;
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 布局 */
.detail-wrapper {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}
.detail-main {
    flex: 1;
    min-width: 0;
}
.detail-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* 主卡片 */
.detail-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
}

/* 标题区 */
.detail-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}
.detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    word-break: break-word;
}

/* 元信息 */
.detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.meta-icon { font-size: 1rem; flex-shrink: 0; }
.meta-label { color: var(--text-muted); white-space: nowrap; }
.meta-value { color: var(--text-primary); font-weight: 500; }

/* 分区 */
.detail-section {
    margin-bottom: var(--spacing-xl);
}
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}
.detail-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    padding: var(--spacing-md);
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    word-break: break-word;
}

/* 标签 */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tag-item {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}
.tag-item:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* 操作区 */
.detail-action {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-light);
    text-align: center;
}
.detail-btn {
    min-width: 200px;
    font-size: 1.05rem;
    padding: 0.85rem 2.5rem;
    letter-spacing: 0.03em;
    transition: transform 0.25s ease;
}
.detail-btn:hover {
    transform: scale(1.03);
    background-color: var(--primary-color);
    color: var(--text-light);
}
.detail-btn:active {
    transform: scale(0.97);
}

/* 提示文字（共用） */
.action-hint,
.fav-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.fav-hint.favorited-text { color: #f56565; }

/* 收藏 & 标记失效按钮（共用基础） */
.fav-btn,
.invalid-btn {
    min-width: 110px;
    font-size: 1rem;
    padding: 0.75rem 1.8rem;
    background: #fff;
    border-width: 2px;
    border-style: solid;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.02em;
}
.fav-btn     { border-color: #f56565; color: #f56565; }
.invalid-btn { border-color: #718096; color: #718096; }

.fav-btn:hover     { background: #fff5f5; transform: scale(1.03); }
.fav-btn:active    { transform: scale(0.97); }
.fav-btn.favorited { background: #f56565; color: #fff; }
.fav-btn.favorited:hover { background: #e53e3e; border-color: #e53e3e; }

.invalid-btn:hover  { background: #f7fafc; transform: scale(1.03); }
.invalid-btn:active { transform: scale(0.97); }

.fav-btn[disabled],
.invalid-btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

/* 已失效提示 */
.invalid-notice {
    display: inline-block;
    margin-bottom: 0.8rem;
    padding: 0.5rem 1.2rem;
    background: #feebc8;
    color: #c05621;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
}
.invalid-icon { font-size: 1.1rem; }

/* 已失效时的获取链接按钮 */
.btn-invalid-link {
    min-width: 200px;
    font-size: 1.05rem;
    padding: 0.85rem 2.5rem;
    letter-spacing: 0.03em;
    border: 2px solid #ed8936;
    background: #fffaf0;
    color: #c05621;
}
.btn-invalid-link:hover { background: #feebc8; }

/* 侧边栏 */
.sidebar-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}
.sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}
.sidebar-body {
    font-size: 0.85rem;
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
}
.info-label { color: var(--text-muted); }
.info-value { color: var(--text-primary); font-weight: 500; }
.badge-sm { font-size: 0.75rem; padding: 0.15rem 0.5rem; }

.sidebar-link {
    display: block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: opacity var(--transition-fast);
}
.sidebar-link:hover { opacity: 0.75; }

.sidebar-card.sidebar-hint {
    background-color: #fff !important;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sidebar-hint p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ========== 个人主页样式 ========== */
.profile-header {
    display: flex;
    gap: var(--spacing-xl);
    align-items: flex-start;
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}
.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 700;
    flex-shrink: 0;
}
.profile-info {
    flex: 1;
    min-width: 0;
}
.profile-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    word-break: break-word;
}
.profile-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.profile-bio {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    word-break: break-word;
    white-space: pre-wrap;
}
.profile-bio-empty {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.75rem;
}

/* 统计 + 关注按钮 */
.profile-stats {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}
.stat-item strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}
.stat-item span {
    font-size: 0.78rem;
    color: var(--text-muted);
}
#followBtn {
    margin-left: auto;
    min-width: 100px;
    transition: all var(--transition-fast);
}
#followBtn:hover { opacity: 0.85; }
#followBtn.loading { opacity: 0.6; pointer-events: none; }

/* ========== 页脚（精简版） ========== */
.footer {
    background-color: transparent;
    color: var(--text-secondary);
    padding: var(--spacing-lg) 0;
    margin-top: auto;
    border-top: 1px solid var(--border-light);
}

.footer-bottom {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========== 返回顶部按钮 ========== */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 40px;
    width: 42px;
    height: 42px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79,70,229,0.35);
    z-index: 999;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background-color: var(--primary-hover);
    transform: scale(1.08);
}

/* ========== 响应式调整 ========== */
@media (max-width: 768px) {
    .hero-title    { font-size: 1.75rem; }
    .hero-subtitle { font-size: 1rem; }

    .search-form { flex-direction: column; }
    .search-btn  { width: 100%; }

    .auth-card { padding: var(--spacing-lg); }

    .detail-wrapper  { flex-direction: column; }
    .detail-sidebar  { width: 100% !important; flex-shrink: 0; }
    .detail-meta     { grid-template-columns: 1fr; }
    .detail-title    { font-size: 1.25rem; }
    .breadcrumb-current { max-width: none; }

    .profile-header {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
    }
    .profile-avatar {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }
    .profile-info h1  { font-size: 1.1rem; }
    .profile-meta { margin-bottom: 0.25rem; }
    .profile-bio,
    .profile-bio-empty { text-align: left; }
    .profile-stats    { justify-content: center; width: 100%; }
    #followBtn        { margin-left: 0; }
    .resource-icon { display: none; }
}

/* ========== 激活页样式 ========== */
.activate-icon {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 1.2rem;
}
.activate-success { animation: popIn 0.4s ease; }
.activate-error   { animation: shake 0.4s ease; }

@keyframes popIn {
    0%   { transform: scale(0.3); opacity: 0; }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    25%     { transform: translateX(-8px); }
    50%     { transform: translateX(8px); }
    75%     { transform: translateX(-4px); }
}

@media (max-width: 640px) {
    .card { margin: 1rem auto !important; border-radius: var(--radius-md); }
    .card-body { padding: 2rem 1.5rem !important; }
    .activate-icon { font-size: 3.5rem; }
}

/* ========== 错误页样式 ========== */
.error-page-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}
.error-page-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.error-page-detail {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}
.error-page-message {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ========== 搜索页紧凑型 Hero ========== */
.hero-section--compact {
    padding: 30px 0 20px;
}
.hero-section--compact .search-box {
    margin: 0;
}

/* ========== 首页 Hero ========== */
.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.home-hot-search {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.home-hot-label {
    color: var(--text-secondary);
}
.home-hot-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.82rem;
    transition: all 0.2s;
    text-decoration: none;
}
.home-hot-tag:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ========== 搜索页热门搜索侧边栏 ========== */
.hot-search {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.hot-search-title {
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    margin: 0;
}
.hot-search-list {
    padding: 8px 0;
}
.hot-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.15s;
}
.hot-search-item:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}
.hot-search-rank {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}
.hot-search-item:hover .hot-search-rank {
    background: var(--primary-light);
    color: var(--primary-color);
}
.bg-primary-light {
    background: var(--primary-light) !important;
}

/* ========== 资源详情页 ========== */
.detail-page {
    padding: 24px 0 48px;
}
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb-sep {
    color: #9CA3AF;
}
.breadcrumb-current {
    color: var(--text-secondary);
}
.detail-wrapper {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.detail-main {
    flex: 1;
    min-width: 0;
}
.detail-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.detail-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px 0;
}
.detail-title {
    flex: 1;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}
.detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    font-size: 0.9rem;
}
.meta-icon {
    flex-shrink: 0;
}
.meta-label {
    color: var(--text-muted);
    white-space: nowrap;
}
.meta-value {
    color: var(--text-primary);
}
.detail-section {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
}
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px;
}
.detail-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-item {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}
.tag-item:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.detail-action {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}
.action-btn-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.btn-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 4px;
    transition: color var(--transition-fast);
}
.action-btn-item:hover .btn-hint {
    color: #4b5563;
}
.btn-hint.favorited-text {
    color: #f56565;
}
.detail-btn {
    min-width: 160px;
    font-size: 1.05rem;
    padding: 12px 28px;
}
.btn-invalid-link {
    min-width: 160px;
    font-size: 1.05rem;
    padding: 12px 28px;
    background: #fff;
    color: #e53e3e;
    border: 2px solid #e53e3e;
}
.btn-invalid-link:hover {
    background: #fff5f5;
}
.invalid-notice {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: var(--radius-md);
    color: #c53030;
    font-size: 0.88rem;
}
.invalid-icon {
    flex-shrink: 0;
}
.detail-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.detail-sidebar .sidebar-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.detail-sidebar .sidebar-title {
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    margin: 0;
}
.detail-sidebar .sidebar-body {
    padding: 12px 16px;
}
.detail-sidebar .info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-light);
}
.detail-sidebar .info-row:last-child {
    border-bottom: none;
}
.detail-sidebar .info-label {
    color: var(--text-muted);
}
.detail-sidebar .info-value {
    color: var(--text-primary);
    font-weight: 500;
}
.detail-sidebar .sidebar-link {
    display: block;
    padding: 10px 12px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    font-size: 0.88rem;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}
.detail-sidebar .sidebar-link:hover {
    background: var(--primary-light);
}

/* 同类推荐列表 */
.sidebar-related {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.related-item {
    display: block;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: color 0.2s;
}
.related-item:last-child {
    border-bottom: none;
}
.related-item:hover {
    color: var(--primary-color);
}
.related-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

/* ========== 用户中心页 ========== */
.user-center-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}
.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}
.user-info h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}
.user-menu {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.15s;
}
.user-menu-item:last-child {
    border-bottom: none;
}
.user-menu-item:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}
.user-menu-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}
.user-menu-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.batch-actions.active {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.batch-actions-count {
    font-size: 0.88rem;
    color: #c2410c;
    font-weight: 600;
    margin-right: 4px;
}
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========== 用户中心 — 我的资源表格优化 ========== */
.resource-manage-table {
    table-layout: fixed;
}
.resource-manage-table th,
.resource-manage-table td {
    padding: 10px 12px;
    vertical-align: middle;
}
/* checkbox 列 */
.resource-manage-table th:nth-child(1),
.resource-manage-table td:nth-child(1) {
    width: 40px;
    text-align: center;
}
/* 资源名称列 */
.resource-manage-table th:nth-child(2),
.resource-manage-table td:nth-child(2) {
    width: 32%;
    min-width: 180px;
}
.resource-manage-table td:nth-child(2) a:first-child {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.resource-manage-table td:nth-child(2) .text-sm a {
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 0.78rem;
}
/* 分类列 */
.resource-manage-table th:nth-child(3),
.resource-manage-table td:nth-child(3) {
    width: 80px;
    white-space: nowrap;
}
/* 网盘列 */
.resource-manage-table th:nth-child(4),
.resource-manage-table td:nth-child(4) {
    width: 72px;
    white-space: nowrap;
}
/* 状态列 */
.resource-manage-table th:nth-child(5),
.resource-manage-table td:nth-child(5) {
    width: 75px;
    white-space: nowrap;
}
.resource-manage-table td:nth-child(5) .badge {
    font-size: 0.75rem;
    padding: 2px 8px;
}
/* 时间列 */
.resource-manage-table th:nth-child(6),
.resource-manage-table td:nth-child(6) {
    width: 130px;
    white-space: nowrap;
    font-size: 0.83rem;
    color: var(--text-muted);
}
/* 操作列 */
.resource-manage-table th:nth-child(7),
.resource-manage-table td:nth-child(7) {
    width: 100px;
    white-space: nowrap;
}
.resource-manage-table td:nth-child(7) .btn {
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* 移动端全选栏：桌面端隐藏 */
.mobile-select-all { display: none; }

/* ========== 个人主页 ========== */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}
.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
}
.profile-info {
    flex: 1;
    min-width: 0;
}
.profile-info h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}
.profile-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 10px;
}
.profile-bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0 0 12px;
}
.profile-bio-empty {
    font-size: 0.88rem;
    color: var(--text-light);
    font-style: italic;
    margin: 0 0 12px;
}
.profile-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.stat-item {
    text-align: center;
}
.stat-item strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}
.stat-item span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ========== 激活页 ========== */
.activate-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}
.activate-success {
    color: #16a34a;
}
.activate-error {
    color: #dc2626;
}

.register-tip-closed,
.register-tip-invite {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.register-tip-closed {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.register-tip-invite {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.tip-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}
.message-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}
.message-info a {
    color: #1e40af;
}

/* ========== 关注/收藏列表（JS动态加载） ========== */
.follow-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}
.follow-user-card:last-child {
    border-bottom: none;
}
.follow-user-card:hover {
    background: var(--bg-light);
}
.follow-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.follow-info {
    flex: 1;
    min-width: 0;
}
.follow-actions {
    flex-shrink: 0;
}
.follow-btn {
    min-width: 80px;
    padding: 6px 14px;
    font-size: 0.85rem;
}
.fav-resource-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}
.fav-resource-card:last-child {
    border-bottom: none;
}
.fav-resource-card:hover {
    background: var(--bg-light);
}
.fav-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 3px;
}
.fav-actions {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
}

/* ========== 移动端响应式增强 ========== */

/* ---- 用户中心布局移动端 ---- */
@media (max-width: 768px) {
    /* 用户中心：左侧菜单 + 右侧内容 改为上下堆叠 */
    .user-center-header {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 12px;
    }
    .user-info { text-align: center; }
    .user-info h2 { justify-content: center; flex-wrap: wrap; }

    .user-center-header + .flex,
    [style*="flex"] > div[style*="240px"] + div {
        flex-direction: column !important;
        gap: 16px !important;
    }
    [style*="width: 240px"],
    .user-center-header ~ .flex > div:first-child {
        width: 100% !important;
    }

    /* 菜单横向排列（小屏幕下） */
    .user-menu {
        display: flex !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0 !important;
        padding: 0 !important;
    }
    .user-menu::-webkit-scrollbar { height: 3px; }
    .user-menu::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
    .user-menu-item {
        white-space: nowrap;
        border-bottom: none !important;
        border-right: 1px solid var(--border-light);
        flex-shrink: 0;
        padding: 10px 14px !important;
        font-size: 0.85rem;
    }
    .user-menu-item:last-child { border-right: none; }
    .user-menu-icon { font-size: 1rem; }

    /* 批量操作栏移动端适配 */
    .batch-actions {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 8px;
    }
    .batch-actions select {
        min-width: 100px !important;
        max-width: 140px;
        font-size: 0.82rem;
    }
    .batch-actions .btn {
        font-size: 0.78rem;
        padding: 5px 10px;
    }

    /* 移动端全选栏：仅移动端显示 */
    .mobile-select-all {
        display: flex;
        align-items: center;
        background: #f0f9ff;
        border: 1px solid #bae6fd;
        border-radius: var(--radius-md);
        padding: 8px 14px;
        margin-bottom: 12px;
        font-size: 0.88rem;
    }
}

/* ---- 资源管理表格：卡片化布局（≤768px） ---- */
@media (max-width: 768px) {
    .resource-manage-table,
    .resource-manage-table thead,
    .resource-manage-table tbody,
    .resource-manage-table tr,
    .resource-manage-table th,
    .resource-manage-table td {
        display: block;
        width: 100% !important;
        text-align: left !important;
    }

    /* 隐藏表头 */
    .resource-manage-table thead {
        display: none;
    }

    /* 每行变为一张卡片 */
    .resource-manage-table tr {
        background: #fff;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        padding: 14px 16px;
        position: relative;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }
    .resource-manage-table tr:hover {
        background: #fff;
        transform: none;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

    /* checkbox 列：绝对定位到右上角 */
    .resource-manage-table td:nth-child(1) {
        position: absolute;
        top: 10px;
        right: 12px;
        width: auto !important;
        z-index: 2;
    }
    .resource-manage-table td:nth-child(1) input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--primary-color);
    }

    /* 资源名称列：标题样式，占满宽度 */
    .resource-manage-table td:nth-child(2) {
        padding-top: 4px !important;
        padding-bottom: 8px !important;
        padding-right: 36px !important;
    }
    .resource-manage-table td:nth-child(2) a:first-child {
        display: inline;
        max-width: none;
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--text-primary) !important;
        white-space: normal;
        word-break: break-word;
    }
    .resource-manage-table td:nth-child(2) a:first-child:hover {
        color: var(--primary-color) !important;
    }
    .resource-manage-table td:nth-child(2) .text-sm {
        margin-top: 4px;
    }
    .resource-manage-table td:nth-child(2) .text-sm a {
        max-width: none;
        font-size: 0.78rem;
        white-space: normal;
        word-break: break-all;
    }

    /* 分类、网盘、状态、时间：行内标签排列 */
    .resource-manage-table td:nth-child(3),
    .resource-manage-table td:nth-child(4),
    .resource-manage-table td:nth-child(5),
    .resource-manage-table td:nth-child(6) {
        display: inline-block !important;
        padding: 2px 0 !important;
        margin-right: 12px;
        margin-top: 4px;
        font-size: 0.82rem;
        vertical-align: middle;
    }
    .resource-manage-table td:nth-child(5) .badge {
        font-size: 0.72rem;
        padding: 2px 7px;
    }

    /* 操作列：按钮组 */
    .resource-manage-table td:nth-child(7) {
        padding-top: 10px !important;
        padding-bottom: 0 !important;
        border-top: 1px solid var(--border-light, #e5e7eb);
        margin-top: 10px;
        display: block !important;
    }
    .resource-manage-table td:nth-child(7) .btn {
        margin-right: 8px;
        margin-bottom: 4px;
    }
}

/* ========== 内容页面（使用条款、隐私政策） ========== */
.content-page {
    padding: var(--spacing-xl) 0;
    min-height: calc(100vh - 200px);
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ========== 二维码扫码页 ========== */
.qr-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.qr-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .1);
    max-width: 440px;
    width: 100%;
    padding: 40px 32px;
    text-align: center;
}

.qr-icon { font-size: 48px; margin-bottom: 12px; }

.qr-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    word-break: break-all;
}

.qr-pan {
    display: inline-block;
    font-size: .8rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.qr-box { display: flex; justify-content: center; margin-bottom: 20px; }

#qrcode {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 8px;
    margin: 0 auto;
}

#qrcode canvas,
#qrcode img {
    width: 100% !important;
    height: 100% !important;
}

.qr-tip {
    font-size: .95rem;
    color: #374151;
    margin-bottom: 8px;
    font-weight: 500;
}

.qr-tip span { color: #4f46e5; font-weight: 600; }

.qr-sub {
    font-size: .8rem;
    color: #9ca3af;
    margin-bottom: 24px;
}

.qr-powered {
    font-size: .75rem;
    color: #d1d5db;
    margin-top: 28px;
}

.qr-powered a { color: #9ca3af; text-decoration: none; }

@media (max-width: 480px) {
    .qr-card { padding: 28px 20px; }
    #qrcode { width: 180px; height: 180px; }
}

.content-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-2xl);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-light);
}

.terms-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========== 链接重复检查状态 ========== */
.field-msg.checking {
    color: var(--text-muted);
    font-size: 0.85rem;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.field-msg.ok {
    color: #27ae60;
    font-size: 0.85rem;
}
.field-msg.error {
    color: #e74c3c;
    font-size: 0.85rem;
}
.input-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15) !important;
}
.input-ok {
    border-color: #27ae60 !important;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.15) !important;
}

.terms-content p {
    margin-bottom: var(--spacing-md);
}

.terms-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

.terms-content h2:first-child {
    margin-top: 0;
}

.terms-content ul {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-xl);
}

.terms-content li {
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.terms-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.terms-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.terms-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .content-card {
        padding: var(--spacing-xl);
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .terms-content {
        font-size: 0.9rem;
    }
    
    .terms-content h2 {
        font-size: 1.1rem;
    }
}

/* ========== 注册成功页：邮件发送状态 ========== */
.sending-status {
    text-align: center;
    padding: var(--spacing-md) 0;
}

.sending-status .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #bfdbfe;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: var(--spacing-md);
}

.sending-status p {
    margin: 0;
    line-height: 1.6;
}

.sending-status .text-sm {
    font-size: 0.9rem;
}

.sending-status .text-xs {
    font-size: 0.82rem;
    color: #6b7280;
}
