/**
 * 公开上传页样式 - 怪物属性爆率表生成器
 * 配色参考 drop.css
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(180deg, #eaf0f7 0%, var(--bg-page) 100%);
    color: #1f2937;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

/* 页面主区（占满剩余高度，居中内容） */
.page-main {
    flex: 1;
    width: 100%;
    padding: 6px 16px 10px;
}

/* 卡片标题区（位于上传卡片顶部） */
.upload-header {
    text-align: center;
    margin: 0 0 4px;
    padding: 0 0 4px;
    border-bottom: 1px solid #eef2f7;
}

.upload-title {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

/* 顶部 LOGO（支持横版，保持原始比例不压缩） */
.site-logo-top {
    max-width: 240px;
    max-height: 80px;
    height: auto;
    width: auto;
    object-fit: contain;
    margin: 0 auto 12px;
    display: block;
    border-radius: 8px;
}

.upload-subtitle {
    color: #718096;
    font-size: 11px;
    margin-top: 0;
}

/* 主容器（整页大卡片，全宽与导航/页尾对齐） */
.upload-container {
    width: 100%;
    max-width: none;
    margin: 0;
    background: #ffffff;
    border: 1px solid #dbe5f0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(40, 68, 100, 0.08);
    padding: 10px 18px;
}

/* 拖拽上传区域 */
.upload-zone {
    border: 2px dashed #c5d4e6;
    border-radius: 12px;
    padding: 8px 14px;
    text-align: center;
    background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
    margin-bottom: 6px;
    transition: all .3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(22, 119, 255, .15);
}

.upload-zone.dragover {
    border-color: #52c41a;
    background: linear-gradient(180deg, #f6ffed 0%, #fff 100%);
    transform: scale(1.01);
}

.upload-zone .upload-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #69b1ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(22, 119, 255, .3);
    flex-shrink: 0;
}

/* AUD-022 上传区改为 label 关联 input：保持原视觉，同时可聚焦、可键盘触发 */
.upload-zone-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    cursor: pointer;
}

.upload-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 首页上传：链接名称输入框 */
.link-name-field {
    margin: 6px 0 2px;
}
.link-name-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 14px;
    color: #1f2329;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.link-name-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, .15);
}

.upload-zone:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, .25);
}

.upload-status {
    margin: 0 0 2px;
    min-height: 14px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.upload-zone .upload-text {
    text-align: left;
}

.upload-zone .upload-zone-title,
.upload-zone .upload-zone-hint {
    display: block;
}

.upload-zone .upload-zone-title {
    font-size: 12px;
    color: #333;
    margin-bottom: 1px;
}

.upload-zone .upload-zone-title b {
    color: var(--primary-color);
}

.upload-zone .upload-zone-hint {
    color: #999;
    font-size: 10px;
}

/* 文件列表区域 */
.file-list {
    background: #fff;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    padding: 4px 8px;
    box-shadow: 0 4px 14px rgba(40, 68, 100, 0.06);
}

.file-list-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    padding-bottom: 2px;
    border-bottom: 1px solid #f0f4f8;
}

.file-list-header h3 {
    margin: 0;
    font-size: 12px;
    color: var(--text-primary);
}

.file-list-header span {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.file-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

@media (max-width: 768px) {
    .file-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .file-list-grid {
        grid-template-columns: 1fr;
    }
}

/* 文件卡片 */
.file-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 5px;
    background: linear-gradient(135deg, #f7f9fc 0%, #fff 100%);
    border-radius: 6px;
    border: 1px solid #e8eef5;
    transition: all .3s;
    flex-wrap: wrap;
}

.file-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(22, 119, 255, .12);
}

.file-item .file-icon {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.file-item:nth-child(2) .file-icon { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.file-item:nth-child(3) .file-icon { background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%); }
.file-item:nth-child(4) .file-icon { background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%); }
.file-item:nth-child(5) .file-icon { background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%); }
.file-item:nth-child(6) .file-icon { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

.file-item .file-info {
    flex: 1;
    min-width: 0;
}

.file-item .file-name {
    font-weight: 600;
    font-size: 9px;
    color: #333;
    margin-bottom: 0;
    word-break: break-all;
}

.file-item .file-desc {
    color: #888;
    font-size: 9px;
}

/* 进度条 */
.file-item .file-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, .05);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    opacity: 0;
    transition: opacity .3s;
}

.file-item .file-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 2px;
    transition: width .3s ease;
}

/* 状态文字 */
.file-item .file-status {
    width: 100%;
    margin-top: 2px;
    padding-top: 2px;
    font-size: 10px;
    color: #666;
    border-top: 1px dashed transparent;
    display: none;
    text-align: center;
}

/* 选中状态 */
.file-item.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fff 100%);
    box-shadow: 0 4px 12px rgba(22, 119, 255, .2);
}

