/* components.css — 漂浮瓶、开盖动画、信纸、标签、微光、打捞、收纳盒 */

/* ===== 海面漂浮瓶 ===== */
.float-bottle {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  display: block;
  filter: drop-shadow(0 3px 4px rgba(18, 40, 50, 0.35));
  animation: bob var(--bob-dur, 4s) ease-in-out infinite;
  animation-delay: var(--bob-delay, 0s);
  cursor: pointer;
}

.float-bottle img {
  width: 100%;
  height: 100%;
  display: block;
}

.float-bottle:focus-visible {
  outline: 3px solid #ffe9a8;
  outline-offset: 4px;
  border-radius: 12px;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

.float-bottle.throw {
  animation: throwIn 0.9s ease-out;
}

@keyframes throwIn {
  0% { opacity: 0; transform: translate(0, 60px) scale(0.4) rotate(0deg); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(-3deg); }
}

/* 收到回复的微光 */
.float-bottle.is-replied img {
  animation: glowPulse 2.4s ease-in-out infinite;
}

.float-bottle.is-replied {
  filter: drop-shadow(0 0 7px rgba(255, 224, 138, 0.9)) drop-shadow(0 0 16px rgba(255, 214, 110, 0.7));
}

@keyframes glowPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

/* ===== 打捞动画 ===== */
.fishing-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 5vh;
  gap: 12px;
  pointer-events: none;
}

.fishing-overlay.active { display: flex; }

.fishing-net {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.28);
  background:
    radial-gradient(circle, transparent 0 28%, rgba(255,255,255,0.35) 29% 38%, transparent 39% 52%, rgba(255,255,255,0.25) 53% 60%, transparent 61% 100%);
  animation: netPulse 1s ease-in-out infinite;
}

@keyframes netPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.06); }
}

.splash {
  width: 150px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  filter: blur(2px);
  animation: splash 0.8s ease-in-out infinite;
}

@keyframes splash {
  0%, 100% { transform: scaleX(0.6); opacity: 0.5; }
  50% { transform: scaleX(1); opacity: 0.9; }
}

.fishing-overlay::after {
  content: "正在打捞……";
  color: #eaf7f2;
  font-size: 15px;
  letter-spacing: 3px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ===== 瓶子阅读弹层 ===== */
.bottle-modal {
  width: min(92vw, 360px);
  height: min(82vh, 620px);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 36%, rgba(48, 104, 124, 0.92), rgba(18, 42, 56, 0.96));
  box-shadow: 0 18px 50px rgba(0,0,0,0.5), inset 0 0 40px rgba(255,255,255,0.08);
  overflow: hidden;
}

.bottle-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.bottle-stage .bottle {
  position: absolute;
  left: 50%;
  top: 62%;
  width: 118px;
  height: 210px;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.bottle-cap {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 56px;
  height: 26px;
  border-radius: 7px 7px 4px 4px;
  background: linear-gradient(180deg, #c89a55, #8c6232);
  box-shadow: inset 0 2px 3px rgba(255,255,255,0.35), 0 3px 6px rgba(0,0,0,0.35);
  transform: translateX(-50%);
  z-index: 4;
}

.bottle-neck {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 36px;
  height: 50px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, rgba(215, 242, 235, 0.55), rgba(140, 200, 195, 0.35));
  border: 1px solid var(--glass-line);
  transform: translateX(-50%);
  z-index: 3;
}

.bottle-glass {
  position: absolute;
  top: 52px;
  left: 50%;
  width: 104px;
  height: 146px;
  border-radius: 20px 20px 30px 30px / 28px 28px 40px 40px;
  background:
    linear-gradient(180deg, rgba(205, 240, 232, 0.42), rgba(118, 190, 184, 0.30));
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 8px 18px rgba(255,255,255,0.25), inset 0 -10px 18px rgba(20, 80, 90, 0.25);
  transform: translateX(-50%);
  z-index: 3;
}

.bottle-shine {
  position: absolute;
  top: 72px;
  left: 50%;
  width: 16px;
  height: 86px;
  margin-left: -38px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0));
  filter: blur(1px);
  z-index: 3;
}

