/* bigpan - 文件存储后台（SD 浅色卡片风格 + 暗黑模式） */
:root {
    --bg: #f5f5f5;
    --bar: #fafafa;
    --card: #fff;
    --input-bg: #fff;
    --border: #e5e5e5;
    --divider: #f0f0f0;
    --text: #1a1a1a;
    --muted: #999;
    --muted-2: #666;
    --hover: #f0f0f0;
    --blue: #2563eb;
    --green: #22c55e;
    --red: #dc3545;
    --shadow: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-hover: 0 2px 8px rgba(0,0,0,0.06);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a1a;
        --bar: #202020;
        --card: #262626;
        --input-bg: #1e1e1e;
        --border: #3a3a3a;
        --divider: #333;
        --text: #e5e5e5;
        --muted: #777;
        --muted-2: #999;
        --hover: #3a3a3a;
        --blue: #60a5fa;
        --green: #4ade80;
        --red: #f87171;
        --shadow: none;
        --shadow-hover: 0 2px 8px rgba(0,0,0,0.4);
    }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ 布局 ============ */
.bp-wrap { max-width: 1000px; margin: 0 auto; padding: 16px; }

/* ============ 顶栏 ============ */
.bp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--bar);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 20px;
}
.bp-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.bp-logo {
    width: 34px; height: 34px;
    background: var(--blue);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.bp-logo svg { width: 18px; height: 18px; }
.bp-brand-title { font-size: 15px; font-weight: 700; line-height: 1.2; }
.bp-brand-sub { font-size: 11px; color: var(--muted); }
.bp-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.bp-nav a {
    color: var(--muted-2);
    font-size: 13px; font-weight: 500;
    padding: 7px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s;
}
.bp-nav a:hover { color: var(--text); background: var(--hover); }
.bp-nav a.active { color: #fff; background: var(--text); }
.bp-nav .bp-chip { margin-left: 6px; }

.bp-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px 4px 5px;
}
.bp-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.bp-chip-name { font-size: 13px; font-weight: 600; }
.bp-badge {
    font-size: 11px; font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}
.bp-badge.admin { background: rgba(37,99,235,0.12); color: var(--blue); }
.bp-badge.user { background: var(--hover); color: var(--muted-2); }
.bp-logout {
    color: var(--red);
    font-size: 13px; font-weight: 500;
    padding: 7px 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
}
.bp-logout:hover { background: rgba(220,53,69,0.1); color: var(--red); text-decoration: none; }

/* ============ 页头 ============ */
.bp-page-head { margin-bottom: 16px; }
.bp-page-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }
.bp-page-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.bp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.bp-toolbar h2 { font-size: 20px; font-weight: 700; }

/* ============ 卡片 ============ */
.bp-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.bp-h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.bp-h3 {
    font-size: 12px; color: var(--muted-2);
    font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--divider);
}
.bp-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; line-height: 1.7; }

/* ============ 统计卡片 ============ */
.bp-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.bp-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
}
.bp-stat-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.bp-stat-icon svg { width: 20px; height: 20px; }
.bp-stat-icon.blue { background: rgba(37,99,235,0.12); color: var(--blue); }
.bp-stat-icon.green { background: rgba(34,197,94,0.12); color: var(--green); }
.bp-stat-icon.purple { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.bp-stat-icon.orange { background: rgba(245,158,11,0.12); color: #f59e0b; }
.bp-stat-num { font-size: 22px; font-weight: 700; line-height: 1.1; }
.bp-stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============ 表单 ============ */
.bp-label {
    display: block;
    font-size: 12px; color: var(--muted-2);
    font-weight: 600; letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.bp-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 10px 14px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-bottom: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.bp-input:focus { border-color: var(--text); }
.bp-input::placeholder { color: var(--muted); }
.bp-url {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: 8px 10px;
    font-size: 12px;
    font-family: Consolas, Monaco, monospace;
    margin: 4px 0 8px;
}
.bp-url-row { display: flex; align-items: center; gap: 8px; }
.bp-url-row .bp-url { margin: 4px 0 8px; flex: 1; min-width: 0; }

/* ============ 按钮 ============ */
.bp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px; font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
}
.bp-btn:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.bp-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.bp-btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.bp-btn.primary:hover { background: var(--muted-2); border-color: var(--muted-2); color: var(--bg); }
.bp-btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.bp-btn.danger:hover { background: #c82333; border-color: #c82333; color: #fff; }
.bp-btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.bp-btn.green:hover { background: #16a34a; border-color: #16a34a; color: #fff; }
.bp-btn svg { width: 14px; height: 14px; }

/* 图标小按钮 */
.bp-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted-2);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    font-family: inherit;
}
.bp-icon-btn:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.bp-icon-btn.danger:hover { background: rgba(220,53,69,0.1); color: var(--red); border-color: var(--red); }
.bp-icon-btn svg { width: 15px; height: 15px; }

/* ============ 消息 ============ */
.bp-msg { padding: 10px 14px; margin: 10px 0 14px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; }
.bp-msg.error { background: rgba(220,53,69,0.1); border-color: rgba(220,53,69,0.35); color: var(--red); }
.bp-msg.success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.35); color: var(--green); }
.bp-msg.info { background: rgba(37,99,235,0.1); border-color: rgba(37,99,235,0.35); color: var(--blue); }

