/* /www/wwwroot/dj.duoz.cn/public/assets/css/app.css
   DJ 音乐站样式：移动优先，桌面端增强 */

:root {
  --bg: #0d0204;
  --bg-soft: #16040a;
  --bg-card: #1c0610;
  --bg-elev: #280a14;
  --line: #3a0f1e;
  --text: #f2f2f7;
  --text-dim: #d19aa6;
  --text-mute: #8f5566;
  --primary: #ff0033;
  --primary-2: #ff4d6d;
  --accent: #ff2d55;
  --danger: #ff4d6d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --player-h: 72px;
  --tabbar-h: 58px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ============ 顶部导航 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(13, 2, 4, .88);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .3px; }
.brand-mark { font-size: 22px; }
.brand-text { font-size: 17px; background: linear-gradient(92deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-pc { display: none; gap: 4px; }
.nav-link {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 14px;
  transition: .18s;
}
.nav-link:hover { color: var(--text); background: var(--bg-elev); }
.nav-link.active { color: #fff; background: linear-gradient(92deg, var(--primary), var(--primary-2)); }

.search-box { flex: 1; display: flex; max-width: 380px; position: relative; }
.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 40px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
  transition: .18s;
}
.search-box input:focus { border-color: var(--primary); background: var(--bg-elev); }
.search-box button {
  position: absolute; right: 4px; top: 4px;
  width: 28px; height: 28px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--text-dim); font-size: 14px;
}

.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar-link {
  width: 34px; height: 34px; border-radius: 50%;
  overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 700; font-size: 14px;
}
.avatar-link img { width: 100%; height: 100%; object-fit: cover; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600;
  transition: .18s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(92deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 6px 20px rgba(255, 0, 51, .4); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: var(--bg-elev); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: #fff; }
.btn-danger { background: rgba(255, 77, 109, .15); color: var(--danger); border-color: rgba(255, 77, 109, .4); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ============ 布局 ============ */
.site-main { max-width: 1280px; margin: 0 auto; padding: 0 16px; padding-bottom: calc(var(--tabbar-h) + 24px); }
body.has-player .site-main { padding-bottom: calc(var(--tabbar-h) + var(--player-h) + 24px); }
@media (min-width: 900px) {
  body.has-player .site-main { padding-bottom: calc(var(--player-h) + 40px); }
}

.section { padding: 26px 0 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 19px; margin: 0; letter-spacing: .2px; }
.section-more { font-size: 13px; color: var(--text-dim); }
.section-more:hover { color: var(--accent); }

.page-head-section { padding-top: 26px; }
.page-title { font-size: 26px; margin: 0 0 4px; }
.page-sub { color: var(--text-dim); font-size: 13px; margin: 0 0 16px; }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 18px 0 8px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(120% 100% at 12% 0%, rgba(255, 0, 51, .34), transparent 58%),
              radial-gradient(100% 100% at 92% 8%, rgba(255, 45, 85, .24), transparent 55%),
              var(--bg-soft);
}
.hero-inner { padding: 30px 20px 22px; }
.hero-eyebrow { font-size: 12.5px; color: var(--accent); letter-spacing: .5px; }
.hero-title { font-size: 28px; line-height: 1.25; margin: 10px 0 10px; letter-spacing: -.5px; }
.hero-title em { font-style: normal; background: linear-gradient(92deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--text-dim); font-size: 14px; max-width: 560px; margin: 0 0 20px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-cards { display: grid; gap: 10px; margin-top: 22px; }
.hero-card {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px 8px 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  color: var(--text);
  text-align: left;
  transition: .18s;
}
.hero-card:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 0, 51, .55); }
.hero-card img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; }
.hero-card-info { display: flex; flex-direction: column; min-width: 0; }
.hero-card-info strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card-info small { color: var(--text-dim); font-size: 12px; }
.hero-card-play { margin-left: auto; color: var(--accent); font-size: 14px; }

/* ============ 分类 chip ============ */
.chip-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--text-dim);
  transition: .18s;
}
.chip:hover { color: #fff; border-color: var(--primary); background: var(--bg-elev); }

/* ============ 曲目网格 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: .2s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(255, 0, 51, .6); box-shadow: var(--shadow); }
.card-cover { position: relative; aspect-ratio: 1 / 1; background: var(--bg-elev); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-play {
  position: absolute; right: 10px; bottom: 10px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; color: #fff; font-size: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 22px rgba(255, 0, 51, .55);
  opacity: 0; transform: translateY(8px);
  transition: .2s;
}
.card:hover .card-play, .card.is-playing .card-play { opacity: 1; transform: translateY(0); }
.card.is-playing .card-play { background: linear-gradient(135deg, var(--accent), #00b894); }
@media (hover: none) { .card-play { opacity: 1; transform: none; } }

.badge {
  position: absolute;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
  letter-spacing: .4px;
}
.badge-hot { left: 8px; top: 8px; background: linear-gradient(92deg, #ff4d6d, #ff9f43); color: #fff; }
.badge-dur { right: 8px; top: 8px; background: rgba(0, 0, 0, .62); color: #fff; font-weight: 500; }
.badge-admin { background: rgba(255, 0, 51, .24); color: #ff8fa3; padding: 1px 8px; border-radius: 6px; font-size: 11px; }

.card-body { padding: 10px 11px 12px; }
.card-title { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title:hover { color: var(--accent); }
.card-artist { display: block; font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.card-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-mute); margin-top: 6px; }

.load-more-wrap { text-align: center; padding: 24px 0 8px; }
.empty { text-align: center; color: var(--text-mute); padding: 40px 0; }

/* ============ 筛选栏 ============ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-bar input[type="search"] { flex: 1 1 200px; min-width: 0; }
.filter-bar input, .filter-bar select {
  height: 40px; padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--primary); }

/* ============ 详情页 ============ */
.detail-hero { display: flex; flex-direction: column; gap: 20px; padding: 22px 0 6px; }
.detail-cover-wrap { width: 100%; max-width: 320px; }
.detail-cover { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); }
.detail-info { flex: 1; min-width: 0; }
.detail-back { font-size: 13px; color: var(--text-dim); }
.detail-back:hover { color: var(--accent); }
.detail-title { font-size: 26px; margin: 10px 0 2px; letter-spacing: -.4px; line-height: 1.25; }
.detail-artist { color: var(--text-dim); margin: 0 0 14px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--line); color: var(--text-dim); }
.tag-cat { background: rgba(255, 0, 51, .16); color: #ff8fa3; border-color: rgba(255, 0, 51, .4); }
.tag-link:hover { color: var(--accent); border-color: var(--accent); }
.detail-stats { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-mute); margin-bottom: 18px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.detail-desc { color: var(--text-dim); font-size: 14px; border-top: 1px solid var(--line); padding-top: 14px; margin: 0; }
@media (min-width: 780px) {
  .detail-hero { flex-direction: row; gap: 34px; padding-top: 34px; }
  .detail-cover-wrap { width: 340px; flex: none; }
  .detail-title { font-size: 32px; }
}

/* ============ 表单 ============ */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.field input[type="text"], .field input[type="password"], .field input[type="number"],
.field select, .field textarea {
  height: 40px; padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
  transition: .18s;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); background: var(--bg-elev); }