/* 信纸：初始藏在瓶内，开盖后抽出 */
.letter {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 82%;
  max-height: 54%;
  overflow: auto;
  padding: 16px 16px 14px;
  border-radius: 10px;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(120,90,45,0.05) 0 1px, transparent 1px 24px),
    radial-gradient(circle at 18% 12%, rgba(255,255,255,0.4), transparent 45%);
  border: 1px solid #d8c392;
  box-shadow: 0 10px 24px rgba(0,0,0,0.4);
  transform: translate(-50%, 120%) scaleY(0.35);
  opacity: 0;
  z-index: 5;
}

.letter-text {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  line-height: 1.8;
  font-size: 16px;
}

.letter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #fff6df;
  background: rgba(74, 56, 36, 0.65);
}

.tag-mine { background: #7a5a2f; }
.tag-picked { background: #2d7d9e; }
.tag-replied {
  background: linear-gradient(180deg, #d8a12f, #a5711f);
  box-shadow: 0 0 10px rgba(255, 220, 130, 0.8);
}

.letter-thread {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #c8ad78;
}

.letter-thread h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}

.thread-item {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.thread-item .who {
  color: #9a7a42;
  font-size: 12px;
}

/* 回复输入区 */
.reply-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #c8ad78;
}

.reply-box textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px;
  border: 1px solid #d3bd88;
  border-radius: 8px;
  background: rgba(255, 250, 230, 0.7);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

.reply-box textarea:focus {
  outline: 2px solid var(--gold);
  background: #fff9e6;
}

.reply-foot {
  margin-top: 8px;
}

/* ===== 开盖 / 合盖动画 ===== */
.bottle-stage.open .bottle-cap {
  animation: capPop 0.65s ease-out forwards;
}

.bottle-stage.open .bottle {
  animation: bottleShake 0.6s 0.1s ease-in-out;
}

.bottle-stage.open .letter {
  animation: letterOut 0.8s 0.2s ease-out forwards;
}

.bottle-stage.closing .bottle-cap { animation: capPop 0.45s ease-in reverse both; }
.bottle-stage.closing .bottle { animation: bottleShake 0.4s ease-in-out reverse both; }
.bottle-stage.closing .letter { animation: letterOut 0.45s ease-in reverse both; }

@keyframes capPop {
  0% { transform: translateX(-50%) translateY(0) rotate(0); }
  45% { transform: translateX(-50%) translateY(-34px) rotate(-24deg); }
  100% { transform: translateX(-50%) translateY(-30px) rotate(-16deg); }
}

@keyframes bottleShake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0); }
  25% { transform: translate(calc(-50% - 7px), -50%) rotate(-6deg); }
  75% { transform: translate(calc(-50% + 7px), -50%) rotate(6deg); }
}

@keyframes letterOut {
  0% { opacity: 0; transform: translate(-50%, 120%) scaleY(0.35); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, 0) scaleY(1); }
}

/* ===== 我的瓶子列表 ===== */
.my-empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 30px 10px;
  letter-spacing: 1px;
}

.my-item {
  position: relative;
  margin-bottom: 12px;
  padding: 12px 14px 10px;
  border-radius: 10px;
  background: rgba(255, 250, 230, 0.55);
  border: 1px solid #ddc798;
}

.my-item .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.my-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  color: var(--ink);
  font-size: 15px;
}

.my-meta {
  margin-top: 8px;
  font-size: 12px;
  color: #9a7a42;
}

.btn-delete {
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(156, 59, 46, 0.4);
  background: rgba(189, 85, 68, 0.1);
  color: var(--danger);
  font-size: 13px;
}

.btn-delete:hover {
  background: rgba(189, 85, 68, 0.2);
}

.btn-remove {
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(120, 110, 90, 0.4);
  background: rgba(120, 110, 90, 0.08);
  color: #7a7060;
  font-size: 13px;
}

.btn-remove:hover {
  background: rgba(120, 110, 90, 0.18);
}
/* 漂浮瓶水面倒影与悬停反馈 */
.float-bottle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 72%;
  height: 6px;
  border-radius: 50%;
  background: rgba(18, 50, 68, 0.28);
  filter: blur(1px);
  transform: translateX(-50%);
}

