/* ============================================================
   一条鱼 · 助眠工作台  —— 深海主题
   ============================================================ */

:root {
  --bg: #0e1b24;
  --bg-deep: #0a141b;
  --panel: #142632;
  --panel-2: #17303d;
  --panel-hover: #1b3948;
  --border: #23404f;
  --border-soft: #1c3340;
  --text: #dce8ec;
  --text-dim: #8aa5b0;
  --text-faint: #5f7a86;
  --accent: #7fd4c8;
  --accent-deep: #4fb3a6;
  --gold: #e0b87d;
  --trigger: #7fb8d4;
  --scene: #93cfb0;
  --danger: #e08a8a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font-display: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input {
  font-family: inherit;
}

/* ============ 背景气泡（签名动效） ============ */

.bubbles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bubble {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  border: 1px solid rgba(127, 212, 200, 0.22);
  background: radial-gradient(circle at 32% 30%, rgba(127, 212, 200, 0.14), rgba(127, 212, 200, 0.02));
  animation: rise linear infinite;
}

.b1 { left: 6%; width: 14px; height: 14px; animation-duration: 26s; animation-delay: 0s; }
.b2 { left: 18%; width: 8px; height: 8px; animation-duration: 19s; animation-delay: 4s; }
.b3 { left: 33%; width: 20px; height: 20px; animation-duration: 32s; animation-delay: 9s; }
.b4 { left: 47%; width: 10px; height: 10px; animation-duration: 22s; animation-delay: 2s; }
.b5 { left: 61%; width: 16px; height: 16px; animation-duration: 28s; animation-delay: 12s; }
.b6 { left: 74%; width: 7px; height: 7px; animation-duration: 17s; animation-delay: 6s; }
.b7 { left: 86%; width: 12px; height: 12px; animation-duration: 24s; animation-delay: 15s; }
.b8 { left: 94%; width: 18px; height: 18px; animation-duration: 35s; animation-delay: 3s; }

@keyframes rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: 0.9; }
  50% { transform: translateY(-55vh) translateX(14px); }
  92% { opacity: 0.7; }
  100% { transform: translateY(-110vh) translateX(-10px); opacity: 0; }
}

/* ============ 整体布局 ============ */

.app {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100vh;
}

/* ============ 左侧导航 ============ */

.sidebar {
  width: 248px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  border-right: 1px solid var(--border-soft);
  padding: 26px 18px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 26px;
}

.brand-fish {
  width: 42px;
  height: 28px;
  color: var(--accent);
  flex-shrink: 0;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
}

.brand-text p {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 3px;
  margin-top: 2px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--text-dim);
  text-align: left;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--panel-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--panel-2);
  color: var(--accent);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nav-tag {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--accent);
  border: 1px solid rgba(127, 212, 200, 0.35);
  border-radius: 20px;
  padding: 1px 8px;
  letter-spacing: 1px;
}

.nav-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--panel-hover);
  color: var(--text-dim);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item.active .nav-badge {
  background: rgba(127, 212, 200, 0.16);
  color: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 10px 4px;
  border-top: 1px solid var(--border-soft);
}

.date-label {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.date-hint {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 3px;
}

/* ============ 主区域 ============ */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 32px 24px;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.view-head h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
}

.view-head p {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.search-box {
  position: relative;
  width: 320px;
  max-width: 100%;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 42px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-box input::placeholder {
  color: var(--text-faint);
}

.search-box input:focus {
  border-color: var(--accent-deep);
  background: var(--panel-2);
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

.search-clear:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.search-clear.show {
  display: flex;
}

.search-clear svg {
  position: static;
  width: 14px;
  height: 14px;
  transform: none;
}

/* ============ 筛选栏 ============ */

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 20px;
  flex-wrap: wrap;
}

.type-filters {
  display: flex;
  gap: 8px;
}

.chip {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: var(--accent-deep);
  color: var(--text);
}

.chip.active {
  background: rgba(127, 212, 200, 0.14);
  border-color: var(--accent-deep);
  color: var(--accent);
}

.scope-toggle {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 3px;
}

.scope-btn {
  padding: 6px 16px;
  border-radius: 17px;
  font-size: 12.5px;
  color: var(--text-dim);
  transition: all 0.2s ease;
}

.scope-btn.active {
  background: var(--panel-hover);
  color: var(--text);
}

/* ============ 偏好提示条 ============ */

.pref-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent-deep);
  border-left: 3px solid var(--accent);
  background: rgba(127, 212, 200, 0.07);
  font-size: 12.5px;
}

.pref-hint[hidden] {
  display: none;
}

.pref-label {
  color: var(--text-dim);
}

.pref-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pref-chips span {
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  color: var(--accent);
  background: rgba(127, 212, 200, 0.12);
  border: 1px solid var(--border-soft);
}

/* ============ 内容区 ============ */

.content {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
}

.content::-webkit-scrollbar {
  width: 8px;
}

