/* ═══════════════════════════════════════════════════════════════════════════
   views.css — 各视图专属样式
   1 登录闸门 · 2 灵感墙便签 · 3 漂流瓶大海 · 4 约会议矩阵 · 5 总后台 · 6 个人设置
   ═══════════════════════════════════════════════════════════════════════════ */

/* ══ 1. 登录闸门 ═══════════════════════════════════════════════════════════ */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--sp-5); }
.gate[hidden] { display: none; }
.gate-card {
  width: min(100%, 420px); padding: var(--sp-6) var(--sp-5) var(--sp-5);
  border-radius: var(--r-2xl); text-align: center;
  animation: modal-in 0.55s var(--ease-out) both;
}
.gate-mark {
  display: grid; place-items: center; margin: 0 auto var(--sp-4);
  width: 62px; height: 62px; border-radius: 20px;
  font-size: 28px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent);                  /* 纯色，不用渐变 */
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 34%, transparent);
}
.gate-title { font-size: 21px; font-weight: 660; letter-spacing: -0.02em; }
.gate-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.gate-body { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.gate-foot { font-size: 11.5px; color: var(--ink-3); margin-top: var(--sp-4); line-height: 1.7; }
.gate-alert {
  display: flex; gap: 8px; text-align: left;
  padding: 11px 13px; border-radius: var(--r-md);
  font-size: 12.5px; line-height: 1.65;
  color: var(--ink-2);
  background: var(--glass-bg-3);
  border: 1px solid var(--hairline);
}
.gate-alert .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--warn); }
.gate-alert code { font-family: var(--font-num); font-size: 11.5px; padding: 1px 5px; border-radius: 5px; background: var(--glass-bg-3); border: 1px solid var(--hairline); }
.verified {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--glass-bg-3); border: 1px solid var(--hairline);
}
.verified .avatar { width: 38px; height: 38px; font-size: 14px; }
.verified .ico { width: 18px; height: 18px; color: var(--ink-3); flex: none; }

/* ══ 2. 灵感墙 ════════════════════════════════════════════════════════════ */
.wall-bar {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg); margin-bottom: var(--sp-4);
  position: sticky; top: 0; z-index: 6;
}
.wall-bar .spacer { flex: 1 1 auto; }

.wall-grid {
  column-count: 4; column-gap: 16px;
  padding-bottom: var(--sp-6);
}
@media (max-width: 1500px) { .wall-grid { column-count: 3; } }
@media (max-width: 1080px) { .wall-grid { column-count: 2; } }
@media (max-width: 720px)  { .wall-grid { column-count: 1; } }

/* 便签：高饱和亮色 · 纯平色块 + 圆弧 + 细描边 + 中性弱阴影
   ⚠️ 不要在这上面叠渐变。参考图本身就是纯色板；之前这里叠了
   「径向高光 + 斜向色阶 + 白色高光带」三层渐变，渲染出来又吵又脏
   （用户反馈「好多都好难看」）。平面色块反而更贴参考图，也更耐看。 */
.note {
  position: relative;
  break-inside: avoid;
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 15px 16px 13px;
  border-radius: var(--note-radius);
  color: var(--nc-ink);
  text-align: left;
  background: var(--nc);
  border: var(--note-edge-w) solid var(--note-edge);
  box-shadow: var(--note-shadow);
  transform: rotate(var(--rot, 0deg)) translateZ(0);
  transition: transform 0.34s var(--ease-out), box-shadow 0.34s var(--ease-out);
  animation: note-in 0.5s var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
}
.note:hover { transform: rotate(0deg) translateY(-4px) scale(1.012); z-index: 3; }
@keyframes note-in { from { opacity: 0; transform: rotate(var(--rot, 0deg)) translateY(16px) scale(0.94); } to { opacity: 1; transform: rotate(var(--rot, 0deg)); } }

