/* 可乐站网页上仿 dsh-closure-skin @5c6ec0a 的 CRT 外观。只加表现层，不改原页脚本。 */
@font-face {
  font-family: 'CLSR Pixel';
  src: url('fonts/proportional.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'CLSR Pixel Mono';
  src: url('fonts/monospaced.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'CLSR Display';
  src: url('fonts/orbitron-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: block;
}

html.cl-on-cola {
  --acc: #7e0ee4;
  --bg: #0a0b16;
  --card: rgba(16, 18, 40, 0.94);
  --text: #ece7f7;
  --muted: #a99cc0;
  --user: #363144;
  --cl-violet: #7e0ee4;
  --cl-cyan: #35e0d0;
  --cl-pink: #ff3ea5;
  --cl-px-line: rgba(136, 112, 176, 0.45);
  --cl-px-outer: #06070f;
  --cl-px-shadow: rgba(0, 0, 0, 0.4);
  --cl-font: 'CLSR Pixel', 'DengXian', '等线', 'Microsoft YaHei UI', ui-monospace, monospace;
  --cl-font-mono: 'CLSR Pixel Mono', Consolas, ui-monospace, monospace;
  --cl-btn-h: 32px;
  background: #0a0b16;
}

html.cl-on-cola body {
  background: transparent !important;
  color: var(--text);
  font-family: var(--cl-font) !important;
}

/* 推理档换图 / 默认 bg.jpg 回到 UI 底下，不再盖住按钮。开着时仍会换。 */
html.cl-on-cola::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* 推理档换图仍走 --bgimg，铺在 UI 底下，不再盖住按钮；关闭时不贴一张矩形 jpg。 */
  background: var(--bgimg, none) center / cover no-repeat;
  opacity: 0.2;
}

html.cl-on-cola body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(140% 90% at 50% 112%, rgba(66, 58, 216, 0.22) 0%, transparent 68%),
    radial-gradient(90% 65% at 82% 8%, rgba(126, 14, 228, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, rgba(22, 24, 52, 0.45) 0%, transparent 48%, rgba(8, 8, 16, 0.45) 100%);
}

html.cl-on-cola body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.85;
  background:
    radial-gradient(130% 110% at 50% 0%, transparent 62%, rgba(8, 8, 16, 0.32) 100%),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.014) 0 1px, rgba(0, 0, 0, 0.012) 1px 3px);
}

html.cl-on-cola body > * {
  position: relative;
  z-index: 1;
}

/* ---------- 顶栏：一行。标题 | 模型 | 公告 历史 新对话 账号 ---------- */
html.cl-on-cola header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 16px !important;
  padding-top: calc(10px + env(safe-area-inset-top)) !important;
  background: linear-gradient(180deg, rgba(16, 18, 40, 0.92), rgba(10, 11, 22, 0.78)) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid rgba(126, 14, 228, 0.38) !important;
  box-shadow: 0 1px 0 rgba(6, 7, 15, 0.8);
  flex-direction: unset !important;
}
html.cl-on-cola header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, #7e0ee4, #35e0d0 42%, #ff3ea5 74%, #7e0ee4);
  opacity: 0.75;
  pointer-events: none;
}
html.cl-on-cola header .hrow {
  display: contents;
}
html.cl-on-cola header .dot {
  display: none;
}
html.cl-on-cola header .htitle,
html.cl-on-cola #modelSel,
html.cl-on-cola header .hact {
  grid-row: 1;
}
html.cl-on-cola header .htitle {
  grid-column: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
html.cl-on-cola header h1 {
  font-family: var(--cl-font);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #f6f0ff;
  text-shadow: 0 0 14px rgba(126, 14, 228, 0.4);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.cl-on-cola header .h1sub {
  font-family: 'CLSR Display', var(--cl-font);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--cl-cyan);
  text-shadow: 0 0 10px rgba(53, 224, 208, 0.35);
}

html.cl-on-cola header .hact {
  grid-column: 3;
}
html.cl-on-cola #modelSel {
  grid-column: 2;
  margin: 0 !important;
  width: auto !important;
  min-width: 188px;
  max-width: 260px;
  height: var(--cl-btn-h) !important;
  padding: 0 28px 0 12px !important;
  border: 1px solid var(--cl-px-line) !important;
  border-radius: 6px !important;
  corner-shape: bevel;
  background-color: rgba(16, 18, 40, 0.92) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2335e0d0' stroke-width='1.4' fill='none'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  color: #d9fdf7 !important;
  font-family: var(--cl-font) !important;
  font-size: 12.5px !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}