.content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.content::-webkit-scrollbar-track {
  background: transparent;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

/* ---- 内容卡片 ---- */

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border);
  background: var(--panel-2);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-badge {
  font-size: 11.5px;
  padding: 2px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.type-badge.trigger {
  color: var(--trigger);
  background: rgba(127, 158, 212, 0.13);
  border: 1px solid rgba(127, 158, 212, 0.3);
}

.type-badge.scene {
  color: var(--scene);
  background: rgba(147, 207, 176, 0.12);
  border: 1px solid rgba(147, 207, 176, 0.3);
}

.today-mark {
  font-size: 11px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
}

.today-mark::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.card-title {
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.5;
  padding-right: 30px;
}

.card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.card-tags span {
  font-size: 11.5px;
  color: var(--text-faint);
  background: var(--bg-deep);
  border-radius: 6px;
  padding: 2px 9px;
}

/* 收藏按钮（气泡） */
.fav-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.fav-btn svg {
  width: 17px;
  height: 17px;
}

.fav-btn:hover {
  border-color: var(--border);
  color: var(--accent);
  background: var(--panel-hover);
}

.fav-btn.faved {
  color: var(--accent);
}

.fav-btn.faved svg path {
  fill: rgba(127, 212, 200, 0.25);
}

/* 爆款卡片特有 */
.hot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

.platform {
  color: var(--gold);
  background: rgba(224, 184, 125, 0.1);
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 11.5px;
}

.heat {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gold);
}

.heat svg {
  width: 14px;
  height: 14px;
}

.remix {
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.6;
}

.remix strong {
  color: var(--accent);
  font-weight: 500;
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.mini-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-dim);
  transition: all 0.2s ease;
}

.mini-btn:hover {
  border-color: var(--accent-deep);
  color: var(--accent);
  background: rgba(127, 212, 200, 0.08);
}

/* ============ 小窗行列表 ============ */

.row-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 920px;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.list-row:hover {
  border-color: var(--border);
  background: var(--panel-hover);
}

.row-thumb {
  width: 126px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: var(--bg-deep);
  display: block;
}

.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.list-row:hover .row-thumb img {
  transform: scale(1.05);
}

.thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 27, 0.28);
  color: #fff;
  transition: background 0.2s ease, color 0.2s ease;
}

.thumb-play svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.row-thumb:hover .thumb-play {
  background: rgba(10, 20, 27, 0.1);
  color: var(--accent);
}

/* 无封面的类型占位图标 */
.thumb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft);
}

.thumb-icon svg {
  width: 28px;
  height: 28px;
}

.thumb-icon.trigger {
  color: var(--trigger);
  background: rgba(127, 158, 212, 0.08);
}

.thumb-icon.scene {
  color: var(--scene);
  background: rgba(147, 207, 176, 0.08);
}

.row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.row-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-head .type-badge,
.row-head .today-mark {
  flex-shrink: 0;
}

.row-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-text,
.row-remix {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-text {
  color: var(--text-dim);
}

.row-remix {
  color: var(--text-faint);
}

.row-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-faint);
  flex-wrap: wrap;
}

.row-foot .platform {
  padding: 1px 8px;
  font-size: 11px;
}

.row-foot .heat {
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 5px;
}

.row-foot .heat::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.row-foot span {
  white-space: nowrap;
}

.row-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.side-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  transition: all 0.2s ease;
}

.side-btn svg {
  width: 17px;
  height: 17px;
}

.side-btn:hover {
  color: var(--accent);
  border-color: var(--accent-deep);
  background: rgba(127, 212, 200, 0.08);
}

.side-btn.faved {
  color: var(--accent);
}

.side-btn.faved svg path {
  fill: rgba(127, 212, 200, 0.25);
}

/* ============ 任务视图 ============ */

.task-panel {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 760px;
}

.task-progress {
  margin-bottom: 20px;
}

.progress-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.progress-line h3 {
  font-size: 15px;
  font-weight: 500;
}

.progress-line span {
  font-size: 12.5px;
  color: var(--text-dim);
}

.progress-track {
  height: 7px;
  border-radius: 4px;
  background: var(--bg-deep);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width 0.35s ease;
}

.task-add {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.task-add input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
}

.task-add input:focus {
  border-color: var(--accent-deep);
}

.task-add select {
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-dim);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.task-add button {
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #0a141b;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.task-add button:hover {
  background: var(--accent-deep);
}

.task-add button svg {
  width: 16px;
  height: 16px;
}

.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border: 1px solid var(--border-soft);
  transition: opacity 0.25s ease;
}

.task-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--text-faint);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.task-check svg {
  width: 13px;
  height: 13px;
  color: #0a141b;
  opacity: 0;
}

.task-item.done .task-check {
  background: var(--accent);
  border-color: var(--accent);
}

.task-item.done .task-check svg {
  opacity: 1;
}