.float-bottle:hover {
  filter: drop-shadow(0 0 8px rgba(255, 232, 170, 0.75)) drop-shadow(0 4px 6px rgba(18, 40, 50, 0.4));
}

.float-bottle:hover img {
  opacity: 0.96;
}
/* ===== 标题与按钮美化 ===== */
.app-header {
  align-items: flex-start;
}

.title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.app-title {
  font-family: "STKaiti", "KaiTi", "FangSong", "LiSu", "Microsoft YaHei", serif;
  font-size: clamp(26px, 5vw, 40px);
  letter-spacing: 6px;
  background: linear-gradient(180deg, #fff9df 0%, #f7dfa0 55%, #e6bc6d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(30, 22, 10, 0.6)) drop-shadow(0 0 14px rgba(255, 230, 160, 0.25));
}

.app-title::after {
  content: "";
  display: block;
  height: 9px;
  margin-top: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 9'%3E%3Cpath d='M0 5 Q 6 1 12 5 T 24 5 T 36 5 T 48 5' fill='none' stroke='%23f0d58a' stroke-width='1.7'/%3E%3C/svg%3E") repeat-x center / 48px 9px;
  opacity: 0.9;
}

.app-subtitle {
  margin: 0;
  font-family: "KaiTi", "FangSong", "Microsoft YaHei", serif;
  font-size: 13px;
  letter-spacing: 4px;
  color: #f7ecd0;
  opacity: 0.92;
  text-shadow: 0 1px 2px rgba(30, 22, 10, 0.45);
}

.btn {
  position: relative;
  overflow: hidden;
  border-width: 2px;
  border-style: solid;
  border-color: rgba(74, 56, 36, 0.55);
  box-shadow:
    0 0 0 3px rgba(255, 243, 205, 0.30),
    0 5px 12px rgba(18, 30, 28, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(74, 56, 36, 0.35);
  border-radius: inherit;
  pointer-events: none;
}

.btn-primary {
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.55), transparent 42%),
    linear-gradient(180deg, #fbe9b6, #e8c781);
  color: #3b2a16;
}

.btn-danger {
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.35), transparent 42%),
    linear-gradient(180deg, #c76755, #8d3427);
  border-color: rgba(74, 30, 22, 0.7);
  color: #fff;
}

.btn-danger::before {
  border-color: rgba(255, 235, 220, 0.4);
}

.btn-ghost {
  background: rgba(255, 249, 228, 0.8);
}

.btn-box {
  padding: 9px 14px;
  font-size: 14px;
}

.btn-ico {
  font-family: "Segoe UI Symbol", "Microsoft YaHei", sans-serif;
  font-size: 1.15em;
  line-height: 1;
  transform: translateY(-1px);
}

.btn:hover {
  transform: translateY(-1px);
}
.app-title {
  text-shadow: none;
}
/* ===== 底部按钮等宽整齐 ===== */
.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.actions .btn {
  flex: 1 1 0;
  width: 100%;
  max-width: 180px;
  min-height: 50px;
  padding: 12px 8px;
  font-size: 16px;
  letter-spacing: 2px;
  white-space: nowrap;
}

.btn-ico {
  font-size: 1.1em;
}

@media (max-width: 400px) {
  .actions { gap: 8px; }
  .actions .btn { font-size: 14px; padding: 11px 6px; letter-spacing: 1px; }
  .btn-ico { font-size: 1em; }
}
.actions {
  flex-wrap: nowrap;
}
/* ===== 细节打磨 ===== */
.paper {
  position: relative;
}

.paper::after {
  content: "大海邮局";
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: "KaiTi", "FangSong", serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(120, 90, 45, 0.55);
  border: 1.5px solid rgba(140, 105, 55, 0.5);
  border-radius: 5px;
  padding: 3px 7px;
  transform: rotate(8deg);
}

.paper h2::after {
  content: "";
  display: block;
  height: 7px;
  margin-top: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 7'%3E%3Cpath d='M0 4 Q 5 1 10 4 T 20 4 T 30 4 T 36 4' fill='none' stroke='%23a8874c' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x center / 36px 7px;
  opacity: 0.55;
}

