Skip to content

一分钟搭建影视站,支持Docker等部署方式

7.8 KB
Raw Blame
@tailwind base;
@tailwind components;
@tailwind utilities;

/*
 * 语义化配色(RGB 三元组,供 Tailwind 以 <alpha-value> 注入透明度):
 * 深色主题沿用旧版 LibreTV 配色;浅色主题为对应的白底变体。
 */
:root {
  --c-page: 246 247 249;           /* #f6f7f9 */
  --c-surface: 255 255 255;        /* #ffffff */
  --c-surface-raised: 255 255 255;
  --c-card: 255 255 255;
  --c-chip: 238 240 243;           /* #eef0f3 */
  --c-hover: 233 236 240;          /* #e9ecf0 */
  --c-line: 224 227 232;           /* #e0e3e8 */
  --c-content: 26 26 26;           /* #1a1a1a */
  --c-muted: 95 99 104;            /* #5f6368 */
  --c-faint: 107 114 128;          /* #6b7280(原 #8a8f98 对白底仅 3.2:1,加深后达到 AA 4.5:1) */
  --c-accent: 37 99 235;           /* blue-600 */
  --c-accent-hover: 29 78 216;     /* blue-700 */
  --c-on-accent: 255 255 255;      /* accent 实心底上的文字色 */
  /* 语义状态色(亮色主题取偏深值,保证浅底上的对比度) */
  --c-danger: 220 38 38;           /* red-600 */
  --c-danger-hover: 185 28 28;     /* red-700 */
  --c-success: 22 163 74;          /* green-600 */
  --c-warning: 217 119 6;          /* amber-600 */
  --c-info: 37 99 235;             /* blue-600 */
  --c-rating: 245 158 11;          /* amber-500 */
  /* 实心状态底色(配白字):比「文字用」色更深一档,保证白字对比度 ≥ 4.5:1 */
  --c-danger-solid: 185 28 28;     /* red-700 */
  --c-success-solid: 21 128 61;    /* green-700 */
  --c-warning-solid: 180 83 9;     /* amber-700 */
  --c-info-solid: 29 78 216;       /* blue-700 */
  color-scheme: light;
}

.dark {
  /* 旧版 LibreTV(backup-2025)赛博影视主题(整体调深一档):深蓝黑底 + 霓虹蓝/粉点缀 */
  --c-page: 11 16 26;              /* #0b101a 深蓝黑页面底色 */
  --c-surface: 20 28 41;           /* #141c29 弹窗/抽屉底色 */
  --c-surface-raised: 20 28 41;
  --c-card: 13 20 31;              /* #0d141f 卡片底色 */
  --c-chip: 22 32 46;              /* #16202e 卡片/输入框底色 */
  --c-hover: 29 42 61;             /* #1d2a3d 悬停态(chip 提亮) */
  --c-line: 34 48 69;              /* #223045 边框(近似旧版 rgba(0,204,255,.15) 观感) */
  --c-content: 230 242 255;        /* #e6f2ff 蓝白主文本(--text-color) */
  --c-muted: 133 153 178;          /* #8599b2 次级文本(--text-muted) */
  --c-faint: 122 140 166;          /* #7a8ca6 三级文本(原 #6b7f99 在抽屉底色 #141c29 上仅 4.17:1,12px 小字不达标;提亮后 4.99:1) */
  --c-accent: 0 184 230;           /* #00b8e6 霓虹蓝主色(--primary-color 调深一档) */
  --c-accent-hover: 51 214 255;    /* #33d6ff 霓虹蓝浅变体(--primary-light) */
  /* 霓虹蓝底亮度过高(对白字仅 2.35:1),暗色下实心底改用深色文字 */
  --c-on-accent: 8 19 31;
  /* 语义状态色(暗色主题取中等明度值,保证深蓝黑底上的对比度) */
  --c-danger: 239 68 68;           /* red-500 */
  --c-danger-hover: 248 113 113;   /* red-400 */
  --c-success: 34 197 94;          /* green-500 */
  --c-warning: 245 158 11;         /* amber-500 */
  --c-info: 59 130 246;            /* blue-500 */
  --c-rating: 251 191 36;          /* amber-400 */
  /* 实心状态底色(配白字):与亮色一致取深档,避免琥珀/绿色底白字对比度不足 */
  --c-danger-solid: 185 28 28;     /* red-700 */
  --c-success-solid: 21 128 61;    /* green-700 */
  --c-warning-solid: 180 83 9;     /* amber-700 */
  --c-info-solid: 29 78 216;       /* blue-700 */
  color-scheme: dark;
}