.file-item.selected .file-status {
    display: block;
}

/* 上传中状态 */
.file-item.uploading {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(22, 119, 255, .25);
}

.file-item.uploading .file-progress {
    opacity: 1;
}

.file-item.uploading .file-status {
    display: block;
    color: var(--primary-color);
}

/* 上传成功状态 */
.file-item.success {
    border-color: #52c41a;
    background: linear-gradient(135deg, #f6ffed 0%, #fff 100%);
}

.file-item.success .file-progress {
    opacity: 1;
}

.file-item.success .file-progress-bar {
    background: linear-gradient(90deg, #52c41a 0%, #73d13d 100%);
}

.file-item.success .file-status {
    display: block;
    border-top-color: #b7eb8f;
}

/* 上传失败状态 */
.file-item.error {
    border-color: #ff4d4f;
    background: linear-gradient(135deg, #fff2f0 0%, #fff 100%);
}

.file-item.error .file-progress-bar {
    background: linear-gradient(90deg, #ff4d4f 0%, #ff7875 100%);
}

.file-item.error .file-status {
    display: block;
    border-top-color: #ffccc7;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    height: 32px;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(22, 119, 255, .4);
    transition: all .3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, .5);
}

.submit-btn:disabled {
    cursor: not-allowed;
    opacity: .7;
    transform: none;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

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

/* 结果区域 */
.result-area {
    margin-top: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid #b7eb8f;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(40, 68, 100, 0.06);
    animation: fadeIn .3s;
}

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

.result-title {
    font-size: 18px;
    font-weight: 700;
    color: #389e0d;
    margin-bottom: 16px;
}

.result-link-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.result-link-box input {
    flex: 1;
    min-width: 220px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 13px;
    color: #5a6b7d;
    background: #f7f9fc;
    outline: none;
}

.result-link-box input:focus {
    border-color: var(--primary-color);
}

.copy-btn,
.open-btn {
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    transition: all .2s;
}

.copy-btn {
    background: var(--primary-color);
    color: #fff;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

.open-btn {
    background: #52c41a;
    color: #fff;
}

.open-btn:hover {
    background: #73d13d;
}

.result-hint {
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.6;
}

/* 弹窗 */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .25s;
}

.popup-box {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
    animation: popIn .3s;
}

/* 同IP游客链接拦截提示 */
.ip-block-notice {
    margin: 12px 0 0;
    padding: 12px 14px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    color: #ad6800;
    font-size: 13px;
    line-height: 1.6;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(.9); }
    to { opacity: 1; transform: scale(1); }
}

.popup-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.popup-logo {
    margin-bottom: 12px;
}
.popup-logo img {
    max-width: 200px;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.popup-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.popup-text {
    font-size: 14px;
    color: #5a6b7d;
    line-height: 1.6;
    margin-bottom: 22px;
}

.popup-text .popup-days {
    color: #faad14;
    font-weight: 700;
    font-size: 16px;
}

.popup-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.popup-btn {
    flex: 1;
    height: 42px;
    line-height: 42px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border: 1px solid #d9d9d9;
    background: #f7f9fc;
    color: #5a6b7d;
    transition: all .2s;
}

.popup-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-bg);
}

.popup-btn.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    border-color: transparent;
}

.popup-btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #69b1ff 100%);
    color: #fff;
}

.popup-close {
    font-size: 13px;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

.popup-close:hover {
    color: #5a6b7d;
}

@media (max-width: 600px) {
    body {
        padding: 16px 10px;
    }

    .upload-header {
        padding: 22px 18px;
    }

    .upload-title {
        font-size: 22px;
    }

    .upload-zone {
        padding: 24px 18px;
        flex-direction: column;
        text-align: center;
    }

    .upload-zone .upload-text {
        text-align: center;
    }
}

/* 统计卡片 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    margin: 0 0 4px;
}
@media (max-width: 768px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
    border-radius: 8px;
    padding: 4px 3px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.stat-card .stat-icon {
    font-size: 13px;
    margin-bottom: 0;
}
.stat-card .stat-num {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,.2);
    line-height: 1.2;
}
.stat-card .stat-label {
    color: rgba(255,255,255,.88);
    margin-top: 0;
    font-size: 9px;
    font-weight: 500;
}
.stat-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-2 { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.stat-3 { background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%); }
.stat-4 { background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%); }
.stat-5 { background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%); }
.stat-6 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

/* 用户登录入口（导航栏右侧；未登录用 .nav-login，已登录用 .user-bar） */
.user-entry {
    font-size: 13px;
}
.user-entry a {
    color: #5a6b7d;
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid #dbe5f0;
    border-radius: 4px;
    background: #f7f9fc;
    transition: all .2s;
}
.user-entry a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--primary-bg);
}

/* 上传框内：需要上传的文件名清单 */
.upload-required-files {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    color: #8a94a6;
    line-height: 1.5;
    word-break: break-all;
}