.field input[type="file"] { font-size: 12.5px; color: var(--text-dim); }
.field-check { flex-direction: row; align-items: center; gap: 8px; }
.form-error { color: var(--danger); font-size: 13px; margin: 0; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ============ 登录注册 ============ */
.auth-wrap { display: grid; place-items: center; min-height: 68vh; padding: 24px 0; }
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
}
.auth-title { font-size: 22px; margin: 0 0 4px; }
.auth-sub { color: var(--text-dim); font-size: 13px; margin: 0 0 20px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-dim); margin: 18px 0 0; }
.auth-foot a { color: var(--accent); }

/* ============ 个人中心 ============ */
.profile-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 20px;
  background: linear-gradient(120deg, rgba(255, 0, 51, .18), rgba(255, 45, 85, .1));
  border: 1px solid var(--line);
  border-radius: 18px;
}
.profile-avatar {
  width: 68px; height: 68px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 26px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 20px; margin: 0; }
.profile-sub { font-size: 12.5px; color: var(--text-dim); margin: 2px 0 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.profile-stats { display: flex; gap: 20px; font-size: 13px; color: var(--text-dim); }
.profile-stats b { color: var(--text); font-size: 15px; }
.profile-actions { margin-left: auto; display: flex; gap: 8px; }

/* ============ 管理后台 ============ */
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 2px;
}
.stat-card b { font-size: 22px; letter-spacing: -.5px; }
.stat-card span { font-size: 12.5px; color: var(--text-dim); }