.confirm::before {
  content: "⚠";
  display: block;
  margin: 0 auto 8px;
  font-size: 30px;
  color: var(--danger);
}

.my-item {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.my-item:hover {
  background: rgba(255, 250, 230, 0.78);
  box-shadow: 0 4px 10px rgba(90, 65, 35, 0.12);
}

.fishing-net {
  position: relative;
}

.fishing-net::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -70px;
  width: 2px;
  height: 70px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(214, 180, 120, 0.9));
}
/* ===== 开盖与信纸再打磨 ===== */

/* 信纸：加蜡封红点、更旧纸张与轻微倾斜 */
.letter {
  background-image:
    radial-gradient(circle at 88% 9%, rgba(178, 66, 44, 0.30) 0 24px, transparent 25px),
    repeating-linear-gradient(0deg, rgba(120, 90, 45, 0.05) 0 1px, transparent 1px 24px),
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.4), transparent 45%);
  border: 1px solid #c9ad78;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45), inset 0 0 18px rgba(150, 120, 70, 0.25);
}

/* 抽出信纸时带一点手写纸张的自然倾斜 */
@keyframes letterOut {
  0% { opacity: 0; transform: translate(-50%, 120%) scaleY(0.35) rotate(0deg); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, 0) scaleY(1) rotate(-1.2deg); }
}

/* 开盖瞬间的暖光 */
.bottle-stage.open::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 200, 0.34), transparent 70%);
  transform: translate(-50%, -50%);
  animation: openingGlow 0.8s ease-out forwards;
  pointer-events: none;
}

@keyframes openingGlow {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
/* ===== 对话气泡（头像 + 昵称） ===== */
.letter-thread {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
}

.letter-thread h4 {
  display: none;
}

.thread-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
  white-space: normal;
  line-height: normal;
  color: var(--ink);
}

.thread-item.is-me {
  flex-direction: row-reverse;
}

.avatar {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.bubble {
  max-width: 78%;
  padding: 8px 11px;
  border-radius: 12px;
  background: #fff8e1;
  border: 1px solid #d9c18b;
  box-shadow: 0 2px 5px rgba(90, 65, 35, 0.12);
}

.thread-item.is-me .bubble {
  background: #f3e2b3;
}

.bubble .who {
  color: #9a7a42;
  font-size: 12px;
  margin-bottom: 3px;
}

.bubble .msg {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
/* ===== 渔网重绘 ===== */
.fishing-net {
  width: 130px;
  height: 165px;
  background: none;
  box-shadow: none;
}

.fishing-net::before {
  content: none;
}

.fishing-net svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.28));
}

@keyframes netPulse {
  0%, 100% { transform: translateY(0) rotate(-5deg) scale(1); }
  50% { transform: translateY(-10px) rotate(6deg) scale(1.04); }
}

.splash {
  position: relative;
  width: 170px;
  height: 30px;
}

.splash::before,
.splash::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
}

.splash::before { left: 18px; animation: dropSplash 0.8s ease-in-out infinite; }
.splash::after { right: 18px; animation: dropSplash 0.8s 0.25s ease-in-out infinite; }

@keyframes dropSplash {
  0% { transform: translateY(0); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}
/* ===== 信纸关闭按钮与滚动结构 ===== */
.letter {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(circle at 13% 9%, rgba(178, 66, 44, 0.30) 0 24px, transparent 25px),
    repeating-linear-gradient(0deg, rgba(120, 90, 45, 0.05) 0 1px, transparent 1px 24px),
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.4), transparent 45%);
}

.letter-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 16px 14px;
}

.letter-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 7;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.letter-close:hover {
  background: #a93226;
}