/* 链接名称填写区（上传完成后才显示） */
.link-name-field {
    margin: 4px 0 2px;
    padding: 6px 10px;
    background: #f7faff;
    border: 1px solid #d6e7ff;
    border-radius: 10px;
}
.link-name-label {
    display: block;
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}
.name-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #ff4d4f;
    min-height: 16px;
}
.link-name-input:disabled {
    background: #f0f2f5;
    color: #b0b7c3;
    cursor: not-allowed;
}

/* 操作按钮区：开始上传 + 生成链接 并排 */
.action-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.action-row .submit-btn {
    margin-top: 0;
    flex: 1;
}
.generate-btn {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    box-shadow: 0 4px 12px rgba(82, 196, 26, .4);
}
.generate-btn:hover {
    box-shadow: 0 6px 20px rgba(82, 196, 26, .5);
}
@media (max-width: 520px) {
    .action-row { flex-direction: column; }
}

/* 导航栏：较窄屏堆叠，标题单独居中一行（长标题避免与 LOGO/登录入口重叠） */
@media (max-width: 860px) {
    .nav-inner { padding: 8px 14px; height: auto; flex-wrap: wrap; gap: 4px; }
    .nav-logo-wrap { order: 1; }
    .nav-user { order: 2; margin-left: auto; }
    .nav-title { order: 3; position: static; transform: none; flex: 1 1 100%; text-align: center; font-size: 16px; margin: 2px 0 0; }
}

/* 小屏适配：内容区内边距收紧 */
@media (max-width: 600px) {
    .page-main { padding: 12px 10px 16px; }
    .upload-container { padding: 16px 14px; border-radius: 12px; }
}

/* ===================== 首页布局：左主体 + 右栏，上下两行严格等高 ===================== */
/* 采用 2 列 × 2 行的网格，让左右区块按行对齐：
   第1行 = 左3.1功能卡区(feat) + 右上用户卡(user)
   第2行 = 左3.2文件区(files) + 右下规则卡(rules)
   同行两块天然等高（3.1 与用户卡同高，文件区与规则卡同高） */