html.cl-on-cola #modelSel option {
  background: #12142a;
  color: #ece7f7;
}

html.cl-on-cola header .hact {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
  flex: none;
}

html.cl-on-cola .hbtn,
html.cl-on-cola #noticeBtn,
html.cl-on-cola #histBtn,
html.cl-on-cola #userBadge {
  width: auto !important;
  height: var(--cl-btn-h) !important;
  min-width: var(--cl-btn-h);
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--cl-px-line) !important;
  border-radius: 6px !important;
  corner-shape: bevel;
  background: rgba(22, 24, 52, 0.78) !important;
  color: #cbbbe8 !important;
  box-shadow: none !important;
  font-family: var(--cl-font) !important;
  font-size: 13px !important;
  line-height: 1;
  white-space: nowrap;
}
html.cl-on-cola #noticeBtn,
html.cl-on-cola #histBtn,
html.cl-on-cola #newBtn {
  font-size: 0 !important;
}
html.cl-on-cola #noticeBtn::after,
html.cl-on-cola #histBtn::after,
html.cl-on-cola #newBtn::after {
  font-size: 13px;
  font-family: var(--cl-font);
  letter-spacing: 0.06em;
  line-height: 1;
}
html.cl-on-cola #noticeBtn::after { content: '公告'; }
html.cl-on-cola #histBtn::after { content: '历史'; }
html.cl-on-cola #newBtn::after { content: '+  新对话'; }

html.cl-on-cola #newBtn {
  width: auto !important;
  height: var(--cl-btn-h) !important;
  padding: 0 14px !important;
  border: 2px solid var(--cl-px-line) !important;
  border-radius: 8px !important;
  corner-shape: bevel;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #3b2f7a 0 25%, #2f2566 25% 50%, #241c52 50% 75%, #1a1440 75%) !important;
  color: #f6f0ff !important;
  box-shadow:
    0 0 0 1px var(--cl-px-outer),
    0 0 14px rgba(126, 14, 228, 0.28) !important;
}

html.cl-on-cola #userBadge {
  max-width: 132px;
  padding: 0 10px !important;
  color: #cbbbe8 !important;
}

html.cl-on-cola #tokRateBar {
  flex: none;
  color: var(--cl-cyan);
  font-family: var(--cl-font-mono) !important;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(53, 224, 208, 0.28);
  line-height: 1.2;
  white-space: nowrap;
}
html.cl-on-cola #tokRateBar.approx {
  opacity: 0.82;
}

@media (max-width: 720px) {
  html.cl-on-cola header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px;
  }
  html.cl-on-cola header .hrow {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  html.cl-on-cola header .htitle {
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  html.cl-on-cola header h1 { flex: none; min-width: 0; }
  html.cl-on-cola header .h1sub { display: none; }
  html.cl-on-cola #userBadge { padding: 0 8px !important; max-width: 40px; }
  html.cl-on-cola header .hact { margin-left: auto; }
  html.cl-on-cola #modelSel {
    width: 100% !important;
    max-width: none;
    min-width: 0;
  }
  html.cl-on-cola #noticeBtn,
  html.cl-on-cola #histBtn,
  html.cl-on-cola #newBtn,
  html.cl-on-cola #userBadge {
    padding: 0 10px !important;
  }
}