.task-label {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

.task-item.done .task-label {
  color: var(--text-faint);
  text-decoration: line-through;
}

.task-type {
  font-size: 11px;
  border-radius: 6px;
  padding: 2px 9px;
  flex-shrink: 0;
}

.task-type.trigger {
  color: var(--trigger);
  background: rgba(127, 158, 212, 0.12);
}

.task-type.scene {
  color: var(--scene);
  background: rgba(147, 207, 176, 0.12);
}

.task-type.general {
  color: var(--text-dim);
  background: var(--panel-hover);
}

.task-del {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.task-del svg {
  width: 16px;
  height: 16px;
}

.task-del:hover {
  color: var(--danger);
  background: rgba(224, 138, 138, 0.1);
}

/* ---- 任务状态筛选 ---- */

.task-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.task-filter {
  padding: 7px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-dim);
  transition: all 0.2s ease;
}

.task-filter:hover {
  color: var(--text);
  border-color: var(--accent-deep);
}

.task-filter.active {
  background: rgba(127, 212, 200, 0.14);
  border-color: var(--accent-deep);
  color: var(--accent);
}

/* ---- 写脚本按钮 ---- */

.task-script-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.task-script-btn svg {
  width: 15px;
  height: 15px;
}

.task-script-btn:hover,
.task-script-btn.active {
  color: var(--accent);
  border-color: var(--accent-deep);
  background: rgba(127, 212, 200, 0.08);
}

/* ---- 脚本编辑面板 ---- */

.script-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(14, 27, 36, 0.55);
  border: 1px solid var(--border-soft);
}

.script-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.script-field label {
  font-size: 12.5px;
  color: var(--text-dim);
}

.script-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 60px;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
  font-family: inherit;
  outline: none;
}

.script-field textarea:focus {
  border-color: var(--accent-deep);
}

.script-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.script-copy {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent-deep);
  background: rgba(127, 212, 200, 0.1);
  color: var(--accent);
  font-size: 12px;
  transition: all 0.2s ease;
}

.script-copy:hover {
  background: rgba(127, 212, 200, 0.2);
}

/* ---- 备份条 ---- */

.backup-bar {
  display: flex;
  gap: 8px;
  padding: 0 22px 14px;
}

.backup-bar button {
  flex: 1;
  padding: 8px 0;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 12.5px;
  transition: all 0.2s ease;
}

.backup-bar button:hover {
  color: var(--accent);
  border-color: var(--accent-deep);
}

/* ============ 空态 ============ */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px 20px;
  text-align: center;
  gap: 10px;
}

.empty svg {
  width: 56px;
  height: 56px;
  color: var(--text-faint);
  opacity: 0.6;
}

.empty h3 {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text-dim);
}

.empty p {
  font-size: 13px;
  color: var(--text-faint);
  max-width: 340px;
}

/* ============ Toast ============ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-hover);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  padding: 11px 22px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============ 响应式 ============ */

@media (max-width: 1080px) {
  .sidebar {
    width: 208px;
    padding: 22px 14px 18px;
  }
  .nav-item.active::before {
    left: -14px;
  }
  .main {
    padding: 24px 22px 20px;
  }
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }
  .app {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 14px 18px;
    gap: 14px;
    flex-wrap: wrap;
  }
  .brand {
    padding: 0;
  }
  .brand-text p {
    display: none;
  }
  .nav {
    flex-direction: row;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
  }
  .nav-item {
    width: auto;
    padding: 8px 12px;
  }
  .nav-item.active::before {
    display: none;
  }
  .nav-tag,
  .nav-badge {
    display: none;
  }
  .sidebar-footer {
    display: none;
  }
  .main {
    overflow: visible;
  }
  .content {
    overflow: visible;
    padding-right: 0;
  }
  .search-box {
    width: 100%;
  }
  .list-row {
    gap: 10px;
    padding: 8px 10px;
  }
  .row-thumb {
    width: 96px;
  }
  .row-remix {
    display: none;
  }
  .row-side {
    gap: 5px;
  }
  .side-btn {
    width: 30px;
    height: 30px;
  }
  .task-panel {
    padding: 16px;
  }
  .task-add {
    flex-wrap: wrap;
  }
  .task-add input {
    flex-basis: 100%;
  }
  .task-add select,
  .task-add button {
    flex: 1;
  }
  .task-line {
    gap: 8px;
    flex-wrap: wrap;
  }
  .backup-bar {
    padding: 0 16px 12px;
  }
}

/* ============ 手机窄屏 ============ */

@media (max-width: 480px) {
  .task-line {
    gap: 6px;
  }
  .task-type {
    display: none;
  }
  .task-script-btn {
    padding: 6px 8px;
  }
  .task-script-btn {
    font-size: 0;
    gap: 0;
  }
  .task-script-btn svg {
    width: 16px;
    height: 16px;
  }
  .row-thumb {
    width: 84px;
  }
  .row-text {
    display: none;
  }
  .script-panel {
    padding: 11px;
  }
  .script-field textarea {
    font-size: 12.5px;
  }
  .filter-bar {
    margin: 16px 0;
  }
  .chip {
    padding: 7px 14px;
    font-size: 12.5px;
  }
}

/* ============ 动效偏好 ============ */

@media (prefers-reduced-motion: reduce) {
  .bubble {
    animation: none;
    display: none;
  }
  * {
    transition: none !important;
  }
}
