/* ============================================================
   冬天快乐 · 皮肤切换条（2026-11-05）
   ------------------------------------------------------------
   结构（由 js/season.js 注入到 .app-container 最顶部，右上角）：
     <div class="theme-switch skin-top">
       <span class="skin-flake">❄</span>
       <span class="skin-group">
         <button class="skin-btn" data-skin="origin">原皮肤</button>
         <button class="skin-btn" data-skin="winter">冬天快乐</button>
       </span>
     </div>
   外观：沿用首屏 hero-lee-btn 的金色胶囊（雪花 + 两个切换项）
   · 原皮肤（深紫夜）：金色描边玻璃底
   · 冬天快乐（雪白昼）：白底 + 暖金棕字
   ============================================================ */

/* ---------- 外层：最顶部、右上角的一颗金色胶囊 ---------- */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 5px 3px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.32);
  box-shadow: none;
  transition: background .2s ease, border-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.theme-switch:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.55);
}

/* 顶部右上角：跟随内容容器，右对齐，不遮挡任何内容 */
.theme-switch.skin-top {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 4px 0 0 auto;
}

.theme-switch.skin-fixed {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9500;
  padding: 6px 8px;
  border-radius: 100px;
  background: rgba(14, 16, 32, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

/* ---------- 雪花图标 ---------- */
.skin-flake {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  color: rgba(255, 216, 140, 0.95);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
  animation: skinFlakeSpin 12s linear infinite;
  user-select: none;
  pointer-events: none;
}

@keyframes skinFlakeSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- 两个按钮 ---------- */
.skin-group {
  display: inline-flex;
  gap: 2px;
  padding: 0;
  background: transparent;
  border: 0;
}

.skin-btn {
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: transparent;
  color: rgba(212, 175, 55, 0.88);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease,
              box-shadow .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.skin-btn:hover {
  color: #ffe9b8;
  background: rgba(212, 175, 55, 0.16);
}

.skin-btn:active {
  transform: scale(0.96);
}

/* 选中态 */
.skin-btn.on {
  color: #2c1f00;
  background: linear-gradient(135deg, #ffe9b3, #e8b846);
  border-color: rgba(255, 224, 150, 0.9);
  box-shadow: 0 2px 9px rgba(212, 175, 55, 0.35);
}

.skin-btn.on:hover {
  color: #2c1f00;
  background: linear-gradient(135deg, #ffe9b3, #e8b846);
}

/* 点击反馈（❄️ 弹一下 → 用缩放代替） */
.skin-btn.skin-pop {
  animation: skinPop .3s ease;
}

@keyframes skinPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ---------- 冬天快乐（浅色）皮肤下的切换条 ---------- */
html[data-season="winter-light"] .theme-switch {
  background: #ffffff;
  border-color: rgba(176, 132, 32, 0.28);
  box-shadow: 0 6px 18px rgba(24, 66, 104, 0.10);
}

html[data-season="winter-light"] .theme-switch:hover {
  background: #fffdf6;
  border-color: rgba(176, 132, 32, 0.5);
}

html[data-season="winter-light"] .skin-flake {
  color: #b8862b;
  text-shadow: none;
}

html[data-season="winter-light"] .skin-btn {
  color: #6b5a2e;
}

html[data-season="winter-light"] .skin-btn:hover {
  color: #8a5c0a;
  background: rgba(212, 175, 55, 0.12);
}

html[data-season="winter-light"] .skin-btn.on,
html[data-season="winter-light"] .skin-btn.on:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #2a6f9e, #1a5a8c);
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(31, 99, 152, 0.28);
}

html[data-season="winter-light"] .theme-switch.skin-fixed {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(24, 66, 104, 0.16);
}

/* ---------- 小屏：收紧间距，雪花保留 ---------- */
@media (max-width: 480px) {
  .theme-switch {
    gap: 4px;
    padding: 3px 4px 3px 8px;
  }
  .skin-flake {
    font-size: 13px;
  }
  .skin-btn {
    padding: 3px 9px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skin-btn,
  .skin-btn:active {
    transform: none;
  }
  .skin-btn.skin-pop {
    animation: none;
  }
}