.note.is-pinned { box-shadow: var(--note-shadow), 0 0 0 2px color-mix(in srgb, var(--nc-ink) 42%, transparent); }
.note.is-flash { animation: note-flash 1.1s var(--ease) 2; }
@keyframes note-flash { 50% { outline: 3px solid color-mix(in srgb, var(--nc-ink) 50%, transparent); outline-offset: 3px; } }

.note-cat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 640; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 99px;
  /* 安静的色调块：用便签自己的墨色做半透明底。
     之前这里是「实心反差色块」（红便签配绿标签那种）—— 互补色小色块互相打架，
     而且底色跟着便签色走、同一分类在不同便签上是不同颜色，语义也乱。 */
  background: color-mix(in srgb, var(--nc-ink) 16%, transparent);
  color: var(--nc-ink);
  margin-bottom: 8px;
}
/* 分类语义圆点：颜色只跟分类走（抱怨恒为红），与便签底色无关 */
.note-cat .cat-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cat-c, currentColor);
  flex: none;
}
.note-body {
  font-size: 14px; font-weight: 500; line-height: 1.62;
  letter-spacing: 0.005em;
  white-space: pre-wrap; overflow-wrap: anywhere;
  margin-bottom: 12px;
}
.note-body--lg { font-size: 15.5px; }
.note-foot {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; opacity: 0.85;
  border-top: 1px solid color-mix(in srgb, var(--nc-ink) 22%, transparent);
  padding-top: 9px;
}
.note-foot .spacer { flex: 1 1 auto; }
.note-foot .ico { width: 13px; height: 13px; }
.note-act {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 7px;
  font-size: 11px; font-weight: 560; opacity: 0.8;
  transition: background 0.18s var(--ease), opacity 0.18s var(--ease);
}
.note-act:hover { background: color-mix(in srgb, var(--nc-ink) 14%, transparent); opacity: 1; }
.note-act .ico { width: 13px; height: 13px; }
.note-act.is-on { opacity: 1; }
.note-act.is-on .ico { color: currentColor; fill: currentColor; }
.note-owner {
  display: inline-flex; align-items: center; gap: 5px; font-weight: 560;
}
.note-owner .av {
  width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font-size: 9px; font-weight: 700; color: #fff;
  border: 1px solid color-mix(in srgb, var(--nc-ink) 25%, transparent);
}

/* 便签编辑器里的实时预览 */
.note-preview { padding: var(--sp-4); border-radius: var(--r-lg); background: var(--glass-bg-3); border: 1px solid var(--hairline); }
.note-preview .note { max-width: 260px; margin: 0 auto; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch {
  position: relative;
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--nc);                      /* 纯平取样，所见即便签本色 */
  border: 1px solid var(--note-edge);
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.18);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease);
}
.swatch:hover { transform: scale(1.12) translateY(-2px); }
.swatch.is-active { box-shadow: 0 0 0 2.5px var(--ink), 0 4px 12px rgb(15 23 42 / 0.22); transform: scale(1.06); }

/* ══ 3. 漂流瓶 · 大海场景 ═════════════════════════════════════════════════ */
.ocean { position: absolute; inset: 0; background: var(--ocean-sky); }
.ocean-ray {
  position: absolute; top: -30%; width: 32vw; height: 130vh;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.30), transparent 76%);
  filter: blur(28px); transform-origin: top center; opacity: 0.55;
}
[data-theme="dark"] .ocean-ray { background: linear-gradient(180deg, rgb(150 210 255 / 0.16), transparent 76%); }
.ocean-ray--1 { left: 6%;  animation: ray-sway 15s var(--ease) infinite; }
.ocean-ray--2 { left: 40%; animation: ray-sway 19s var(--ease) infinite reverse; opacity: 0.4; }
.ocean-ray--3 { left: 72%; animation: ray-sway 17s var(--ease) infinite; opacity: 0.32; }
@keyframes ray-sway { 0%,100% { transform: rotate(-4deg) translateX(0); } 50% { transform: rotate(5deg) translateX(3vw); } }

