/*!
 * uiverse.css — 直播大厅（浅色主题）· 移植自 uiverse-io/galaxy（MIT）
 * https://github.com/uiverse-io/galaxy
 * -------------------------------------------------------------
 * 效果来源
 *   1. 彩虹流光描边 —— BurgiSimon
 *      Buttons/BurgiSimon_strange-hound-0.html
 *   2. 卡片提起 + 柔光边 —— Wendell47
 *      Buttons/Wendell47_gentle-cheetah-21.html（模糊光斑思路）
 *   3. 输入框聚焦流光 —— 同 1，改为浅色柔化
 *
 * 浅色适配：渐变色整体提亮（#7dd3fc / #f9a8d4 / #fde68a），
 * 阴影透明度降到 0.28 以下，避免在白底上发脏。
 * -------------------------------------------------------------
 */

/* ========== 1. 主按钮：彩虹描边 + hover 柔光 ========== */

.btn {
  position: relative;
  isolation: isolate;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--brand), var(--brand)) padding-box,
    conic-gradient(from 210deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4) border-box;
  transition:
    box-shadow .2s ease,
    transform .12s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border-radius: inherit;
  background: conic-gradient(from 210deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
  filter: blur(10px);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.btn:hover::before {
  opacity: .55;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -10px rgba(244, 65, 165, .55);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 128, 237, .3);
}

/* 次级按钮：白底 + 同一套描边 */
.btn.ghost,
.btn.ghost:hover {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    conic-gradient(from 210deg, #7dd3fc, #f9a8d4, #fde68a, #7dd3fc) border-box;
  color: var(--ink);
}

.btn.ghost::before {
  background: conic-gradient(from 210deg, #7dd3fc, #f9a8d4, #fde68a, #7dd3fc);
}

/* ========== 2. 直播卡片：提起 + 柔光边 ========== */

.card {
  position: relative;
  border: 1px solid var(--line);
  transition:
    transform .2s cubic-bezier(.22, .61, .36, 1),
    box-shadow .2s ease,
    border-color .2s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  border-color: transparent;
  outline: none;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    conic-gradient(from 210deg, #7dd3fc, #f9a8d4, #fde68a, #7dd3fc) border-box;
  box-shadow:
    0 16px 36px -18px rgba(15, 23, 42, .3),
    0 0 0 1px rgba(249, 168, 212, .25);
}

.card:hover .mcover,
.card:hover .cover {
  filter: saturate(1.06) brightness(1.02);
}

/* ========== 3. 搜索框与分类筛选：聚焦流光 ========== */

.search input:focus {
  border-color: transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    conic-gradient(from 210deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4) border-box;
  box-shadow: 0 0 0 3px rgba(47, 128, 237, .1);
}

.cat {
  transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

.cat:hover {
  border-color: transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    conic-gradient(from 210deg, #7dd3fc, #f9a8d4, #fde68a, #7dd3fc) border-box;
  transform: translateY(-1px);
}

.cat.on,
.cat.on:hover {
  border-color: transparent;
  background:
    linear-gradient(var(--brand), var(--brand)) padding-box,
    conic-gradient(from 210deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4) border-box;
  color: #fff;
  box-shadow: 0 6px 18px -10px rgba(17, 24, 39, .6);
}

/* ========== 4. 排序切换 ========== */

.sorts button,
.sorts .s {
  transition: box-shadow .18s ease, transform .12s ease;
}

.sorts button:hover,
.sorts .s:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -10px rgba(15, 23, 42, .45);
}

/* ========== 5. 加载与空态 ========== */

.uv-loader {
  --uv-c1: #06b6d4;
  --uv-c2: #ff2d55;
  position: relative;
  display: inline-block;
  width: 26px;
  height: 26px;
  vertical-align: middle;
  margin-right: 10px;
}

.uv-loader::before,
.uv-loader::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.uv-loader::before {
  inset: 0;
  border-top-color: var(--uv-c1);
  border-right-color: rgba(6, 182, 212, .3);
  animation: uv-rotate 1s linear infinite;
}

.uv-loader::after {
  inset: 6px;
  border-top-color: var(--uv-c2);
  border-left-color: rgba(255, 45, 85, .25);
  animation: uv-rotate .7s linear infinite reverse;
}

@keyframes uv-rotate {
  to { transform: rotate(360deg); }
}

/* ========== 6. 动效偏好 ========== */

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn::before,
  .card,
  .cat,
  .uv-loader::before,
  .uv-loader::after {
    animation: none !important;
    transition: none !important;
  }
  .btn:hover,
  .card:hover,
  .cat:hover {
    transform: none;
  }
}
