/* ==================================================================
   风云直播中心 —— 基础样式
   品牌视觉：深黑 / 枪灰 / 香槟金 / 金属质感
   币圈栏目：深蓝 / 电光青
   ★ 禁止：AI 机器人、大脑、魔法棒、星星图标、紫色 AI 渐变
   图标一律用纯 CSS 线条绘制，不引入任何第三方图标库
   ================================================================== */

:root {
  --bg:        #0B0D10;
  --panel:     #14181D;
  --panel-2:   #191E24;
  --line:      #2A3038;
  --line-soft: #21262d;

  --gold:      #C8A96A;
  --gold-lt:   #E8D5A8;
  --gold-dk:   #8C7340;
  --metal:     linear-gradient(90deg, #8C7340, #C8A96A, #E8D5A8, #C8A96A, #8C7340);

  --text:      #E6E8EA;
  --muted:     #9AA3AD;
  --faint:     #6B7480;

  --up:        #3FBF7F;
  --down:      #E2534A;

  --cyan:      #3FE0E8;
  --navy:      #071426;
  --navy-2:    #0A2A4A;

  --radius:    6px;
  --shadow:    0 6px 24px rgba(0,0,0,.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-lt); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,16,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ''; display: block; height: 1px; background: var(--metal); opacity: .55;
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 22px; height: 22px; flex-shrink: 0;
  border: 1.5px solid var(--gold); border-radius: 3px;
  position: relative;
}
.brand-mark::before {
  content: ''; position: absolute; inset: 4px 4px auto 4px; height: 1.5px;
  background: var(--gold);
}
.brand-mark::after {
  content: ''; position: absolute; inset: auto 4px 4px 4px; height: 1.5px;
  background: var(--gold); opacity: .55;
}
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: 1px; white-space: nowrap; }
.brand-sub {
  font-size: 12px; color: var(--faint); border-left: 1px solid var(--line);
  padding-left: 10px; margin-left: 2px; white-space: nowrap;
}
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--muted); font-size: 14px; padding: 7px 13px; border-radius: 4px;
  white-space: nowrap; transition: .15s;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--gold); background: var(--panel); }