/* ============ 文件行 ============ */
.bp-list { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.bp-file-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--divider);
    transition: background 0.15s;
}
.bp-file-row:last-child { border-bottom: none; }
.bp-file-row:hover { background: var(--bar); }
.bp-file-main { flex: 1; min-width: 0; }
.bp-file-name {
    font-size: 14px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bp-file-name a { color: var(--text); text-decoration: none; }
.bp-file-name a:hover { color: var(--blue); }
.bp-file-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.bp-file-meta b { color: var(--muted-2); font-weight: 500; }
.bp-file-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.bp-file-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
    color: #fff;
    flex-shrink: 0;
}
.bp-file-icon.img { background: #22c55e; }
.bp-file-icon.video { background: #dc3545; }
.bp-file-icon.audio { background: #8b5cf6; }
.bp-file-icon.zip { background: #2563eb; }
.bp-file-icon.text { background: #0ea5e9; }
.bp-file-icon.file { background: #94a3b8; }

/* ============ 上传 ============ */
.bp-dropzone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 44px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 14px;
    color: var(--muted);
}
.bp-dropzone:hover, .bp-dropzone.dragover { border-color: var(--blue); background: rgba(37,99,235,0.05); color: var(--blue); }
.bp-dropzone svg { width: 34px; height: 34px; margin-bottom: 10px; color: var(--muted); }
.bp-dropzone:hover svg, .bp-dropzone.dragover svg { color: var(--blue); }
.bp-dropzone b { color: var(--text); font-weight: 600; }
.bp-dropzone small { display: block; margin-top: 4px; font-size: 12px; }
.bp-progress {
    height: 6px;
    background: var(--hover);
    border-radius: 3px;
    overflow: hidden;
    margin: 12px 0;
    display: none;
}
.bp-progress.show { display: block; }
.bp-progress-bar {
    height: 100%;
    width: 0;
    background: var(--blue);
    border-radius: 3px;
    transition: width 0.3s;
}

/* ============ 空状态 ============ */
.bp-empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.bp-empty svg { width: 44px; height: 44px; color: var(--border); display: block; margin: 0 auto 14px; }
.bp-empty p { font-size: 14px; margin-bottom: 14px; }
.bp-empty .bp-btn { margin: 0 4px; }

/* ============ 登录/居中卡片 ============ */
.bp-center { max-width: 420px; margin: 6vh auto 0; }
.bp-center .bp-logo { width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 12px; }
.bp-center .bp-logo svg { width: 24px; height: 24px; }
.bp-center .bp-h2 { text-align: center; margin-bottom: 6px; }
.bp-center .bp-login-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }

/* ============ 双栏 ============ */
.bp-grid-2 {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 800px) { .bp-grid-2 { grid-template-columns: 1fr; } }

/* ============ 文件详情 ============ */
.bp-file-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.bp-file-head .bp-file-icon { width: 56px; height: 56px; border-radius: 14px; font-size: 13px; }
.bp-file-head h2 { font-size: 18px; font-weight: 700; word-break: break-all; }
.bp-file-head p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.file-img { max-width: 100%; max-height: 500px; border: 1px solid var(--border); border-radius: 8px; }
.file-frame { width: 100%; height: 300px; border: 1px solid var(--border); background: var(--input-bg); border-radius: 8px; }
video, audio { width: 100%; border-radius: 8px; }

/* ============ 页脚 ============ */
.bp-footer {
    margin-top: 26px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* ============ 首页 Hero ============ */
.bp-hero {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.bp-hero .bp-logo { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px; }
.bp-hero .bp-logo svg { width: 28px; height: 28px; }
.bp-hero h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.5px; }
.bp-hero p { color: var(--muted); font-size: 14px; max-width: 440px; margin: 10px auto 22px; line-height: 1.7; }
.bp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 30px;
    text-align: left;
}
.bp-feature {
    background: var(--bar);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
}
.bp-feature svg { width: 18px; height: 18px; color: var(--blue); margin-bottom: 8px; }
.bp-feature b { display: block; font-size: 13px; font-weight: 600; }
.bp-feature span { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