.ocean-water { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; }
.ocean-water svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 三层浪：远浪浅、近浪深，靠动画时长差做视差 */
.ocean-wave--3 { color: var(--water-1); opacity: 0.36; }
.ocean-wave--2 { color: var(--water-1); opacity: 0.48; }
.ocean-wave--1 { color: var(--water-2); opacity: 0.42; }
.ocean-move { animation: ocean-drift linear infinite; will-change: transform; }
.ocean-wave--3 .ocean-move { animation-duration: 26s; }
.ocean-wave--2 .ocean-move { animation-duration: 18s; }
.ocean-wave--1 .ocean-move { animation-duration: 12s; }
/* 位移量 = pattern 的一个周期（400 用户单位），首尾状态完全重合，
   所以循环点不会有跳变，也不会有拼接缝。 */
@keyframes ocean-drift { from { transform: translateX(0); } to { transform: translateX(-400px); } }

.bubbles { position: absolute; inset: 0; overflow: hidden; }
.bubble {
  position: absolute; bottom: -8vh;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.34);      /* 平涂半透，不用径向渐变 */
  border: 1px solid rgb(255 255 255 / 0.45);
  animation: bubble-up linear infinite;
}
@keyframes bubble-up {
  0%   { transform: translateY(0) translateX(0) scale(0.6); opacity: 0; }
  12%  { opacity: 0.85; }
  85%  { opacity: 0.6; }
  100% { transform: translateY(-104vh) translateX(var(--drift, 20px)) scale(1.15); opacity: 0; }
}

.bottle-view { display: flex; flex-direction: column; gap: var(--sp-4); padding-bottom: var(--sp-6); }
.bottle-tabs { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.bottle-tabs .spacer { flex: 1 1 auto; }

/* 海面上的瓶子卡片 */
.sea-surface { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.bottle-card {
  position: relative;
  flex: 1 1 268px; max-width: 400px;
  padding: var(--sp-4) var(--sp-4) 14px;
  border-radius: var(--r-lg);
  animation: drift 6.5s var(--ease) infinite;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease);
}
.bottle-card:nth-child(2n) { animation-duration: 7.8s; animation-delay: -1.4s; }
.bottle-card:nth-child(3n) { animation-duration: 8.6s; animation-delay: -3s; }
.bottle-card:hover { transform: translateY(-6px) scale(1.015); }
@keyframes drift {
  0%,100% { transform: translateY(0) rotate(-0.5deg); }
  50%     { transform: translateY(-7px) rotate(0.6deg); }
}
.bottle-card.is-unread { box-shadow: var(--glass-glow), var(--glass-shadow), 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.bottle-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 13px; flex: none;
  background: color-mix(in srgb, var(--accent) 16%, transparent);   /* 纯色底，不用双色渐变 */
  border: 1px solid var(--glass-edge);
}
.bottle-mark .ico { width: 20px; height: 20px; color: var(--accent); }
.bottle-alias {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 620; letter-spacing: 0.02em;
  padding: 2px 8px; border-radius: 99px;
  background: var(--glass-bg-3); border: 1px solid var(--hairline);
  color: var(--ink-2); font-family: var(--font-num);
}
.bottle-text { font-size: 14px; line-height: 1.68; white-space: pre-wrap; overflow-wrap: anywhere; }
.bottle-thread { display: flex; flex-direction: column; gap: 10px; margin-top: var(--sp-3); }
.msg { display: flex; gap: 9px; align-items: flex-start; }
.msg--me { flex-direction: row-reverse; }
.msg-bubble {
  max-width: 78%; padding: 9px 13px; border-radius: 16px;
  font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--glass-bg-3); border: 1px solid var(--hairline);
}
.msg--me .msg-bubble {
  background: var(--accent);                  /* 纯色，不用渐变 */
  color: var(--accent-ink); border-color: transparent;
}
.msg-who { font-size: 10.5px; color: var(--ink-3); margin-bottom: 3px; font-family: var(--font-num); }