/* ---------- 气泡 ---------- */
html.cl-on-cola .msg.user {
  background: #363144 !important;
  color: #ece7f7 !important;
  border: 1px solid rgba(126, 14, 228, 0.45) !important;
  border-radius: 8px !important;
  corner-shape: bevel;
  box-shadow:
    0 0 0 1px rgba(6, 7, 15, 0.6),
    0 0 18px rgba(126, 14, 228, 0.18) !important;
}
html.cl-on-cola .msg.ai {
  background: rgba(16, 18, 40, 0.78) !important;
  border: 1px solid rgba(126, 14, 228, 0.42) !important;
  border-radius: 8px !important;
  corner-shape: bevel;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.28);
  color: #ece7f7;
}
html.cl-on-cola .msg.ai pre {
  border: 0 !important;
  border-radius: 2px !important;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 4px),
    #07081a !important;
  color: #d9fdf7 !important;
  box-shadow: inset 3px 0 0 #7e0ee4 !important;
  font-family: var(--cl-font-mono) !important;
}
html.cl-on-cola .msg.ai code {
  font-family: var(--cl-font-mono) !important;
  color: #d9fdf7;
}
html.cl-on-cola .msg .think {
  border-left: 2px solid var(--cl-cyan);
  color: #8fe9f0;
}
html.cl-on-cola .msg .think .think-head {
  color: var(--cl-cyan) !important;
}
html.cl-on-cola .msg .mtime {
  color: #8a7ea3;
  opacity: 0.9;
}
html.cl-on-cola .msg .mspeed {
  color: var(--cl-cyan);
  font-family: var(--cl-font-mono) !important;
  opacity: 0.95;
}

/* ---------- 输入区 ---------- */
html.cl-on-cola #inputBar {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-top: 0 !important;
}
html.cl-on-cola #inputWrap {
  position: relative;
  align-items: flex-end;
  border: 2px solid var(--cl-px-line);
  border-radius: 8px;
  corner-shape: bevel;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #1b1c2c, #14151f);
  box-shadow:
    0 0 0 1px var(--cl-px-outer),
    3px 3px 0 var(--cl-px-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 6px;
  gap: 6px;
}
html.cl-on-cola #inputWrap::before,
html.cl-on-cola #inputWrap::after {
  content: none;
  display: none;
}
html.cl-on-cola #inputWrap:focus-within {
  border-color: rgba(126, 14, 228, 0.65);
}
html.cl-on-cola #input {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #ece7f7 !important;
  caret-color: #23b3a6;
  font-family: var(--cl-font) !important;
  min-height: 44px !important;
  padding: 11px 8px !important;
  line-height: 1.4;
}
html.cl-on-cola #imgBtn,
html.cl-on-cola #sendBtn {
  flex: 0 0 44px !important;
  width: 44px;
  height: 44px !important;
  margin: 0;
  border-radius: 5px !important;
  corner-shape: bevel;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 0;
}
html.cl-on-cola #imgBtn {
  border: 1px solid var(--cl-px-line) !important;
  background: rgba(22, 24, 52, 0.9) !important;
  color: #cbbbe8 !important;
  box-shadow: 2px 2px 0 var(--cl-px-shadow) !important;
}
html.cl-on-cola #imgBtn:not(.off):hover {
  color: #ece7f7 !important;
  border-color: rgba(190, 160, 255, 0.7) !important;
}
html.cl-on-cola #imgBtn:not(.off):active,
html.cl-on-cola #imgBtn.has {
  background: rgba(53, 224, 208, 0.14) !important;
  border-color: var(--cl-cyan) !important;
  color: var(--cl-cyan) !important;
  box-shadow: 1px 1px 0 var(--cl-px-shadow) !important;
}
html.cl-on-cola #imgBtn.off {
  opacity: 0.35 !important;
}
html.cl-on-cola #sendBtn {
  border: 1px solid rgba(255, 190, 230, 0.45) !important;
  background: linear-gradient(180deg, #ff4eab, #c42172) !important;
  color: #fff !important;
  box-shadow:
    2px 2px 0 rgba(0, 0, 0, 0.45),
    0 0 10px rgba(255, 62, 165, 0.22) !important;
}
html.cl-on-cola #sendBtn.stop {
  background: linear-gradient(180deg, #e85a68, #a32b36) !important;
  border-color: rgba(255, 200, 200, 0.4) !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45) !important;
}

