/* =========================================================================
   状态悬浮小窗（介绍页 / 下载页共用）
   -------------------------------------------------------------------------
   右上角一块小玻璃牌：大号时间 + 问候，下面位置，再下面天气。
   材质和主站玻璃一致（半透黑 + 内侧高光 + 外投影），不抢内容但一眼能看到。
   ========================================================================= */

.status {
  position: fixed;
  top: 76px;
  right: clamp(14px, 3vw, 34px);
  z-index: 90;
  width: 208px;
  padding: 13px 15px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02) 55%),
    rgba(9, 11, 18, .55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -10px 24px rgba(0, 0, 0, .12),
    0 18px 44px rgba(0, 0, 0, .38);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
  color: var(--ink);
  text-align: left;
  user-select: none;
  cursor: grab;
  touch-action: none;              /* 拖动时不要触发页面滚动 */
  animation: statusIn .8s .35s cubic-bezier(.3, .7, .3, 1) both;
  transition: transform .4s cubic-bezier(.3, .7, .3, 1), border-color .3s ease, box-shadow .3s ease;
}
/* 拖动中：取消过渡（跟手），光标变抓取，轻微放大 */
.status.is-drag {
  cursor: grabbing;
  transition: none;
  /* 拖动不缩放：点一下不会「胀大」，只有阴影加深表示抓起来了 */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 26px 60px rgba(0, 0, 0, .5);
}
/* hover 只做光效，不再位移；
   is-near 由 status.js 写入（判定框外扩 14px），指针「快碰到」就亮，不用精准命中 */
.status:hover,
.status.is-near { border-color: rgba(255, 255, 255, .24); }

/* 悬停强调：一条斜向高光从小窗上掠过（只播一次，和卡片同一套语言） */
.status::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    104deg,
    transparent 32%,
    rgba(255, 255, 255, .10) 45%,
    rgba(255, 255, 255, .28) 50%,
    rgba(255, 255, 255, .10) 55%,
    transparent 68%
  );
  background-size: 240% 100%;
  background-position: 140% 0;
  opacity: 0;
  mix-blend-mode: screen;
}
.status:hover::after,
.status.is-near::after {
  opacity: 1;
  animation: statusSweep 1.1s cubic-bezier(.22, .8, .28, 1) forwards;
}
@keyframes statusSweep {
  from { background-position: 140% 0; }
  to   { background-position: -40% 0; }
}
@keyframes statusIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

/* ---- 时间 + 问候 ----
   问候语可能较长（「凌晨了，别熬太狠」），允许换行，不再省略号截断 */
.status__top {
  display: block;
}
.status__clock {
  display: block;
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.status__greet {
  display: block;
  margin-top: 4px;
  font-size: .7rem;
  line-height: 1.45;
  color: var(--ink-mute);
  letter-spacing: .02em;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---- 分隔线 ---- */
.status__hr {
  height: 1px;
  margin: 9px 0 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .02));
}

/* ---- 位置 ---- */
.status__loc {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  color: var(--ink-dim);
  letter-spacing: .02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status__loc::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(124, 199, 255, .9);
  flex: none;
}

/* ---- 天气 ---- */
.status__wx {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
}
/* 悬停气泡：体感温度 / 风速。
   材质统一交给玻璃引擎（.glass + .js-glass）—— 选 Blur 就是重霜、Liquid 就是液态折射、
   Fusion 就是双镜面，和主体卡片是同一套 shader、同一套描边与内高光。
   ⚠ 这里只写定位和文字，绝不写死深色底 / backdrop-filter，否则又和三种材质割裂。 */
.status__wxtip {
  position: absolute;
  right: -4px;
  top: calc(100% + 9px);
  z-index: 3;
  padding: 6px 11px 7px;
  border-radius: 14px;
  color: var(--ink);
  font-size: .68rem;
  line-height: 1.5;
  letter-spacing: .015em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-5px) scale(.96);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .2s ease, transform .3s cubic-bezier(.3, .7, .3, 1);
}
/* is-wx 同样是 status.js 写入的热区状态（天气行外扩 10px） */
.status.is-wx .status__wxtip,
.status__wx:hover .status__wxtip {
  opacity: 1;
  transform: none;
}
.status__wxicon {
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(124, 199, 255, .35));
}
.status__wxtemp {
  font-family: var(--font);
  font-size: 1.12rem;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.status__wxdesc {
  font-size: .68rem;
  color: var(--ink-mute);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 窄屏：贴到顶部中间，压缩成一行两行 ---- */
@media (max-width: 720px) {
  .status {
    top: auto;
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    padding: 10px 13px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .status__top { flex: none; }
  .status__hr { display: none; }
  .status__clock { font-size: 1.3rem; }
  .status__greet { display: none; }
  .status__loc { flex: 1; font-size: .68rem; }
  .status__wx { margin: 0; flex: none; }
  .status__wxicon { font-size: 1rem; }
  .status__wxtemp { font-size: 1rem; }
  .status__wxdesc { display: none; }
  .status__wxtip { display: none; }   /* 触屏没有悬浮态，气泡直接不开 */
}

@media (prefers-reduced-motion: reduce) {
  .status { animation: none; transition: none; }
}