/* 打捞动画 */
.dredge {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center;
  background: rgb(6 12 22 / 0.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fade-in 0.3s var(--ease) both;
}
.dredge-bottle {
  width: 76px; height: 76px; color: #cdf0ff;
  filter: drop-shadow(0 0 26px rgb(140 220 255 / 0.7));
  animation: dredge-rise 1.35s var(--ease-out) both;
}
@keyframes dredge-rise {
  0%   { transform: translateY(120px) rotate(-18deg) scale(0.5); opacity: 0; }
  45%  { transform: translateY(0) rotate(6deg) scale(1.08); opacity: 1; }
  70%  { transform: translateY(-14px) rotate(-3deg) scale(1); }
  100% { transform: translateY(0) rotate(0) scale(1); opacity: 1; }
}
.dredge-text { margin-top: 14px; color: #eaf6ff; font-size: 13px; letter-spacing: 0.06em; }

/* ══ 4. 跨时区约会议 ══════════════════════════════════════════════════════ */
.mtg-setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--sp-3); }
.mtg-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.mtg-legend .scale { display: inline-flex; align-items: center; gap: 3px; }
.mtg-legend .scale i { width: 15px; height: 12px; border-radius: 3px; display: block; }

/* 总表：成员 × 48 格 */
.mtg-scroll { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--glass-bg-3); }
.mtg-grid { border-collapse: separate; border-spacing: 0; font-size: 11.5px; }
.mtg-grid th, .mtg-grid td { padding: 0; }
.mtg-grid .corner, .mtg-grid .who {
  position: sticky; left: 0; z-index: 3;
  background: var(--glass-bg-2);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  text-align: left; padding: 0 10px;
  border-right: 1px solid var(--hairline);
}
.mtg-grid .corner { width: 150px; min-width: 150px; height: 46px; z-index: 5; border-bottom: 1px solid var(--hairline); }
.mtg-grid .who { width: 150px; min-width: 150px; height: 32px; font-weight: 560; }
.mtg-grid .who .mini { font-size: 10px; color: var(--ink-3); font-weight: 400; }
.mtg-grid .hour {
  position: sticky; top: 0; z-index: 2; height: 24px;
  background: var(--glass-bg-2);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  font-size: 10px; font-weight: 620; color: var(--ink-3); font-family: var(--font-num);
  border-bottom: 1px solid var(--hairline); border-left: 1px solid var(--hairline);
  white-space: nowrap; padding: 0 2px;
}
.mtg-grid .hour.is-major { color: var(--ink-2); }
.mtg-grid .hour .loc { display: block; font-size: 8.5px; opacity: 0.62; }
.mtg-grid .mcell, .mtg-grid .hcell, .mtg-grid .acell {
  width: 30px; min-width: 30px; height: 32px;
  border-left: 1px solid color-mix(in srgb, var(--hairline) 70%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--hairline) 70%, transparent);
  text-align: center;
}
.mtg-grid .hcell { cursor: default; }
.mtg-grid .hcell .bar {
  display: block; height: 15px; border-radius: 4px; margin: 0 3px;
  transition: opacity 0.3s var(--ease);
}
.mtg-grid .acell { cursor: pointer; transition: background 0.14s var(--ease); }
.mtg-grid .acell:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.mtg-grid .acell .tick {
  display: block; width: 17px; height: 17px; margin: 0 auto; border-radius: 6px;
  background: transparent; border: 1.5px dashed var(--ink-4);
  transition: all 0.18s var(--ease-out);
}
.mtg-grid .acell.is-on .tick {
  background: var(--accent);                  /* 纯色，不用渐变 */
  border: 1.5px solid transparent;
  box-shadow: 0 1px 4px rgb(15 23 42 / 0.24);
}
.mtg-grid .acell.is-mine .tick { border-style: solid; }
.mtg-grid .acell.is-readonly { cursor: default; }
.mtg-grid .acell.is-readonly:hover { background: transparent; }
.mtg-grid tr.is-me .who { color: var(--accent); }
.mtg-grid td.me-col-marker { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent) inset; }
.mtg-grid .hour.is-now { color: var(--danger); }