html.cl-on-cola .ds-chip,
html.cl-on-cola #webBox {
  border: 1px solid var(--cl-px-line) !important;
  border-radius: 6px !important;
  corner-shape: bevel;
  background: rgba(22, 24, 52, 0.72) !important;
  color: #a99cc0 !important;
  box-shadow: none !important;
}
html.cl-on-cola #thinkBox,
html.cl-on-cola #thinkBox.open {
  border: 1px solid var(--cl-px-line) !important;
  border-radius: 8px !important;
  corner-shape: bevel;
  background: rgba(14, 16, 36, 0.96) !important;
  box-shadow: 0 0 0 1px var(--cl-px-outer), 3px 3px 0 var(--cl-px-shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.cl-on-cola #effortName,
html.cl-on-cola #effortTicks span.on,
html.cl-on-cola .ds-welcome .ds-wl-logo,
html.cl-on-cola .ds-welcome .ds-wl-caret {
  color: var(--cl-cyan) !important;
  filter: none;
}
html.cl-on-cola .ds-welcome .ds-wl-line {
  font-family: var(--cl-font);
  color: #f6f0ff;
  text-shadow: 0 0 16px rgba(126, 14, 228, 0.35);
}
html.cl-on-cola #effortRail::after {
  background: #7e0ee4 !important;
}
html.cl-on-cola #effortRail.max::after {
  background-image:
    linear-gradient(90deg, #7e0ee4 0%, #ff3ea5 25%, #7e0ee4 50%, #ff3ea5 75%, #7e0ee4 100%) !important;
  box-shadow: 0 0 14px rgba(255, 62, 165, 0.4) !important;
}
html.cl-on-cola #effortSlider::-webkit-slider-thumb {
  border-radius: 1px !important;
  background: #e6dcff !important;
  border: 1px solid #7e0ee4 !important;
}
html.cl-on-cola .switch,
html.cl-on-cola #webBox .switch {
  border-radius: 2px !important;
  background: #1c0d2c !important;
  border: 1px solid rgba(200, 120, 190, 0.35) !important;
  box-shadow: none;
}
html.cl-on-cola .switch.on,
html.cl-on-cola #webBox .switch.on {
  background: #b83a8f !important;
  border-color: #7e0ee4 !important;
}
html.cl-on-cola .switch .knob,
html.cl-on-cola #webBox .switch .knob {
  border-radius: 1px !important;
  background: #e6dcff !important;
}

html.cl-on-cola #fbBtn {
  border: 1px solid var(--cl-px-line) !important;
  border-radius: 6px !important;
  corner-shape: bevel;
  background: rgba(22, 24, 52, 0.85) !important;
  color: #cbbbe8 !important;
  box-shadow: none !important;
  opacity: 0.8;
}

/* ---------- 历史 ---------- */
html.cl-on-cola #histWrap .drawer {
  background: rgba(10, 11, 22, 0.96) !important;
  border-right: 1px solid rgba(126, 14, 228, 0.38) !important;
  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.35);
}
html.cl-on-cola #histWrap .dhead {
  border-bottom: 0 !important;
  color: #f6f0ff;
  font-family: var(--cl-font);
}
html.cl-on-cola #histWrap .dhead::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--cl-px-line) 0 7px, transparent 7px 10px);
}
html.cl-on-cola .hist-item {
  border: 1px solid rgba(136, 112, 176, 0.28) !important;
  border-radius: 8px !important;
  corner-shape: bevel;
  background: rgba(16, 18, 40, 0.7) !important;
  box-shadow: none;
  color: #ece7f7;
}
html.cl-on-cola .hist-item.active {
  border: 2px solid rgba(53, 224, 208, 0.72) !important;
  border-radius: 10px !important;
  corner-shape: bevel;
  background: linear-gradient(180deg, #2f5fb8, #1d3f82) !important;
  box-shadow: 0 0 16px rgba(53, 224, 208, 0.28) !important;
  color: #e6fdff !important;
}
html.cl-on-cola .hist-item.active .d {
  color: #8fe9f0 !important;
}
html.cl-on-cola #newConvBtn {
  border: 2px solid var(--cl-px-line) !important;
  border-radius: 8px !important;
  corner-shape: bevel;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #3b2f7a 0 25%, #2f2566 25% 50%, #241c52 50% 75%, #1a1440 75%) !important;
  color: #f6f0ff !important;
  box-shadow: 0 0 0 1px var(--cl-px-outer), 0 0 12px rgba(126, 14, 228, 0.22) !important;
}