.me { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.me-name { font-size: 14px; }
.me-role { font-size: 12px; color: var(--faint); }

/* ---------------- 按钮 ---------------- */
.btn, .btn-ghost, .btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 14px/1 var(--font); font-weight: 500; cursor: pointer;
  border-radius: 4px; padding: 10px 20px; border: 1px solid transparent;
  transition: .15s; text-align: center; white-space: nowrap;
}
.btn { background: var(--gold); color: #0B0D10; font-weight: 600; }
.btn:hover { background: var(--gold-lt); color: #0B0D10; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--gold); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-lt); }
.btn-sm { padding: 6px 12px; font-size: 13px; background: transparent; color: var(--muted); border-color: var(--line); }
.btn-sm:hover { color: var(--text); border-color: var(--gold); }
.btn-danger { color: var(--down); border-color: rgba(226,83,74,.4); }
.btn-danger:hover { color: #ff8078; border-color: var(--down); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- 线性图标（纯 CSS，无第三方图标库） ---------------- */
.ext-icon, .dl-icon, .copy-icon {
  display: inline-block; width: 11px; height: 11px; margin-left: 5px;
  position: relative; flex-shrink: 0;
}
.ext-icon::before {  /* 外链 ↗ */
  content: ''; position: absolute; inset: 0;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
}
.ext-icon::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 13px; height: 1.5px;
  background: currentColor; transform: rotate(-45deg); transform-origin: left bottom;
}
.dl-icon::before {   /* 下载 ⤓ */
  content: ''; position: absolute; left: 4px; top: 0; width: 1.5px; height: 8px; background: currentColor;
}
.dl-icon::after {
  content: ''; position: absolute; left: 1px; top: 4px; width: 7px; height: 7px;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}
.copy-icon::before { /* 复制 ⧉ */
  content: ''; position: absolute; left: 0; top: 2px; width: 8px; height: 8px;
  border: 1.5px solid currentColor;
}
.copy-icon::after {
  content: ''; position: absolute; left: 3px; top: 0; width: 8px; height: 8px;
  border: 1.5px solid currentColor; background: var(--bg);
}

/* ---------------- 通用块 ---------------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 20px 64px; }
.wrap-narrow { max-width: 900px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card + .card { margin-top: 16px; }

.section-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 32px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: 19px; letter-spacing: 1px; }
.section-head .sub { color: var(--faint); font-size: 13px; }
.section-head::before {
  content: ''; width: 3px; height: 18px; background: var(--metal); border-radius: 2px;
  align-self: center;
}

.hr-metal { height: 1px; background: var(--metal); opacity: .5; border: 0; margin: 24px 0; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.mono  { font-family: var(--mono); }
.up    { color: var(--up); }
.down  { color: var(--down); }
.nowrap{ white-space: nowrap; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 3px;
  font-size: 12px; line-height: 18px; border: 1px solid currentColor;
}
.tag-solid { border: 0; color: #0B0D10; font-weight: 600; }
.tag-cat-finance { color: var(--gold); }
.tag-cat-crypto  { color: var(--cyan); }

/* ---------------- Flash ---------------- */
.flash {
  padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px;
  border-left: 3px solid var(--up); background: rgba(63,191,127,.09); color: #b9ecd0;
}
.flash.err  { border-color: var(--down); background: rgba(226,83,74,.09); color: #ffb4ae; }
.flash.warn { border-color: var(--gold); background: rgba(200,169,106,.09); color: #e2d4b4; }

/* ---------------- 空状态 ---------------- */
.empty {
  text-align: center; padding: 48px 24px;
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--panel);
}
.empty-mark {
  width: 40px; height: 40px; margin: 0 auto 16px;
  border: 1.5px solid var(--line); border-radius: 4px; position: relative;
}
.empty-mark::before {
  content: ''; position: absolute; left: 9px; right: 9px; top: 14px; height: 1.5px; background: var(--line);
}
.empty-mark::after {
  content: ''; position: absolute; left: 9px; right: 16px; top: 22px; height: 1.5px; background: var(--line);
}
.empty-title { font-size: 16px; color: var(--muted); margin: 0 0 6px; }
.empty-hint  { font-size: 13px; color: var(--faint); margin: 0 0 20px; }

/* ---------------- 表单 ---------------- */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=url], input[type=number],
input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px; color: var(--text);
  font: 14px/1.5 var(--font);
}
textarea { resize: vertical; min-height: 68px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
input::placeholder, textarea::placeholder { color: #4a5058; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 32px;
}
.field { margin-bottom: 14px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > .field { flex: 1; min-width: 160px; }
.checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.checkbox input { width: auto; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.data th {
  text-align: left; padding: 10px 12px; color: var(--faint); font-weight: 500;
  font-size: 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:hover td { background: rgba(255,255,255,.02); }

/* ---------------- 分页 ---------------- */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 4px; font-size: 13px; color: var(--muted); padding: 0 10px;
}
.pager a:hover { border-color: var(--gold); color: var(--gold); }
.pager .on { background: var(--gold); border-color: var(--gold); color: #0B0D10; font-weight: 600; }

/* ---------------- 页脚 ---------------- */
.sitefoot {
  border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 20px 40px;
  text-align: center;
}
.sitefoot .risk { color: var(--faint); font-size: 12px; margin: 0 0 8px; line-height: 1.8; }
.sitefoot .copy { color: #454b53; font-size: 12px; margin: 0; }
/* 老师端 / 后台的单行版本标记 */
.appver { color: #3c4249; font-size: 11px; text-align: center; margin: 32px 0 20px; letter-spacing: .3px; }

/* ---------------- Toast ---------------- */
#toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  color: var(--text); padding: 12px 20px; border-radius: 4px; font-size: 14px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .22s; z-index: 999;
  max-width: calc(100vw - 40px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { border-left-color: var(--down); }

/* ---------------- 移动端 ---------------- */
@media (max-width: 768px) {
  .wrap { padding: 16px 14px 48px; }
  .topbar-inner { height: 54px; padding: 0 14px; gap: 14px; }
  .brand-name { font-size: 15px; }
  .brand-sub { display: none; }
  .me-role { display: none; }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .section-head { margin: 24px 0 12px; }
  .section-head h2 { font-size: 17px; }
  .card { padding: 16px; }
  .btn, .btn-ghost { padding: 11px 18px; }
}