/* 重合热力条 */
.heat-wrap { border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--glass-bg-3); padding: var(--sp-4); }
.heat { display: flex; gap: 2px; align-items: flex-end; height: 74px; }
.heat .h {
  flex: 1 1 0; min-width: 4px; border-radius: 3px 3px 2px 2px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
  position: relative;
}
.heat .h.is-full { background: var(--ok); box-shadow: 0 0 8px color-mix(in srgb, var(--ok) 34%, transparent); }
.heat .h:hover { transform: scaleY(1.04); }
.heat-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-3); font-family: var(--font-num); margin-top: 6px; }

/* 推荐时段 */
.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: var(--sp-3); }
.slot-card {
  padding: 13px 15px; border-radius: var(--r-md);
  border: 1px solid var(--hairline); background: var(--glass-bg-3);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease), background 0.22s var(--ease);
}
.slot-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--glass-bg); }
.slot-card.is-best { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--glass-bg-3)); }
.slot-time { font-size: 15px; font-weight: 640; font-family: var(--font-num); letter-spacing: -0.01em; }
.slot-local { font-size: 11.5px; color: var(--ink-3); }
.slot-avatars { display: flex; }
.slot-avatars .avatar { width: 22px; height: 22px; font-size: 9.5px; margin-right: -7px; border: 1.5px solid var(--bg-base); }
.slot-avatars .avatar.is-out { filter: grayscale(1) opacity(0.4); }

/* ══ 5. 总后台 ════════════════════════════════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: var(--sp-3); }
.stat {
  padding: 15px 17px; border-radius: var(--r-lg);
  display: flex; flex-direction: column; gap: 3px;
}
.stat-k { font-size: 11.5px; color: var(--ink-3); font-weight: 560; letter-spacing: 0.02em; display: flex; align-items: center; gap: 5px; }
.stat-k .ico { width: 14px; height: 14px; color: var(--accent); }
.stat-v { font-size: 27px; font-weight: 680; font-family: var(--font-num); letter-spacing: -0.03em; line-height: 1.15; }
.stat-d { font-size: 11px; color: var(--ink-3); }
.admin-tabs { display: flex; gap: 5px; flex-wrap: wrap; padding: 5px; border-radius: var(--r-md); background: var(--glass-bg-3); border: 1px solid var(--hairline); }
.admin-tab {
  padding: 6px 14px; border-radius: var(--r-sm);
  font-size: 12.5px; font-weight: 540; color: var(--ink-2);
  transition: all 0.2s var(--ease);
}
.admin-tab:hover { color: var(--ink); background: var(--glass-bg-3); }
.admin-tab.is-active { color: var(--accent-ink); background: var(--accent); box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 30%, transparent); }
.mini-av {
  width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 660; color: #fff; flex: none;
  border: 1px solid rgb(255 255 255 / 0.35);
}
.audit-line { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 12.5px; }
.audit-line:last-child { border-bottom: 0; }
.audit-time { color: var(--ink-3); font-family: var(--font-num); font-size: 11.5px; flex: none; width: 128px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, transparent) !important; background: color-mix(in srgb, var(--danger) 6%, var(--glass-bg-3)) !important; }

/* ══ 6. 个人设置 ══════════════════════════════════════════════════════════ */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--sp-4); align-items: start; }
.profile-card { display: flex; align-items: center; gap: 14px; }
.profile-card .avatar { width: 56px; height: 56px; font-size: 21px; }
.tz-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.tz-row:last-child { border-bottom: 0; }