.letter-close:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
/* 信纸关闭按钮：与纸张协调的复古红 × */
.letter-close {
  width: 32px;
  height: 32px;
  background: rgba(250, 238, 203, 0.92);
  border: 1px solid #c9ad78;
  border-radius: 50%;
  color: #a93a2a;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(90, 65, 35, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.letter-close:hover {
  background: #f0ddaa;
  color: #8e2f22;
}
/* ===== 多用户：用户名与起名字 ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f7ecd0;
  font-size: 14px;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.name-hint {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.name-paper input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d3bd88;
  border-radius: 8px;
  background: rgba(255, 250, 230, 0.7);
  color: var(--ink);
  font-size: 16px;
}

.name-paper input:focus {
  outline: 2px solid var(--gold);
  background: #fff9e6;
}

.name-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.me-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b8862f;
  color: #fff;
  font-size: 11px;
  vertical-align: middle;
}
/* 漂浮瓶改为纯装饰，不可点击 */
.float-bottle {
  cursor: default;
}

.float-bottle:hover {
  filter: drop-shadow(0 3px 4px rgba(18, 40, 50, 0.35));
}

.float-bottle:hover img {
  opacity: 1;
}
.tag-replied-me {
  background: #2f7d6d;
}
/* ===== 我的瓶子标签页与内容查看 ===== */
.my-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px 0;
}

.my-tab {
  flex: 1;
  padding: 9px 6px;
  border-radius: 10px;
  border: 1px solid #d8c392;
  background: rgba(255, 250, 230, 0.5);
  color: var(--ink-soft);
  font-size: 15px;
  letter-spacing: 1px;
}

.my-tab.is-active {
  background: #f0ddaa;
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 1px 3px rgba(90, 65, 35, 0.15);
}

.view-paper {
  width: min(92vw, 480px);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid #d8c392;
}

.view-header h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 2px;
}

.view-header .modal-close {
  position: static;
}

.view-body {
  overflow: auto;
  padding: 14px 16px 18px;
}

.view-body .tag-row {
  margin-bottom: 10px;
}
.view-body {
  flex: 1 1 auto;
  min-height: 0;
}

.view-reply {
  padding: 12px 16px 16px;
  border-top: 1px solid #d8c392;
  background: rgba(255, 250, 230, 0.35);
}

.view-reply textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px;
  border: 1px solid #d3bd88;
  border-radius: 8px;
  background: rgba(255, 250, 230, 0.7);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

.view-reply textarea:focus {
  outline: 2px solid var(--gold);
  background: #fff9e6;
}

.view-reply .reply-foot {
  margin-top: 8px;
}
/* ===== 新消息提醒 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d94b3d;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.badge[hidden] {
  display: none;
}

.tag-new {
  background: #d94b3d;
  box-shadow: 0 0 10px rgba(217, 75, 61, 0.8);
  animation: newPulse 1.6s ease-in-out infinite;
}

@keyframes newPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.my-item.has-new {
  border-color: #d94b3d;
  box-shadow: 0 0 0 1px rgba(217, 75, 61, 0.35), 0 4px 12px rgba(150, 60, 50, 0.15);
}
/* ===== 夜间：漂流瓶发光 ===== */
.sea.is-night .float-bottle {
  filter:
    drop-shadow(0 0 8px rgba(160, 225, 255, 0.9))
    drop-shadow(0 0 20px rgba(120, 200, 255, 0.5));
}

.sea.is-night .float-bottle:hover {
  filter:
    drop-shadow(0 0 12px rgba(200, 242, 255, 1))
    drop-shadow(0 0 28px rgba(140, 215, 255, 0.7));
}

/* 收到回复的瓶子在夜间保持金色微光 + 蓝色外晕 */
.sea.is-night .float-bottle.is-replied {
  filter:
    drop-shadow(0 0 8px rgba(255, 220, 130, 0.9))
    drop-shadow(0 0 20px rgba(255, 205, 105, 0.55))
    drop-shadow(0 0 30px rgba(150, 220, 255, 0.35));
}
/* ===== 顶部公告小喇叭 ===== */
.announcement-bar {
  position: relative;
  width: 100%;
  height: 22px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  z-index: 6;
}

.announcement-bar[hidden] {
  display: none;
}

.announcement-track {
  position: absolute;
  top: 0;
  white-space: nowrap;
  display: inline-block;
  padding-left: 100%;
  animation: announceScroll 18s linear infinite;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 22px;
}

@keyframes announceScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}