/* ============================================================
   基础 Reset
   ============================================================ */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none; -webkit-user-select: none;
}
body {
    background: linear-gradient(135deg, #e0f7fa 0%, #bbdefb 100%);
    min-height: 100vh; min-height: 100dvh;
    overflow: hidden; position: relative;
    display: flex; justify-content: center; align-items: center;
}

/* ============================================================
   背景岛屿
   ============================================================ */
.bg-island {
    position: fixed; bottom: 0; left: 0; width: 100%;
    height: 35vh; min-height: 200px;
    z-index: -1; pointer-events: none; overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

/* ============================================================
   岛屿点击浮动文字 + 弹跳
   ============================================================ */
.island-float-text {
    position: fixed; color: #e63946;
    font-size: 22px; font-weight: bold;
    pointer-events: none; z-index: 9999;
    text-shadow: 0 2px 6px rgba(255, 255, 255, 0.95), 0 0 4px rgba(255, 255, 255, 0.8);
    animation: floatUpAnim 1s ease-out forwards;
    font-family: 'PingFang SC', sans-serif;
    white-space: nowrap;
}
@keyframes floatUpAnim {
    0%   { transform: translate(-50%, 0) scale(0.5); opacity: 0; }
    20%  { transform: translate(-50%, -12px) scale(1.25); opacity: 1; }
    100% { transform: translate(-50%, -70px) scale(1); opacity: 0; }
}
#islandClickable { transform-origin: 50px 55px; }
#islandClickable.clicked { animation: islandBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes islandBounce {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.18); }
    60%  { transform: scale(0.94); }
    100% { transform: scale(1); }
}

/* ============================================================
   地图入口 + 统计
   ============================================================ */
.map-and-stats { position: absolute; top: 20px; left: 30px; z-index: 100; display: flex; align-items: center; gap: 15px; }
.map-icon { width: 60px; height: 60px; cursor: pointer; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); filter: drop-shadow(0 4px 8px rgba(139, 105, 20, 0.3)); }
.map-icon:hover { transform: scale(1.1) rotate(-5deg); filter: drop-shadow(0 6px 12px rgba(139, 105, 20, 0.5)); }
.map-icon svg { width: 100%; height: 100%; }
.stats-container { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; color: #1d3557; letter-spacing: 1px; text-shadow: 0 2px 5px rgba(255, 255, 255, 0.9); }
.stats-container span { color: #0077b6; }

/* ============================================================
   顶部栏：状态面板 + 头像
   ============================================================ */
.top-bar { position: absolute; top: 20px; right: 30px; z-index: 100; display: flex; align-items: center; gap: 15px; }

.status-panel {
    background: transparent; border-radius: 12px; padding: 0 5px; border: none;
    display: flex; flex-direction: column; justify-content: center;
    height: 60px; font-size: 13px; font-weight: 700; color: #1d3557;
    text-shadow: 0 2px 5px rgba(255, 255, 255, 0.9), 0 0 8px rgba(255, 255, 255, 0.6);
    cursor: pointer; transition: all 0.3s ease;
}
.status-panel:hover { transform: translateY(-2px); }

.status-item { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.status-label { white-space: nowrap; font-size: 12px; color: #1d3557; text-shadow: 0 2px 5px rgba(255, 255, 255, 0.9); }
.status-bar {
    flex: 1; min-width: 56px; height: 8px;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 4px; overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}
.status-bar-fill {
    height: 100%; width: 0%; border-radius: 4px;
    transition: width 0.45s cubic-bezier(0.25, 1, 0.5, 1), background 0.35s ease;
    background: #ef476f;
}
.status-bar-fill.green  { background: linear-gradient(90deg, #74c69d 0%, #2d6a4f 100%); }
.status-bar-fill.yellow { background: linear-gradient(90deg, #ffd60a 0%, #e6a800 100%); }
.status-bar-fill.red    { background: linear-gradient(90deg, #ef476f 0%, #c1121f 100%); }
.status-value { color: #e63946; min-width: 30px; text-align: right; font-weight: 700; }

/* ============================================================
   角色详细状态弹窗
   ============================================================ */
.status-modal-box { position: relative; padding: 30px 40px; width: 320px; text-align: left; }
.status-close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 22px; font-weight: bold; color: #457b9d; cursor: pointer; outline: none; }
.status-close-btn:hover { color: #1d3557; }
.status-details { display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: #1d3557; font-weight: 700; margin-top: 10px; }
.status-details .detail-row { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(168, 218, 220, 0.6); padding-bottom: 8px; }
.status-details .detail-row:last-child { border-bottom: none; }
.status-details span { color: #e63946; }

.status-details .detail-row.bar-row { justify-content: flex-start; align-items: center; gap: 10px; }
.status-details .detail-row.bar-row .bar-label { color: #1d3557; min-width: 60px; }
.status-details .detail-row.bar-row .status-bar { flex: 1; height: 10px; background: rgba(168, 218, 220, 0.35); }
.status-details .detail-row.bar-row .status-value { color: #e63946; min-width: 40px; text-align: right; }

/* ============================================================
   头像 + 下拉菜单
   ============================================================ */
.avatar-container { position: relative; }
.avatar { width: 50px; height: 50px; background: white; border-radius: 50%; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); cursor: pointer; display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; outline: none; }
.avatar:hover { transform: scale(1.1); box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); }
.avatar svg { width: 30px; height: 30px; fill: #64b5f6; }
.dropdown-menu { position: absolute; top: 65px; right: 0; background: white; width: 160px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 9; }
.dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { padding: 12px 20px; font-size: 14px; color: #555; cursor: pointer; display: flex; align-items: center; transition: 0.2s; outline: none; }
.dropdown-item:hover { background: #e3f2fd; color: #1976d2; }
.dropdown-item.logout { color: #ff5252; border-top: 1px solid #eee; margin-top: 5px; }
.dropdown-item.logout:hover { background: #ffebee; color: #d32f2f; }

/* ============================================================
   图标轮播 + 径向菜单
   ============================================================ */
.showcase-container { display: flex; align-items: center; justify-content: center; gap: 50px; width: 100%; max-width: 500px; padding: 0 20px; position: relative; z-index: 10; }
.arrow-btn { width: 60px; height: 60px; background: transparent; border: none; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.3s ease; flex-shrink: 0; outline: none; }
.arrow-btn:hover { transform: scale(1.15); filter: drop-shadow(0 0 10px rgba(100, 181, 246, 0.6)); }
.arrow-btn:active { transform: scale(0.9); }
.arrow-btn svg { width: 36px; height: 36px; fill: #64b5f6; }

.icon-stage { position: relative; width: 180px; height: 220px; display: flex; justify-content: center; align-items: center; }
.icon-item { position: absolute; width: 160px; height: 160px; display: flex; justify-content: center; align-items: center; opacity: 0; transform: scale(0.7); visibility: hidden; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); pointer-events: none; }
.icon-item.active { opacity: 1; transform: scale(1); visibility: visible; pointer-events: auto; }
.icon-item.active:hover { transform: scale(1.05); }
.icon-title { position: absolute; bottom: -35px; width: 100%; text-align: center; font-size: 16px; font-weight: 700; color: #1d3557; letter-spacing: 2px; text-shadow: 0 2px 5px rgba(255, 255, 255, 0.9), 0 0 8px rgba(255, 255, 255, 0.6); opacity: 0.9; transition: all 0.4s ease; pointer-events: none; }
.icon-item.active .icon-title { opacity: 1; }

.telescope-svg { width: 120px; height: 120px; }
.lens-flare { position: absolute; top: 20px; left: 45px; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle, rgba(100, 200, 255, 0.8) 0%, rgba(100, 200, 255, 0) 70%); animation: flareAnim 2.5s infinite linear; opacity: 0; pointer-events: none; }
@keyframes flareAnim {
    0%   { transform: translateX(-20px) translateY(-20px) scale(0.5); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: translateX(20px) translateY(20px) scale(1.5); opacity: 0; }
}

.bottle-svg { width: 120px; height: 120px; animation: floatS 4s ease-in-out infinite; }
@keyframes floatS {
    0%   { transform: translateY(0px) rotate(0deg); }
    25%  { transform: translateY(-12px) rotate(5deg); }
    50%  { transform: translateY(0px) rotate(0deg); }
    75%  { transform: translateY(-12px) rotate(-5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
/* 漂流瓶上方统计文字：大小与风格对齐右上角状态栏的“饱食度”标签 */
.bottle-total-text {
    white-space: nowrap;
    font-size: 12px;   /* 与 .status-label 一致 */
    font-weight: 700;  /* 与 .status-panel 一致 */
    color: #1d3557;
    text-shadow: 0 2px 5px rgba(255, 255, 255, 0.9);
    pointer-events: none;
}
.wave-container { position: absolute; bottom: 0px; width: 120px; height: 30px; display: flex; justify-content: center; align-items: center; }
.wave { position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(79, 195, 247, 0.6); opacity: 0; animation: ripple 3s linear infinite; }
.wave:nth-child(2) { animation-delay: 1s; }
.wave:nth-child(3) { animation-delay: 2s; }
@keyframes ripple {
    0%   { transform: scale(0.5); opacity: 0; }
    50%  { opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

.island-svg { width: 130px; height: 130px; }

.radial-menu { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 0; height: 0; display: flex; justify-content: center; align-items: center; z-index: 20; pointer-events: none; }
.radial-btn { position: absolute; width: 45px; height: 45px; background: white; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); cursor: pointer; opacity: 0; transform: translate(0, 0) scale(0); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-size: 18px; outline: none; pointer-events: auto; }
.btn-label { position: absolute; top: 110%; white-space: nowrap; font-size: 12px; font-weight: bold; color: #1d3557; letter-spacing: 1px; text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 0 5px rgba(255, 255, 255, 0.6); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.radial-btn:hover { background: #e3f2fd; transform: translate(var(--x), var(--y)) scale(1.1) !important; }
.icon-item.show-menu .radial-btn { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); }
.icon-item.show-menu .btn-label { opacity: 1; }

/* 漂流瓶三按钮：与岛屿一致，从左到右 写信-拾取-我的 */
#item-bottle .btn-1 { --x: -87px; --y: -50px; }
#item-bottle .btn-2 { --x: 0px; --y: -100px; }
#item-bottle .btn-3 { --x: 87px; --y: -50px; }
#item-bottle.show-menu .btn-1 { transition-delay: 0s; }
#item-bottle.show-menu .btn-2 { transition-delay: 0.1s; }
#item-bottle.show-menu .btn-3 { transition-delay: 0.2s; }
#item-telescope .btn-1 { --x: -50px; --y: -87px; } #item-telescope .btn-2 { --x: 50px; --y: -87px; }
#item-telescope.show-menu .btn-1 { transition-delay: 0s; } #item-telescope.show-menu .btn-2 { transition-delay: 0.1s; }
#item-island .btn-1 { --x: -87px; --y: -50px; } #item-island .btn-2 { --x: 0px; --y: -100px; } #item-island .btn-3 { --x: 87px; --y: -50px; }
#item-island.show-menu .btn-1 { transition-delay: 0s; } #item-island.show-menu .btn-2 { transition-delay: 0.1s; } #item-island.show-menu .btn-3 { transition-delay: 0.2s; }

/* ============================================================
   复古信笺弹窗（写信 / 拾取）
   ============================================================ */
.letter-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 2000; opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.letter-modal-overlay.show { opacity: 1; visibility: visible; }

.letter-modal-overlay.pick-loading-overlay {
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    pointer-events: none;
}
.letter-modal-overlay.pick-loading-overlay .letter-container { pointer-events: auto; }
.letter-modal-overlay.pick-loading-overlay .letter-footer { display: none; }

.letter-container {
    width: 90%; max-width: 650px; height: 0;
    background: #fdf6e3; border-radius: 8px; border: 2px solid #b08d57;
    overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column; position: relative;
}
.letter-modal-overlay.show .letter-container { height: 70vh; max-height: 500px; }
.letter-modal-overlay.show .letter-container.pick-loading-mode {
    height: auto; max-height: none; width: auto;
    min-width: 260px; max-width: 400px;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid rgba(176, 141, 87, 0.5);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(139, 105, 20, 0.2);
    padding: 22px 30px;
}

.bottle-slider-wrapper { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.letter-page-indicator { text-align: center; font-size: 14px; font-weight: bold; color: #8c6b3d; padding: 8px 0 0 0; letter-spacing: 1px; font-family: 'PingFang SC', sans-serif; }
.bottle-slider {
    flex: 1; display: flex;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
    cursor: grab; position: relative;
}
.bottle-slider::-webkit-scrollbar { display: none; }
.bottle-slider.grabbing { cursor: grabbing; }
.bottle-slide {
    flex: 0 0 100%; width: 100%;
    scroll-snap-align: start; scroll-snap-stop: always;
    padding: 20px 60px; box-sizing: border-box;
    display: flex; flex-direction: column; justify-content: center;
    overflow-y: auto;
    font-size: 18px; line-height: 40px; color: #2c3e50;
    font-family: 'KaiTi', 'STKaiti', serif;
    white-space: pre-wrap; word-break: break-word;
}

.pick-loading { flex: 1; display: none; flex-direction: column; justify-content: center; align-items: center; gap: 14px; padding: 0; }
.pick-loading-text { font-size: 16px; color: #6b5228; font-weight: bold; letter-spacing: 4px; font-family: 'PingFang SC', sans-serif; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9); }
.pick-loading-bar { width: 100%; height: 8px; background: transparent; border: none; border-radius: 0; box-shadow: none; overflow: visible; }
.pick-loading-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #d4a373 0%, #b08d57 100%);
    border-radius: 4px;
    transition: width 1s linear;
    box-shadow: 0 0 6px rgba(176, 141, 87, 0.5);
}

.page-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 64px;
    background: transparent; border: none;
    color: #8c6b3d; font-size: 36px; font-weight: bold;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 15; transition: all 0.2s; outline: none;
    padding: 0; line-height: 1;
    font-family: 'PingFang SC', sans-serif;
    opacity: 0.85;
}
.page-nav-btn.prev { left: 6px; }
.page-nav-btn.next { right: 6px; }
.page-nav-btn:hover:not(:disabled) { opacity: 1; transform: translateY(-50%) scale(1.15); }
.page-nav-btn:active:not(:disabled) { transform: translateY(-50%) scale(0.95); }
.page-nav-btn:disabled { opacity: 0.15; cursor: not-allowed; }

.letter-write-paper { flex: 1; padding: 20px; display: flex; flex-direction: column; }
#letterContent { flex: 1; width: 100%; background: transparent; border: none; outline: none; resize: none; font-size: 18px; line-height: 40px; color: #2c3e50; font-family: 'KaiTi', 'STKaiti', serif; height: 100%; padding: 0 10px; user-select: text; -webkit-user-select: text; }
#letterContent::placeholder { color: #a8b0b9; }
.letter-footer { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed #b08d57; background: rgba(255, 255, 255, 0.9); }
.letter-count { font-size: 14px; color: #457b9d; font-weight: bold; }
.letter-btns { display: flex; gap: 15px; }
.letter-btns button { padding: 8px 25px; border-radius: 20px; font-size: 14px; font-weight: bold; cursor: pointer; transition: all 0.3s; border: none; outline: none; }
.drop-btn { background: #457b9d; color: white; box-shadow: 0 4px 12px rgba(69, 123, 157, 0.4); }
.drop-btn:hover { background: #1d3557; transform: translateY(-2px); }
.cancel-btn { background: transparent; border: 2px solid #457b9d; color: #457b9d; }
.cancel-btn:hover { background: #e3f2fd; transform: translateY(-2px); }
.readonly-mode #letterContent { color: #555; }

/* ============================================================
   投放动画
   ============================================================ */
.bottle-anim { position: fixed; top: 50%; left: 50%; width: 80px; height: 120px; transform: translate(-50%, -50%) scale(0); z-index: 3000; opacity: 0; pointer-events: none; filter: drop-shadow(0 10px 15px rgba(100, 181, 246, 0.6)); }
.bottle-anim.drop { animation: dropBottleAnim 3s forwards; }
@keyframes dropBottleAnim {
    0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    20%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    80%  { transform: translate(-50%, 300px) scale(1); opacity: 1; }
    100% { transform: translate(-50%, 300px) scale(0.5); opacity: 0; }
}

/* ============================================================
   我的漂流瓶弹窗
   ============================================================ */
.my-bottles-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 2200; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.my-bottles-overlay.show { opacity: 1; visibility: visible; }

.icon-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.my-bottles-box {
    width: 90%; max-width: 640px;
    height: 78vh; max-height: 620px;
    background: #fdf6e3;
    border: 4px solid #b08d57;
    border-radius: 10px;
    box-shadow: inset 0 0 40px rgba(139, 105, 20, 0.1), 0 20px 40px rgba(0, 0, 0, 0.4);
    display: flex; flex-direction: column;
    overflow: hidden; position: relative;
    transform: scale(0.9); opacity: 0;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}
.my-bottles-overlay.show .my-bottles-box { transform: scale(1); opacity: 1; }

.my-bottles-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 22px;
    border-bottom: 2px dashed #b08d57;
    background: linear-gradient(180deg, #fdf6e3 0%, #f7e9c8 100%);
}
.my-bottles-title {
    font-size: 20px; font-weight: bold; color: #4a3b22;
    letter-spacing: 4px;
    font-family: 'ZCOOL KuaiLe', 'Comic Sans MS', cursive, sans-serif;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.85);
}
.my-bottles-close {
    background: none; border: none; font-size: 22px; font-weight: bold;
    color: #8c6b3d; cursor: pointer; outline: none;
    padding: 0 4px; line-height: 1; transition: color 0.2s;
}
.my-bottles-close:hover { color: #4a3b22; }

.my-bottles-tabs {
    display: flex; padding: 0 16px;
    border-bottom: 2px dashed #b08d57;
    background: rgba(255, 255, 255, 0.45);
}
.my-bottles-tab {
    flex: 1; padding: 12px 0;
    background: transparent; border: none;
    font-size: 14px; font-weight: bold;
    color: #8c6b3d; cursor: pointer;
    position: relative; outline: none;
    transition: color 0.3s;
    font-family: 'PingFang SC', sans-serif;
    letter-spacing: 1px;
}
.my-bottles-tab.active { color: #4a3b22; }
.my-bottles-tab.active::after {
    content: '';
    position: absolute; bottom: -2px; left: 22%; right: 22%;
    height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, #d4a373 0%, #b08d57 100%);
}

.my-bottles-search {
    padding: 10px 18px;
    border-bottom: 1px dashed rgba(176, 141, 87, 0.5);
    background: rgba(255, 255, 255, 0.55);
    position: relative;
}
.my-bottles-search input {
    width: 100%; padding: 9px 40px 9px 16px;
    border: 2px solid rgba(176, 141, 87, 0.5);
    border-radius: 20px; background: #fff;
    font-size: 13px; color: #4a3b22;
    outline: none; transition: all 0.25s;
    font-family: 'PingFang SC', sans-serif;
    user-select: text; -webkit-user-select: text;
}
.my-bottles-search input::placeholder { color: #b8a17c; }
.my-bottles-search input:focus {
    border-color: #b08d57;
    box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.15);
}
.my-bottles-search .search-icon {
    position: absolute; right: 34px; top: 50%;
    transform: translateY(-50%);
    font-size: 15px; color: #b08d57;
    pointer-events: none;
}

.my-bottles-list {
    flex: 1; overflow-y: auto;
    padding: 14px 18px;
    background: #fdf6e3;
}
.my-bottles-list::-webkit-scrollbar { width: 6px; }
.my-bottles-list::-webkit-scrollbar-thumb { background: rgba(176, 141, 87, 0.45); border-radius: 3px; }
.my-bottles-list::-webkit-scrollbar-track { background: transparent; }

.my-bottles-empty {
    text-align: center; color: #b8a17c;
    font-size: 14px; padding: 50px 0;
    font-family: 'KaiTi', 'STKaiti', serif;
    letter-spacing: 2px;
}

.bottle-row {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(176, 141, 87, 0.4);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.bottle-row:hover {
    background: #ffffff;
    border-color: #b08d57;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 105, 20, 0.15);
}
.bottle-row.expanded {
    background: #ffffff;
    border-color: #b08d57;
    box-shadow: 0 4px 14px rgba(139, 105, 20, 0.2);
}
.bottle-row.showing-actions {
    background: #ffffff;
    border-color: #b08d57;
    box-shadow: 0 4px 14px rgba(139, 105, 20, 0.2);
}
.bottle-row-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 6px;
}
.bottle-row-title {
    font-weight: bold; color: #4a3b22; font-size: 14px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    flex: 1;
}
.bottle-row-date { color: #8c6b3d; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.bottle-row-preview {
    color: #6b5228; font-size: 13px; line-height: 1.6;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-family: 'KaiTi', 'STKaiti', serif;
}
.bottle-row-detail {
    display: none;
    margin-top: 10px; padding-top: 10px;
    border-top: 1px dashed rgba(176, 141, 87, 0.4);
    color: #2c3e50; font-size: 15px; line-height: 1.9;
    font-family: 'KaiTi', 'STKaiti', serif;
}
.bottle-row.expanded .bottle-row-preview { display: none; }
.bottle-row.expanded .bottle-row-detail { display: block; }

.bottle-detail-content {
    white-space: pre-wrap; word-break: break-word;
    user-select: text; -webkit-user-select: text;
}

/* ============================================================
   行内操作条（点击"⋯ 编辑"文字后出现）
   ============================================================ */
.bottle-row-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}
.bottle-row-edit-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #8c6b3d;
    cursor: pointer;
    border-radius: 12px;
    background: rgba(176, 141, 87, 0.1);
    transition: all 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.5px;
    outline: none;
}
.bottle-row-edit-trigger:hover {
    background: rgba(176, 141, 87, 0.22);
    color: #4a3b22;
}
.bottle-row.showing-actions .bottle-row-edit-trigger {
    background: rgba(176, 141, 87, 0.25);
    color: #4a3b22;
}

.bottle-row-actions {
    display: none;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed rgba(176, 141, 87, 0.45);
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.bottle-row.showing-actions .bottle-row-actions {
    display: flex;
    animation: actionsSlideIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes actionsSlideIn {
    0%   { opacity: 0; transform: translateY(-6px); }
    100% { opacity: 1; transform: translateY(0); }
}

.bottle-row-action-btn {
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    outline: none;
    font-family: 'PingFang SC', sans-serif;
    letter-spacing: 0.5px;
    transition: transform 0.15s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.bottle-row-action-btn:active { transform: scale(0.95); }

.bottle-row-action-btn.edit {
    background: #d4a373;
    color: #fff;
}
.bottle-row-action-btn.edit:hover { background: #c08e5a; }

.bottle-row-action-btn.danger {
    background: #c1121f;
    color: #fff;
}
.bottle-row-action-btn.danger:hover { background: #a00e19; }

.bottle-row-action-btn.cancel {
    background: transparent;
    border: 1.5px solid #b08d57;
    color: #8c6b3d;
}
.bottle-row-action-btn.cancel:hover { background: rgba(176, 141, 87, 0.1); }

/* ============================================================
   回复区
   ============================================================ */
.bottle-replies-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(176, 141, 87, 0.5);
}
.bottle-replies-title {
    font-size: 13px;
    font-weight: bold;
    color: #4a3b22;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.bottle-replies-title .replies-count {
    color: #b08d57;
    font-family: 'PingFang SC', sans-serif;
}
.bottle-replies-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}
.bottle-replies-list::-webkit-scrollbar { width: 5px; }
.bottle-replies-list::-webkit-scrollbar-thumb { background: rgba(176, 141, 87, 0.4); border-radius: 2px; }

.reply-loading, .reply-empty {
    font-size: 12px;
    color: #b8a17c;
    padding: 8px 0;
    text-align: center;
    font-family: 'KaiTi', 'STKaiti', serif;
}

.bottle-reply-item {
    background: rgba(176, 141, 87, 0.08);
    border-left: 3px solid #b08d57;
    border-radius: 4px;
    padding: 8px 12px;
}
.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.reply-name {
    font-size: 12px;
    font-weight: bold;
    color: #8c6b3d;
}
.reply-date {
    font-size: 11px;
    color: #b8a17c;
}
.reply-content {
    font-size: 13px;
    color: #4a3b22;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
    font-family: 'KaiTi', 'STKaiti', serif;
    user-select: text; -webkit-user-select: text;
}

.bottle-reply-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}
.bottle-reply-input {
    flex: 1;
    padding: 7px 12px;
    border: 2px solid rgba(176, 141, 87, 0.4);
    border-radius: 16px;
    background: #fff;
    font-size: 13px;
    color: #4a3b22;
    outline: none;
    font-family: 'PingFang SC', sans-serif;
    user-select: text; -webkit-user-select: text;
    transition: all 0.2s;
}
.bottle-reply-input:focus {
    border-color: #b08d57;
    box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.15);
}
.bottle-reply-send {
    padding: 7px 18px;
    border-radius: 16px;
    border: none;
    background: #b08d57;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    transition: background 0.2s, transform 0.2s;
    font-family: 'PingFang SC', sans-serif;
    flex-shrink: 0;
}
.bottle-reply-send:hover { background: #8c6b3d; transform: translateY(-1px); }
.bottle-reply-send:active { transform: translateY(0); }
.bottle-reply-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   修改漂流瓶弹窗
   ============================================================ */
.edit-bottle-box {
    background: #fdf6e3 !important;
    border: 3px solid #b08d57 !important;
    padding: 22px 24px !important;
    width: 420px !important;
    max-width: 92% !important;
    text-align: left !important;
}
.edit-bottle-title {
    font-size: 17px;
    font-weight: bold;
    color: #4a3b22;
    margin-bottom: 14px;
    letter-spacing: 2px;
    font-family: 'ZCOOL KuaiLe', 'Comic Sans MS', cursive, sans-serif;
}
#editBottleContent {
    width: 100%;
    min-height: 130px;
    padding: 12px 14px;
    background: #fff;
    border: 2px solid rgba(176, 141, 87, 0.5);
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.7;
    color: #2c3e50;
    font-family: 'KaiTi', 'STKaiti', serif;
    outline: none;
    resize: vertical;
    user-select: text; -webkit-user-select: text;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#editBottleContent:focus {
    border-color: #b08d57;
    box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.15);
}
.edit-bottle-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
}
.edit-bottle-count { font-size: 13px; color: #8c6b3d; font-weight: bold; }
.edit-bottle-btns { display: flex; gap: 10px; }
.edit-bottle-btns .confirm-btn,
.edit-bottle-btns .cancel-btn {
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.25s;
}
.edit-bottle-btns .confirm-btn { background: #457b9d; color: #fff; }
.edit-bottle-btns .confirm-btn:hover { background: #1d3557; }
.edit-bottle-btns .cancel-btn { background: transparent; border: 2px solid #457b9d; color: #457b9d; }
.edit-bottle-btns .cancel-btn:hover { background: #e3f2fd; }

/* ============================================================
   地图弹窗
   ============================================================ */
.map-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.map-modal-overlay.show { opacity: 1; visibility: visible; }
.map-box { position: relative; width: 80%; max-width: 700px; height: 60vh; max-height: 600px; background: #fdf6e3; border-radius: 8px; border: 4px solid #b08d57; box-shadow: inset 0 0 50px rgba(139, 105, 20, 0.2), 0 20px 40px rgba(0, 0, 0, 0.4); overflow: hidden; display: flex; flex-direction: column; transform-origin: center center; transform: scaleX(0); opacity: 0; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease; }
.map-modal-overlay.show .map-box { transform: scaleX(1); opacity: 1; }
.map-box.closing { transform: scaleX(0); opacity: 0; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease; }
.map-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; padding: 15px 24px; font-size: 24px; font-weight: bold; color: #4a3b22; letter-spacing: 4px; border-bottom: 2px dashed #b08d57; font-family: 'ZCOOL KuaiLe', 'Comic Sans MS', cursive, sans-serif; text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8); }
.map-title { white-space: nowrap; }
.map-stats { display: flex; flex-direction: column; gap: 3px; font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif; font-size: 0.55em; font-weight: 700; letter-spacing: 0.5px; color: #1d3557; text-align: right; white-space: nowrap; text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 0 6px rgba(255, 255, 255, 0.7); }
.map-stats span { color: #0077b6; }
.map-content { flex: 1; position: relative; background: #fdf6e3; overflow: hidden; }
.map-content svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.map-content svg.panning { cursor: grabbing; }
.map-controls { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 20; }
.map-ctrl-btn { width: 38px; height: 38px; border-radius: 8px; background: rgba(255, 255, 255, 0.92); border: 2px solid #b08d57; color: #4a3b22; font-size: 18px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); padding: 0; line-height: 1; outline: none; }
.map-ctrl-btn:hover { background: #fdf6e3; transform: scale(1.06); }
.map-ctrl-btn:active { transform: scale(0.94); }

/* ============================================================
   通用弹窗（登录提示 / 提示 / 状态）
   ============================================================ */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-box { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); padding: 30px; border-radius: 20px; border: 2px solid rgba(168, 218, 220, 0.8); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); text-align: center; max-width: 90%; width: 320px; transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal-overlay.show .modal-box { transform: scale(1); }
.modal-title { font-size: 18px; font-weight: bold; color: #1d3557; margin-bottom: 15px; letter-spacing: 1px; }
.modal-desc { font-size: 14px; color: #457b9d; margin-bottom: 20px; line-height: 1.5; }
.dialog-btn-group { display: flex; gap: 15px; justify-content: center; }
.dialog-btn { padding: 10px 25px; border-radius: 25px; font-size: 14px; font-weight: bold; cursor: pointer; border: none; transition: all 0.3s; }
.confirm-btn { background: #457b9d; color: white; box-shadow: 0 4px 12px rgba(69, 123, 157, 0.4); }
.confirm-btn:hover { background: #1d3557; transform: translateY(-2px); }
.cancel-btn { background: transparent; border: 2px solid #457b9d; color: #457b9d; }
.cancel-btn:hover { background: #e3f2fd; transform: translateY(-2px); }

/* ============================================================
   移动端适配
   ============================================================ */
@media screen and (max-width: 768px) {
    .map-and-stats { top: 15px; left: 15px; gap: 10px; }
    .map-icon { width: 45px; height: 45px; }
    .stats-container { font-size: 12px; letter-spacing: 0.5px; gap: 2px; }

    .top-bar { top: 15px; right: 15px; gap: 10px; }
    .status-panel { height: 45px; padding: 0 3px; font-size: 11px; }
    .status-item { gap: 4px; margin: 1px 0; }
    .status-label { font-size: 10px; }
    .status-bar { height: 6px; min-width: 44px; }
    .status-value { min-width: 26px; font-size: 11px; }

    .showcase-container { gap: 15px; padding: 0 10px; }
    .arrow-btn { width: 45px; height: 45px; }
    .arrow-btn svg { width: 26px; height: 26px; }
    .icon-stage { width: 140px; height: 180px; }
    .telescope-svg, .bottle-svg { width: 95px; height: 95px; }
    .island-svg { width: 105px; height: 105px; }
    .wave-container { width: 95px; height: 25px; }
    .wave { border-width: 1.5px; }
    .lens-flare { top: 15px; left: 35px; width: 30px; height: 30px; }
    .radial-btn { width: 38px; height: 38px; font-size: 15px; }
    .btn-label { font-size: 10px; top: 115%; }
    .icon-title { font-size: 13px; bottom: -25px; }

    #item-bottle .btn-1 { --x: -65px; --y: -38px; }
    #item-bottle .btn-2 { --x: 0px; --y: -75px; }
    #item-bottle .btn-3 { --x: 65px; --y: -38px; }
    #item-telescope .btn-1 { --x: -38px; --y: -65px; }
    #item-telescope .btn-2 { --x: 38px; --y: -65px; }
    #item-island .btn-1 { --x: -65px; --y: -38px; }
    #item-island .btn-2 { --x: 0px; --y: -75px; }
    #item-island .btn-3 { --x: 65px; --y: -38px; }

    .avatar { width: 40px; height: 40px; }
    .avatar svg { width: 22px; height: 22px; }
    .dropdown-menu { top: 50px; }

    .modal-box { padding: 20px; width: 90%; }
    .status-modal-box { padding: 22px 24px; width: 300px; }
    .status-details { font-size: 14px; gap: 10px; }
    .status-details .detail-row.bar-row .bar-label { min-width: 52px; }

    .map-box { width: 95%; height: 60vh; }
    .map-header { font-size: 18px; padding: 10px 14px; gap: 10px; letter-spacing: 3px; }
    .map-stats { letter-spacing: 0; gap: 2px; }
    .map-ctrl-btn { width: 34px; height: 34px; font-size: 16px; }

    .letter-container { width: 95%; }
    .page-nav-btn { width: 34px; height: 54px; font-size: 30px; }
    .page-nav-btn.prev { left: 2px; }
    .page-nav-btn.next { right: 2px; }
    .bottle-slide { padding: 20px 46px; }
    .letter-modal-overlay.show .letter-container.pick-loading-mode { min-width: 220px; padding: 18px 22px; }

    .bottle-anim { width: 60px; height: 90px; }

    .my-bottles-box { width: 94%; height: 82vh; }
    .my-bottles-header { padding: 12px 16px; }
    .my-bottles-title { font-size: 17px; letter-spacing: 3px; }
    .my-bottles-tab { font-size: 13px; }
    .my-bottles-list { padding: 12px 12px; }
    .bottle-row { padding: 10px 12px; }
    .bottle-row-title { font-size: 13px; }
    .bottle-row-date { font-size: 11px; }
    .bottle-row-preview { font-size: 12px; }
    .bottle-row-detail { font-size: 14px; }

    .bottle-row-edit-trigger { font-size: 11px; padding: 3px 10px; }
    .bottle-row-action-btn { font-size: 12px; padding: 5px 12px; }
    .edit-bottle-box { padding: 18px 18px !important; width: 92% !important; }
    #editBottleContent { min-height: 110px; font-size: 14px; }

    .bottle-reply-input { font-size: 12px; padding: 6px 10px; }
    .bottle-reply-send { font-size: 12px; padding: 6px 14px; }
    .reply-content { font-size: 12px; }
    .bottle-replies-list { max-height: 200px; }
 
    .bottle-total-text {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 10px;   /* 与移动端 .status-label 一致 */
    font-weight: 700;
    color: #1d3557;
    text-shadow: 0 2px 5px rgba(255, 255, 255, 0.9);
    pointer-events: none;
}
}