.upload-form { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.upload-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.progress { flex: 1; min-width: 160px; height: 8px; border-radius: 999px; background: var(--bg-elev); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(92deg, var(--primary), var(--accent)); transition: width .2s; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { background: var(--bg-elev); color: var(--text-dim); font-weight: 600; font-size: 12.5px; }
.table tr:last-child td { border-bottom: 0; }
.table a:hover { color: var(--accent); }
.thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: var(--bg-elev); }
.table-empty { text-align: center; color: var(--text-mute); padding: 24px; }
.dot-on { color: var(--accent); }
.dot-off { color: var(--danger); }

/* ============ 底部播放器 ============ */
.player {
  position: fixed; left: 0; right: 0; bottom: var(--tabbar-h);
  z-index: 70;
  height: var(--player-h);
  background: rgba(18, 18, 28, .96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .player { bottom: 0; } }

.player-inner {
  max-width: 1280px; margin: 0 auto; height: 100%;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}
.player-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-cover { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bg-elev); }
.player-info { display: flex; flex-direction: column; min-width: 0; }
.player-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-title:hover { color: var(--accent); }
.player-artist { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player-controls { display: flex; align-items: center; gap: 6px; }
.p-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: transparent; color: var(--text); font-size: 15px;
  display: grid; place-items: center;
  transition: .15s;
}
.p-btn:hover { background: var(--bg-elev); color: var(--accent); }
.p-play { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-size: 14px; }
.p-play:hover { filter: brightness(1.12); color: #fff; }
.p-btn.is-fav { color: var(--danger); }

.p-progress-wrap { display: none; align-items: center; gap: 8px; flex: 1; }
.p-time { font-size: 11.5px; color: var(--text-mute); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }

.p-seek, .p-volume { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 999px; background: var(--bg-elev); outline: none; }
.p-seek { flex: 1; cursor: pointer; }
.p-seek::-webkit-slider-thumb, .p-volume::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 45, 85, .24);
}
.p-seek::-moz-range-thumb, .p-volume::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--accent); }

.player-extra { display: none; align-items: center; gap: 6px; }
.p-volume { width: 80px; }

@media (min-width: 900px) {
  .player-inner { grid-template-columns: 260px 1fr 180px; }
  .p-progress-wrap { display: flex; }
  .player-extra { display: flex; justify-content: flex-end; }
}

/* ============ 移动端 TabBar ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  height: var(--tabbar-h);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: rgba(13, 2, 4, .97);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 900px) { .tabbar { display: none; } }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--text-mute); font-size: 11px; transition: .15s; }
.tab-icon { font-size: 18px; line-height: 1; }
.tab.active { color: var(--accent); }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--player-h) + 20px);
  transform: translate(-50%, 12px);
  background: rgba(30, 30, 46, .98);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  opacity: 0; pointer-events: none;
  transition: .22s;
  z-index: 200;
  max-width: 84vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255, 77, 109, .55); color: #ffc2cf; }

/* ============ 404 ============ */
.error-page { text-align: center; padding: 80px 0; }
.error-code { font-size: 72px; margin: 0; background: linear-gradient(92deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-text { color: var(--text-dim); margin: 6px 0 22px; }

/* ============ 桌面端细节 ============ */
@media (min-width: 900px) {
  .nav-pc { display: flex; }
  .hero-inner { padding: 46px 40px 34px; }
  .hero-title { font-size: 40px; }
  .hero-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-main { padding: 0 24px; }
  .section { padding: 34px 0 8px; }
}

@media (min-width: 620px) and (max-width: 899px) {
  .nav-pc { display: flex; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============ 账号设置 ============ */
.account-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 780px) { .account-grid { grid-template-columns: 1fr 1fr; } }
.account-sub { font-size: 15px; margin: 0 0 2px; color: var(--text); }
