/* ============ 全局 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #0f0c29;
  color: #fff;
}

#app { min-height: 100vh; }

/* ============ 登录/注册页 ============ */
.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  overflow: hidden;
}

/* 流动的渐变背景 */
.auth-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 92, 255, .55), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(255, 110, 196, .4), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(64, 201, 255, .35), transparent 50%),
    linear-gradient(160deg, #0f0c29, #24243e 60%, #302b63);
  animation: bgShift 14s ease-in-out infinite alternate;
}

@keyframes bgShift {
  from { filter: hue-rotate(0deg) brightness(1); }
  to   { filter: hue-rotate(24deg) brightness(1.12); }
}

/* 毛玻璃卡片 */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 32px 18px 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.logo {
  font-size: 56px;
  text-align: center;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.title {
  margin: 8px 0 4px;
  text-align: center;
  font-size: 26px;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #c4b5fd, #ff9de2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin: 0 0 18px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, .65);
}

.auth-card .van-tabs {
  background: transparent;
  /* Tab 标题文字颜色由这两个变量控制，默认是深灰色，
     在深色背景上不可见，必须在这里覆写 */
  --van-tab-text-color: rgba(255, 255, 255, .7);
  --van-tab-active-text-color: #fff;
  /* Tab 导航容器背景默认纯白，同样需改成透明 */
  --van-tabs-nav-background: transparent;
}
.auth-card .van-tabs__wrap { border-radius: 12px; overflow: hidden; }
.auth-card .van-tab {
  background: rgba(255, 255, 255, .06);
}
.auth-card .van-tab--active { background: rgba(255,255,255,.12); }
.auth-card .van-tabs__line { background: linear-gradient(90deg, #7c5cff, #ff6ec4); }

.form { padding-top: 16px; }
.form .van-cell-group--inset { margin: 0 0 18px; }
.form .van-cell {
  border-radius: 0;
  background: rgba(255, 255, 255, .92);
}
.form .van-cell-group--inset .van-cell:first-child { border-radius: 12px 12px 0 0; }
.form .van-cell-group--inset .van-cell:last-child { border-radius: 0 0 12px 12px; }

.btn-wrap { padding: 4px 12px 0; }

.auth-tip {
  position: relative;
  margin-top: 22px;
  font-size: 12px;
  color: rgba(255, 255, 255, .45);
}

/* ============ 直播页 ============ */
.live-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0f0c29 0%, #1a1832 100%);
}

.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
}

.live-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #888;
}
.live-dot.on {
  background: #ff4d4f;
  box-shadow: 0 0 0 0 rgba(255, 77, 79, .6);
  animation: pulse 1.6s infinite;
}
.live-dot.off { background: #666; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 77, 79, .6); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 77, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); }
}

.live-user { display: flex; align-items: center; gap: 10px; }
.hello { font-size: 13px; color: rgba(255, 255, 255, .75); }
.live-user .van-button { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.35); background: transparent; }

/* 播放器 */
.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

/* 竖屏小屏时尽量放大画面 */
@media (max-width: 640px) and (orientation: portrait) {
  .player-wrap { aspect-ratio: 4 / 3; }
}

.player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.player.hide { opacity: 0; }

.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(circle at 50% 40%, rgba(124, 92, 255, .18), transparent 60%),
    #0b0a1a;
  text-align: center;
  padding: 16px;
}

.ph-cat { font-size: 52px; animation: float 3s ease-in-out infinite; }
.ph-main { margin: 0; font-size: 16px; font-weight: 600; }
.ph-sub { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .55); }

.placeholder.tap { cursor: pointer; }

/* 信息区 */
.live-info { flex: 1; padding: 16px 0 24px; }
.live-info .van-cell-group--inset { background: rgba(255, 255, 255, .06); }
.live-info .van-cell {
  background: transparent;
  color: rgba(255, 255, 255, .85);
}
.live-info .van-cell__title { color: rgba(255, 255, 255, .55); }
.live-info .van-cell::after { border-color: rgba(255, 255, 255, .08); }

.foot-tip {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, .35);
}

/* 横屏全屏观看时隐藏多余元素 */
@media (orientation: landscape) and (max-height: 500px) {
  .live-header, .live-info { display: none; }
  .player-wrap { aspect-ratio: auto; height: 100vh; }
  .player { object-fit: contain; }
}