.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 30%);
    grid-template-rows: auto auto;
    grid-template-areas:
        "feat user"
        "files rules";
    gap: 10px;
    align-items: stretch;
    max-width: 1500px;
    margin: 0 auto;
}
/* home-main / home-side 仅作语义容器，不占盒子：让里面的区块直接参与 home-grid 排布 */
.home-main { display: contents; }
.home-side { display: contents; }
/* 4 个区块各自定位到 2×2 网格的对应格子 */
.home-grid .features-grid { grid-area: feat; min-width: 0; }
.home-grid .files-section  { grid-area: files; min-width: 0; }
.home-grid .side-user-card { grid-area: user; }
.home-grid .home-side .side-card:last-child {
    grid-area: rules;
    display: flex;
    flex-direction: column;
}
.home-grid .home-side .side-card:last-child .side-tip { margin-top: auto; }
.side-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(40, 68, 100, .06);
}
.side-user-card {
    text-align: center;
    background: linear-gradient(180deg, #f0f6ff 0%, #ffffff 55%);
}
.side-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.side-avatar.guest { background: #e6f0fa; color: var(--primary-color); font-size: 26px; }
.side-hi { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; word-break: break-all; }
/* 未登录侧栏：站点标题（跟随后台设置）+ 欢迎你 + 逐行文案 */
.side-site-title { font-size: 12px; font-weight: 700; color: var(--primary-color); margin-bottom: 2px; }
.side-welcome { 
    display: inline-block;
    background: var(--primary-bg);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    margin-bottom: 6px;
}
.side-desc-lines { 
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
}
.sd-line { 
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
}
.sd-line b { color: inherit; }
.sd-line-1 { background: var(--primary-bg); color: var(--primary-color); }
.sd-line-2 { background: #e8f7e1; color: #389e0d; }
.sd-line-3 { background: #fff6dd; color: #d46b08; }
.sd-line-4 { background: #f1e6ff; color: #722ed1; }
/* 登录后侧栏：登录IP/地址 + 我的链接列表 */
.side-ip-box {
    margin: 6px 0 4px;
    padding: 6px 8px;
    background: #f7f9fc;
    border: 1px solid #e8eef6;
    border-radius: 10px;
    text-align: left;
}
.side-ip-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 11px;
    line-height: 1.9;
}
.side-ip-label { color: #8a99ab; white-space: nowrap; flex: 0 0 auto; }
.side-ip-val { color: var(--text-primary); font-weight: 600; word-break: break-all; }
/* 登录IP默认打码，点击切换显示/隐藏 */
.side-ip-val.side-ip-hidden { cursor: pointer; letter-spacing: 1px; color: #8a99ab; }
.side-ip-val#loginIpVal { cursor: pointer; text-decoration: underline dotted #b9c6d6; text-underline-offset: 3px; }
.side-ip-val#loginIpVal:hover { color: var(--primary-color); }
.side-links-box {
    margin: 6px 0 8px;
    text-align: left;
}
.side-links-head {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.side-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 132px;
    overflow-y: auto;
}
.side-links-list li {
    padding: 0;
}
.side-link-item {
    display: block;
    font-size: 12px;
    color: var(--primary-color);
    background: var(--primary-bg);
    border-radius: 8px;
    padding: 4px 8px;
    text-align: center;
    font-weight: 600;
    word-break: break-all;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.side-link-item:hover {
    background: var(--primary-color);
    color: #fff;
}
.side-links-empty {
    font-size: 11px;
    color: #8a99ab;
    text-align: center;
    padding: 6px 0;
}
/* 侧栏"链接使用规则"卡片底部温馨提示 */
.side-tip {
    margin-top: 6px;
    padding: 6px 8px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    font-size: 11px;
    color: #8c6d1f;
    line-height: 1.6;
    text-align: left;
    word-break: break-all;
}
.side-status { font-size: 12px; color: #5a6b7d; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.side-status .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.side-status .dot.ok { background: #52c41a; }
.side-status .dot.warn { background: #fa8c16; }
.side-perm { margin-left: 4px; color: #52c41a; font-weight: 600; }
.side-desc { font-size: 13px; color: #5a6b7d; line-height: 1.7; margin: 0 0 6px; }
.side-mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 8px; }
.side-mini-stats > div { background: #f5f8fc; border-radius: 10px; padding: 10px 4px; }
.side-mini-stats b { display: block; font-size: 16px; color: var(--primary-color); }
.side-mini-stats span { font-size: 12px; color: #8a97a8; }
.side-btn {
    display: block;
    text-align: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none;
    margin-top: 6px;
    transition: all .2s;
    border-width: 1px;
    border-style: solid;
    box-sizing: border-box;
    cursor: pointer;
}
.side-btn.primary { background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); color: #fff; font-weight: 500; }
.side-btn.primary:hover { box-shadow: 0 4px 12px rgba(22, 119, 255, .35); transform: translateY(-1px); }
.side-btn.ghost { background: #fff; color: var(--primary-color); border: 1px solid var(--primary-color); }
.side-btn.ghost:hover { background: var(--primary-bg); }
.side-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; text-align: center; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { font-size: 12px; color: #5a6b7d; line-height: 1.6; border-bottom: 1px dashed #eef2f7; }
.side-list li:last-child { border-bottom: none; }

/* 导航栏未登录：登录 + 注册 双按钮 */
.nav-auth-btns { display: flex; align-items: center; gap: 10px; }
.nav-register {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    transition: all .2s;
}
.nav-register:hover { background: rgba(255, 255, 255, .28); color: #fff; }

/* 中屏以下：取消分栏，改为单列从上到下依次排列 */
@media (max-width: 1100px) {
    .home-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "feat"
            "files"
            "user"
            "rules";
    }
}

/* ===================== 页脚 ===================== */
.site-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: rgba(255, 255, 255, .85);
    padding: 12px 24px;
    margin-top: 0;
}
/* 跟随鼠标的动态光晕 */
.footer-cursor-glow {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 68%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .35s;
}
.site-footer:hover .footer-cursor-glow { opacity: 1; }
/* 页脚 LOGO 绝对定位靠左（相对整个页脚，最左上角） */
.footer-logo-wrap {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    text-decoration: none;
}
.footer-logo {
    height: 38px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}
.site-footer .footer-inner {
    position: relative;
    z-index: 1;
    max-width: 1500px;
    margin: 0 auto;
    text-align: center;
}
.footer-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .95);
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
    display: inline-block;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 8px;
    margin-bottom: 6px;
}
/* 胶囊按钮：半透明背景框 + hover 上浮发光扫光 */
.footer-links a {
    position: relative;
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    color: rgba(255, 255, 255, .92);
    text-decoration: none;
    font-size: 12px;
    line-height: 18px;
    overflow: hidden;
    transition: all .25s ease;
}
.footer-links a:hover {
    background: #fff;
    border-color: #fff;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 60, 160, .35);
}
/* 鼠标扫光特效 */
.footer-links a::after {
    content: '';
    position: absolute;
    top: 0; left: -70%;
    width: 45%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
    transform: skewX(-20deg);
    transition: left .55s ease;
}
.footer-links a:hover::after {
    left: 130%;
}
.footer-copy {
    color: rgba(255, 255, 255, .5);
    font-size: 11px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}
@media (max-width: 600px) {
    .site-footer { padding: 16px 14px; }
    .footer-links { gap: 6px 14px; }
    .footer-logo-wrap { display: none; }
}
