/* ============================================================
   CountdownClock 插件 - 默认样式
   每个皮肤使用自己的 .cd-xxx 前缀作用域，不会污染外部页面
   ============================================================ */

/* ---------- 基础重置（仅对插件根节点） ---------- */
.cd-root, .cd-root * { box-sizing: border-box; }
.cd-root button      { font: inherit; cursor: pointer; }

/* ============================================================
   皮肤：minimal — 极简
   ============================================================ */
.cd-minimal {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 24px;
  width: 280px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.cd-minimal__title  { font-size: 14px; color: #666; margin-bottom: 8px; }
.cd-minimal__time   { font-size: 56px; font-weight: 200; letter-spacing: 2px; color: #222; font-variant-numeric: tabular-nums; }
.cd-minimal__time.cd-finished { color: #e53935; }
.cd-minimal__bar    { height: 4px; background: #f0f0f0; border-radius: 2px; margin: 16px 0; overflow: hidden; }
.cd-minimal__fill   { height: 100%; background: linear-gradient(90deg, #42a5f5, #7e57c2); transition: width .3s linear; }
.cd-minimal__ctrl    { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.cd-minimal__ctrl button {
  flex: 1; padding: 8px 0; border: 1px solid #e0e0e0; background: #fafafa; border-radius: 6px; color: #333;
}
.cd-minimal__ctrl button:hover { background: #f0f0f0; }
.cd-minimal__ctrl button:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   皮肤：flip — 翻牌
   ============================================================ */
.cd-flip {
  font-family: -apple-system, "PingFang SC", sans-serif;
  background: #1a1a1a;
  color: #f5d76e;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}
.cd-flip__title    { font-size: 13px; opacity: .7; margin-bottom: 12px; }
.cd-flip__row      { display: inline-flex; gap: 6px; align-items: center; }
.cd-flip__card {
  background: linear-gradient(180deg, #2a2a2a 49%, #1f1f1f 50%, #2a2a2a 51%);
  border-radius: 6px;
  width: 60px; height: 90px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Courier New", monospace;
  font-size: 56px; font-weight: bold;
  text-shadow: 0 0 8px rgba(245,215,110,.6);
  position: relative;
}
.cd-flip__card::after {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(0,0,0,.4);
}
.cd-flip__sep      { font-size: 48px; opacity: .6; }
.cd-flip__ctrl     { margin-top: 16px; display: flex; justify-content: center; gap: 8px; }
.cd-flip__ctrl button {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid #444; background: #2a2a2a; color: #f5d76e; font-size: 16px;
}
.cd-flip__ctrl button:hover { background: #333; }
.cd-flip.cd-finished .cd-flip__card { color: #ff5252; text-shadow: 0 0 12px rgba(255,82,82,.8); }

/* ============================================================
   皮肤：circle — 环形
   ============================================================ */
.cd-circle { position: relative; width: 280px; height: 320px; }
.cd-circle__svg { width: 280px; height: 280px; transform: rotate(-90deg); }
.cd-circle__bg  { fill: none; stroke: #eee; stroke-width: 8; }
.cd-circle__fg  { fill: none; stroke: #4caf50; stroke-width: 8; stroke-linecap: round;
                  transition: stroke .3s; }
.cd-circle__fg--done { stroke: #e53935; }
.cd-circle__center {
  position: absolute; top: 0; left: 0; width: 280px; height: 280px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: -apple-system, "PingFang SC", sans-serif;
}
.cd-circle__title { font-size: 14px; color: #888; margin-bottom: 4px; }
.cd-circle__time  { font-size: 48px; font-weight: 200; color: #222; font-variant-numeric: tabular-nums; }
.cd-circle__ctrl  { margin-top: 8px; display: flex; gap: 8px; justify-content: center; }
.cd-circle__ctrl button {
  padding: 8px 14px; border: 1px solid #ddd; background: #fff; border-radius: 6px; color: #333;
}
.cd-circle__ctrl button:hover { background: #f5f5f5; }
.cd-circle__ctrl button:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   皮肤：retro — 复古 LED
   ============================================================ */
.cd-retro {
  font-family: "Courier New", monospace;
  background: #2d1b1b;
  border: 6px solid #5a3a3a;
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  box-shadow: inset 0 0 30px rgba(0,0,0,.5);
}
.cd-retro__title    { font-size: 12px; color: #d4a373; letter-spacing: 3px; margin-bottom: 8px; }
.cd-retro__screen   {
  background: #1a0e0e;
  color: #ff5722;
  font-size: 56px;
  font-weight: bold;
  padding: 16px 24px;
  border-radius: 6px;
  text-shadow: 0 0 12px #ff5722, 0 0 24px #ff5722;
  letter-spacing: 4px;
  font-variant-numeric: tabular-nums;
}
.cd-retro__blink    { animation: cd-blink 1s steps(2) infinite; }
.cd-retro.cd-finished .cd-retro__screen { color: #ff1744; text-shadow: 0 0 14px #ff1744, 0 0 28px #ff1744; }
@keyframes cd-blink { 50% { opacity: .2; } }
.cd-retro__ctrl     { margin-top: 16px; display: flex; gap: 12px; justify-content: center; }
.cd-retro__ctrl button {
  width: 50px; height: 50px; border-radius: 50%;
  border: 2px solid #5a3a3a; background: #3d2828; color: #d4a373; font-size: 18px;
}
.cd-retro__ctrl button:hover { background: #4d3838; }

/* ============================================================
   皮肤：glass — 玻璃拟态
   ============================================================ */
.cd-glass {
  font-family: -apple-system, "PingFang SC", sans-serif;
  background: linear-gradient(135deg, rgba(255,255,255,.25), rgba(255,255,255,.1));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 24px;
  padding: 32px;
  width: 320px;
  text-align: center;
  color: #fff;
  box-shadow: 0 8px 32px rgba(31,38,135,.25);
}
.cd-glass__title { font-size: 14px; opacity: .85; margin-bottom: 4px; }
.cd-glass__time  { font-size: 64px; font-weight: 200; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.cd-glass__sub   { font-size: 13px; opacity: .8; margin: 8px 0 16px; }
.cd-glass.cd-finished .cd-glass__time { color: #ffd54f; }
.cd-glass__ctrl  { display: flex; gap: 8px; }
.cd-glass__ctrl button {
  flex: 1; padding: 10px 0;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; border-radius: 12px;
}
.cd-glass__ctrl button:hover { background: rgba(255,255,255,.3); }
.cd-glass__ctrl button:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   通知弹窗（popup / bell 共用）
   ============================================================ */
.cd-popup {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 999999;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.cd-popup--show { opacity: 1; pointer-events: auto; }
.cd-popup__card {
  background: #fff; border-radius: 16px; padding: 32px 40px;
  text-align: center; min-width: 280px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  animation: cd-popup-in .35s ease;
}
@keyframes cd-popup-in {
  from { transform: scale(.85) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.cd-popup__icon  { font-size: 56px; margin-bottom: 8px; }
.cd-popup__title { font-size: 22px; font-weight: 600; color: #222; margin-bottom: 4px; }
.cd-popup__sub   { font-size: 14px; color: #888; margin-bottom: 16px; }
.cd-popup__ok    {
  padding: 10px 28px; border: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; border-radius: 8px; font-size: 14px;
}
.cd-popup__ok:hover { opacity: .9; }