/* 全局主题变量和基础盒模型。 */
:root { color-scheme: dark; --bg:#0b0d12; --panel:#141821; --line:#272d39; --muted:#8c95a5; --accent:#8bffcf; --danger:#ff758c; font-family:Inter,ui-sans-serif,system-ui,"PingFang SC",sans-serif; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; color:#f6f8fb; background:radial-gradient(circle at 80% 0,#12372f 0,transparent 28rem),var(--bg); }
/* 会话检查完成前只显示加载状态，防止刷新时闪到登录页面。 */
.auth-loading { display:none; min-height:100vh; place-items:center; align-content:center; gap:8px; color:var(--muted); }.auth-loading b { color:#fff; }.loading-mark { width:52px; height:52px; display:grid; place-items:center; margin-bottom:8px; border-radius:16px; color:#07110e; background:var(--accent); font-size:26px; animation:loadingPulse 1.1s ease-in-out infinite alternate; }
.auth-checking .auth-loading { display:grid; }.auth-checking .login-screen,.auth-checking .app-shell { display:none !important; }
@keyframes loadingPulse { to { transform:scale(.9); opacity:.58; } }
/* 登录状态控制：未认证时隐藏管理台，认证后隐藏登录页。 */
body:not(.authenticated) .app-shell { display:none !important; }
.authenticated .login-screen { display:none; }
/* 居中的登录卡片。 */
.login-screen { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card { width:min(420px,100%); padding:38px; border:1px solid var(--line); border-radius:22px; background:#12161ef2; box-shadow:0 28px 90px #0009; }
.login-card h1 { margin-top:5px; }.login-card>p:not(.error) { color:var(--muted); margin:7px 0 28px; }.login-card label { display:block; margin-top:15px; }.login-submit { width:100%; margin-top:5px; padding:12px; }
.brand-mark { float:right; width:48px; height:48px; display:grid; place-items:center; border-radius:14px; color:#08110e; background:var(--accent); font-size:25px; }
/* 管理台顶部布局和当前账号信息。 */
header,main { width:min(1180px,calc(100% - 40px)); margin:auto; }
header { height:126px; display:flex; align-items:center; justify-content:space-between; }
.header-actions { display:flex; gap:10px; }
.current-admin { display:flex; flex-direction:column; align-items:flex-end; justify-content:center; margin-right:6px; }.current-admin b { font-size:13px; }.current-admin span { color:var(--muted); font-size:10px; }
/* 通用标题、按钮和表单控件。 */
h1,h2,p { margin:0; } h1 { font-size:32px; letter-spacing:-1px; } h2 { font-size:24px; }
.eyebrow { color:var(--accent); font-size:11px; letter-spacing:2.2px; font-weight:800; }
button,input,select { font:inherit; } button { border:1px solid var(--line); color:#e9edf3; background:#171b24; border-radius:10px; padding:10px 16px; cursor:pointer; }
button:hover { border-color:#556071; } .primary { color:#07110e; background:var(--accent); border-color:var(--accent); font-weight:800; }
button:disabled { opacity:.38; cursor:not-allowed; }
/* 多个管理视图的页签导航，窄窗口允许换行。 */
.tabs { display:flex; gap:6px; margin-bottom:22px; padding:5px; width:max-content; border:1px solid var(--line); border-radius:12px; background:#10141b; }
.tabs button { border:0; padding:8px 18px; background:transparent; color:var(--muted); }
.tabs button.active { background:#242b36; color:#fff; }
/* 动画统计与筛选工具栏。 */
.stats { display:grid; grid-template-columns:repeat(3,1fr); border:1px solid var(--line); border-radius:16px; overflow:hidden; background:rgba(20,24,33,.82); }
.stats div { display:flex; flex-direction:column; padding:22px 26px; border-right:1px solid var(--line); } .stats div:last-child { border:0; }
.stats strong { font-size:28px; } .stats span { color:var(--muted); font-size:13px; margin-top:3px; }
.toolbar { display:flex; gap:12px; margin:24px 0; } .toolbar input { flex:1; }
input,select,textarea { width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; color:#f6f8fb; background:#0e1118; outline:none; font:inherit; resize:vertical; }
input:focus,select:focus { border-color:var(--accent); box-shadow:0 0 0 3px #8bffcf18; }
/* 动画栏目平铺筛选，按钮数字显示该栏目当前包含的动画数量。 */
.category-filter-panel { margin:-10px 0 24px; padding:16px; border:1px solid var(--line); border-radius:14px; background:#10141b; }
.category-filter-panel>span { display:block; margin-bottom:11px; color:var(--muted); font-size:12px; font-weight:700; }
.category-filter { display:flex; flex-wrap:wrap; gap:9px; }
.category-filter button { padding:8px 12px; color:var(--muted); background:#171b24; }
.category-filter button small { display:inline-grid; min-width:20px; height:20px; margin-left:5px; padding:0 5px; place-items:center; border-radius:999px; color:#aeb7c5; background:#0b0e13; font-size:10px; }
.category-filter button.active { color:#07110e; border-color:var(--accent); background:var(--accent); font-weight:800; }
.category-filter button.active small { color:var(--accent); background:#07110e; }
/* 动画卡片网格及鼠标悬停动态预览。 */
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:16px; padding-bottom:48px; }
.card { overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--panel); transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease; }
.card:hover { transform:translateY(-6px); border-color:#8bffcf77; box-shadow:0 20px 42px #0008,0 0 0 1px #8bffcf18; }
.preview { position:relative; height:176px; display:grid; place-items:center; background:linear-gradient(135deg,#181e29,#0b0e13); overflow:hidden; }
.preview img { width:100%; height:100%; object-fit:contain; image-rendering:pixelated; opacity:.72; filter:saturate(.65); transition:transform .32s ease,opacity .25s ease,filter .25s ease; }
.card:hover .preview img { transform:scale(1.14); opacity:1; filter:saturate(1.2); }
.preview-overlay { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:flex-end; padding:16px; opacity:0; background:linear-gradient(transparent 32%,#070a0eea); transform:translateY(8px); transition:.22s ease; pointer-events:none; }
.card:hover .preview-overlay { opacity:1; transform:none; }
.preview-overlay span { align-self:flex-start; color:#06100d; background:var(--accent); border-radius:999px; padding:3px 8px; font-size:10px; font-weight:800; margin-bottom:7px; }
.preview-overlay b { font-size:18px; }.preview-overlay small { color:#aeb7c5; margin-top:2px; }
.placeholder { color:#465061; font-size:42px; transition:transform .25s ease,color .25s ease; }.card:hover .placeholder { color:var(--accent); transform:scale(1.2) rotate(12deg); }
/* 动画卡片正文、状态标签和操作区。 */
.card-body { padding:16px; } .card-top { display:flex; justify-content:space-between; gap:8px; }
.card h3 { margin:0; font-size:18px; } .badge { color:var(--accent); border:1px solid #8bffcf40; background:#8bffcf0e; border-radius:999px; padding:3px 8px; font-size:11px; white-space:nowrap; }
.badge.off { color:var(--muted); border-color:var(--line); background:transparent; }
.meta { color:var(--muted); font-size:12px; margin:8px 0 14px; min-height:18px; }
.card-actions { display:flex; gap:8px; } .card-actions button { flex:1; padding:8px; font-size:13px; } .card-actions .danger { color:var(--danger); }
/* 空状态占位。 */
.empty { padding:80px; border:1px dashed var(--line); border-radius:16px; text-align:center; color:var(--muted); }
.empty b,.empty span { display:block; } .empty b { color:#fff; font-size:20px; margin-bottom:8px; }
/* 动画、栏目和管理员共用的模态表单。 */
dialog { width:min(620px,calc(100% - 32px)); border:1px solid var(--line); border-radius:18px; color:#fff; background:#12161e; padding:0; box-shadow:0 30px 80px #000a; }
.small-dialog { width:min(480px,calc(100% - 32px)); }
dialog::backdrop { background:#05070ac9; backdrop-filter:blur(5px); } form { padding:26px; }
.dialog-title { display:flex; justify-content:space-between; margin-bottom:24px; } .icon { border:0; background:transparent; font-size:25px; padding:0 6px; }
.fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; } .fields.one-column { grid-template-columns:1fr; } label { color:#b8c0cc; font-size:12px; } label input,label select,label textarea { margin-top:7px; color:#fff; }
.wide { grid-column:1/-1; } .upload { border:1px dashed #343c49; padding:12px; border-radius:10px; } .upload input { border:0; padding:5px 0 0; }
.switch { display:flex; align-items:center; gap:9px; } .switch input { width:auto; margin:0; accent-color:var(--accent); }
.actions { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; } .error { min-height:18px; color:var(--danger); margin-top:12px; font-size:13px; }
/* 栏目和管理员列表行。 */
.section-head { display:flex; justify-content:space-between; align-items:flex-end; padding:22px 0 20px; }.section-head p { color:var(--muted); margin-top:7px; font-size:13px; }
.category-list { display:flex; flex-direction:column; gap:10px; padding-bottom:48px; }
.category-row { display:grid; grid-template-columns:48px minmax(0,1fr) 100px 160px; align-items:center; gap:16px; padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--panel); transition:border-color .2s,transform .2s; }
.category-row:hover { border-color:#465262; transform:translateX(3px); }.category-mark { width:48px; height:48px; display:grid; place-items:center; border-radius:12px; color:var(--accent); background:#8bffcf12; font-weight:900; font-size:19px; }
.category-info { min-width:0; display:flex; flex-direction:column; }.category-info b { font-size:16px; }.category-info span { overflow:hidden; color:var(--muted); font-size:12px; margin-top:4px; white-space:nowrap; text-overflow:ellipsis; }
.category-info em { margin-left:8px; color:var(--accent); font-size:10px; font-style:normal; border:1px solid #8bffcf44; border-radius:999px; padding:2px 6px; }
.admin-row .badge { justify-self:start; }
.category-count { color:var(--muted); font-size:13px; }.row-actions { display:flex; gap:8px; }.row-actions button { flex:1; padding:8px; }.danger { color:var(--danger); }
.form-tip { color:var(--muted); margin-top:14px; font-size:11px; line-height:1.6; }
/* MP3 列表包含曲目信息、浏览器原生试听控件和管理操作。 */
.music-row { display:grid; grid-template-columns:48px minmax(150px,1fr) minmax(220px,360px) 70px 230px; align-items:center; gap:14px; padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.music-row:hover { border-color:#465262; }.music-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:50%; color:#07110e; background:var(--accent); font-size:22px; }.music-row audio { width:100%; height:36px; }.music-row .row-actions button { padding:8px 6px; }
.tag-picker { margin:0; padding:13px; border:1px solid var(--line); border-radius:11px; }.tag-picker legend { color:#b8c0cc; padding:0 5px; font-size:12px; }.tag-choices { display:flex; flex-wrap:wrap; gap:8px; }.tag-choices label { cursor:pointer; }.tag-choices input { position:absolute; opacity:0; pointer-events:none; }.tag-choices span { display:block; padding:7px 11px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:#0e1118; }.tag-choices input:checked+span { color:#07110e; border-color:var(--accent); background:var(--accent); }.tag-choices small { color:var(--muted); }
.tag-add-form { display:flex; gap:10px; padding:0 0 6px; }.tag-add-form input { flex:1; }.tag-list { display:flex; flex-wrap:wrap; gap:10px; padding-bottom:48px; }.tag-item { display:grid; grid-template-columns:auto auto auto; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--panel); }.tag-item span { font-weight:700; }.tag-item small { color:var(--muted); }.tag-item button { padding:6px 9px; }
.subsection-title { margin:4px 0 14px; font-size:15px; }.tag-create-panel { max-width:640px; margin-bottom:48px; padding:20px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }.tag-create-panel h3 { margin:0; }.tag-create-panel>p:not(.error) { color:var(--muted); margin:5px 0 16px; font-size:12px; }
/* 反馈统计、筛选器和内容卡片。 */
.feedback-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }.feedback-stats div { display:flex; flex-direction:column; padding:18px 20px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }.feedback-stats strong { font-size:24px; }.feedback-stats span { color:var(--muted); font-size:12px; margin-top:3px; }
.feedback-toolbar input { min-width:280px; }.feedback-toolbar select { width:180px; }.feedback-list { display:flex; flex-direction:column; gap:14px; padding-bottom:48px; }.feedback-card { padding:20px; border:1px solid var(--line); border-radius:16px; background:var(--panel); }.feedback-card:hover { border-color:#465262; }.feedback-card-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }.feedback-card-head>div { display:flex; align-items:center; gap:10px; }.feedback-card-head time { color:var(--muted); font-size:12px; }.feedback-card-head select { width:120px; padding:7px 9px; }.feedback-type { padding:5px 9px; border-radius:999px; font-size:11px; font-weight:800; }.feedback-type.feature { color:#ffd989; background:#ffd35b18; border:1px solid #ffd35b38; }.feedback-type.problem { color:#ff98aa; background:#ff758c16; border:1px solid #ff758c38; }
.feedback-content { margin:18px 0; line-height:1.75; color:#edf0f5; white-space:pre-wrap; overflow-wrap:anywhere; }.feedback-media-list { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0 18px; }.feedback-media { position:relative; width:150px; height:112px; overflow:hidden; border:1px solid var(--line); border-radius:11px; color:#fff; background:#090c11; }.feedback-media img,.feedback-media video { width:100%; height:100%; object-fit:cover; }.feedback-media span { position:absolute; left:0; right:0; bottom:0; padding:6px; color:#fff; background:#05070abb; text-align:center; font-size:10px; }.feedback-meta { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }.feedback-meta span { display:flex; flex-direction:column; min-width:0; padding:11px 13px; border-radius:10px; color:#dce1e9; background:#0e1118; font-size:12px; overflow-wrap:anywhere; }.feedback-meta b { color:var(--muted); margin-bottom:4px; font-size:10px; }.feedback-footer { display:flex; align-items:center; justify-content:space-between; margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }.feedback-footer span { color:var(--muted); font-size:11px; }.feedback-footer button { padding:7px 11px; }
/* 窄屏下将工具栏、表单和列表切换为纵向布局。 */
@media (max-width:850px) { header { height:auto; padding:24px 0; align-items:flex-start; gap:18px; } .header-actions { flex-direction:column; } h1 { font-size:25px; } .tabs { width:100%; flex-wrap:wrap; }.stats div { padding:16px; } .toolbar,.tag-add-form { flex-direction:column; } .feedback-toolbar select { width:100%; }.fields { grid-template-columns:1fr; } .wide { grid-column:auto; } .category-row { grid-template-columns:48px 1fr; }.category-count { grid-column:2; }.row-actions { grid-column:1/-1; } .music-row { grid-template-columns:48px 1fr; }.music-row audio,.music-row>.badge { grid-column:2; }.music-row .row-actions { grid-column:1/-1; }.feedback-meta { grid-template-columns:1fr; } }