html,
body {
  @apply bg-page text-content antialiased;
}

/* 暗色主题:模拟旧版 .page-bg 的深蓝黑纵向渐变 */
.dark body {
  background: linear-gradient(180deg, rgb(11 16 26), rgb(20 28 41)) fixed;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

@layer components {
  .card {
    @apply bg-card border border-line rounded-lg overflow-hidden transition-all duration-200;
  }
  .btn {
    @apply inline-flex items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-sm transition-colors disabled:opacity-40 disabled:cursor-not-allowed;
    /* 统一焦点环:键盘用户可见,与 .input 同一规格 */
    @apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40;
  }
  .btn-primary {
    @apply btn bg-accent text-on-accent hover:bg-accent-hover;
  }
  .btn-ghost {
    @apply btn bg-chip text-muted hover:bg-hover hover:text-content border border-line;
  }
  .input {
    @apply bg-chip border border-line rounded-md px-3 py-2 text-sm text-content placeholder:text-faint;
    @apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:border-accent;
  }
  .tag {
    @apply inline-flex items-center text-xs px-1.5 py-0.5 rounded-full;
  }
  /* 小尺寸按钮:定义在 .btn-* 之后,确保尺寸覆盖生效(与 .btn-primary / .btn-ghost 组合使用) */
  .btn-sm {
    @apply btn px-2.5 py-1 text-xs;
  }
  /* 胶囊控件(筛选、分类标签):统一内边距与圆角 */
  .chip {
    @apply inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] transition-colors;
  }
  .scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  .scrollbar-thin::-webkit-scrollbar-thumb {
    @apply bg-line rounded-full;
  }
}

/* 行数截断 */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 播放器集数激活态 */
.episode-active {
  background: rgb(var(--c-accent)) !important;
  border-color: rgb(var(--c-accent)) !important;
  /* 暗色下霓虹蓝底对白字对比度不足,统一用 on-accent(亮色白 / 暗色深) */
  color: rgb(var(--c-on-accent)) !important;
}

/* 品牌渐变字(沿用旧版 LibreTV 的霓虹蓝→霓虹粉) */
.brand-gradient {
  background: linear-gradient(to right, #00ccff, #ff3c78);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* LIVE 呼吸红点(直播页标识) */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #ef4444;
  animation: live-breathe 2s ease-in-out infinite;
}
@keyframes live-breathe {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { opacity: 0.55; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

/*
 * 播放器控制条在窄屏没有多余横向空间:
 * 上/下集控件会把右侧的「网页全屏」「全屏」挤出可视区(手机上表现为图标显示不全)。
 * 只在窄于 640px 时收起这两个控件——手机横屏、平板仍有空间,可以保留。
 * 切集在任何情况下都还能用播放器下方的按钮。
 */
@media (max-width: 640px) {
  /* 竖屏空间只够放「播放 + 时间 + 设置 + 网页全屏 + 全屏」:
     音量交给系统按键,截图与画中画在手机上很少用,一并收起,
     保证最右侧的全屏按钮完整可见 */
  .art-control-prev-episode,
  .art-control-next-episode,
  .art-control-volume,
  .art-control-screenshot,
  .art-control-pip {
    display: none !important;
  }

  /* 00:04 / 01:26:30 这种长文本占宽最多,缩字号再收紧内边距 */
  .art-control-time {
    font-size: 11px;
    padding: 0 2px;
  }

  /* 默认每个图标 46px,竖屏下收到 40px —— 省出的宽度正好让最后一个全屏按钮不贴边 */
  .art-control-playAndPause,
  .art-control-setting,
  .art-control-fullscreenWeb,
  .art-control-fullscreen {
    width: 40px !important;
    min-width: 40px !important;
  }
}