/* ---------- 登录 / 公告 / 弹层：登录必须整页挡住 ---------- */
html.cl-on-cola #loginWrap {
  background:
    radial-gradient(140% 90% at 50% 112%, rgba(66, 58, 216, 0.22) 0%, transparent 68%),
    radial-gradient(90% 65% at 82% 8%, rgba(126, 14, 228, 0.12) 0%, transparent 70%),
    #0a0b16 !important;
}
html.cl-on-cola #loginBox,
html.cl-on-cola #noticeWrap .card,
html.cl-on-cola #userModal .card,
html.cl-on-cola #fbWrap .sheet {
  border: 2px solid var(--cl-px-line) !important;
  border-radius: 10px !important;
  corner-shape: bevel;
  background: linear-gradient(180deg, rgba(20, 22, 48, 0.98), rgba(9, 10, 22, 0.99)) !important;
  box-shadow: 0 0 0 1px var(--cl-px-outer), 4px 4px 0 var(--cl-px-shadow) !important;
  color: #ece7f7;
}
html.cl-on-cola #loginBox h2 {
  font-family: var(--cl-font);
  letter-spacing: 0.08em;
  color: #f6f0ff;
  text-shadow: 0 0 12px rgba(126, 14, 228, 0.4);
}
html.cl-on-cola #loginBox input,
html.cl-on-cola #fbText,
html.cl-on-cola #fbContact {
  background: rgba(10, 12, 28, 0.95) !important;
  border: 1px solid var(--cl-px-line) !important;
  border-radius: 6px !important;
  corner-shape: bevel;
  color: #ece7f7 !important;
  caret-color: #23b3a6;
  font-family: var(--cl-font) !important;
}
html.cl-on-cola .lbtn,
html.cl-on-cola .btn-ok,
html.cl-on-cola .btn-send,
html.cl-on-cola .btn-out {
  border: 1px solid var(--cl-px-line) !important;
  border-radius: 6px !important;
  corner-shape: bevel;
  font-family: var(--cl-font) !important;
  box-shadow: none !important;
}
html.cl-on-cola .l-reg {
  background: rgba(22, 24, 52, 0.9) !important;
  color: #cbbbe8 !important;
}
html.cl-on-cola .l-login,
html.cl-on-cola .btn-ok,
html.cl-on-cola .btn-send,
html.cl-on-cola .btn-out {
  border: 2px solid var(--cl-px-line) !important;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #3b2f7a 0 25%, #2f2566 25% 50%, #241c52 50% 75%, #1a1440 75%) !important;
  color: #f6f0ff !important;
}
html.cl-on-cola .act-btn {
  border: 1px solid var(--cl-px-line) !important;
  border-radius: 4px !important;
  color: #a99cc0 !important;
  background: transparent !important;
}
html.cl-on-cola #noticeWrap .backdrop,
html.cl-on-cola #userModal .backdrop,
html.cl-on-cola #fbWrap .backdrop {
  background: rgba(6, 7, 15, 0.72) !important;
}
html.cl-on-cola .hist-item .del {
  flex: none;
  white-space: nowrap;
}

/* 开机动画已从页面上去掉 <script src="/splash.js">。这层只是兜底，不让残留节点再盖住界面。 */
html.cl-on-cola #ds-splash {
  display: none !important;
}
