/* ============================================
   钓鱼世界 · 暗黑海洋风样式
   ============================================ */

/* ===== CSS Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

/* ===== 主题变量 ===== */
:root {
    --bg-deep: #0a1628;
    --bg-panel: #0f2038;
    --bg-card: #16294a;
    --line: rgba(100, 180, 255, 0.18);
    --text: #d8eaff;
    --text-dim: #7fa8cc;
    --gold: #ffcf5c;
    --stamina: #4cd97b;
    --accent: #38b6ff;
    --danger: #ff7b6b;
    --radius: 14px;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(160deg, #06101f 0%, var(--bg-deep) 45%, #0c2237 100%);
    overflow: hidden;
}

/* ===== 游戏容器：三栏布局 ===== */
#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    gap: 18px;
    padding: 18px;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
}

/* ===== 左侧 HUD ===== */
.hud {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.hud-title {
    font-size: 20px;
    letter-spacing: 2px;
    text-align: center;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(56, 182, 255, 0.5);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.hud-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hud-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 182, 255, 0.55);
    box-shadow: 0 6px 18px rgba(56, 182, 255, 0.18);
}

.hud-label {
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.hud-value {
    font-size: 26px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.gold-display .hud-value {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 207, 92, 0.4);
}

.stamina-display .hud-value {
    color: var(--stamina);
    font-size: 20px;
}

.stamina-bar {
    height: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
}

.stamina-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #2bbf5e, var(--stamina));
    box-shadow: 0 0 8px rgba(76, 217, 123, 0.5);
    transition: width 0.4s ease;
}

/* 背包 */
.bag-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.bag-list::-webkit-scrollbar { width: 6px; }
.bag-list::-webkit-scrollbar-thumb { background: rgba(100, 180, 255, 0.25); border-radius: 3px; }

.bag-empty {
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}

.bag-list li:not(.bag-empty) {
    font-size: 13px;
    padding: 6px 10px;
    background: rgba(56, 182, 255, 0.08);
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.bag-list li:not(.bag-empty):hover {
    background: rgba(56, 182, 255, 0.18);
    transform: translateX(4px);
}

/* ===== 中间钓鱼区 ===== */
.fishing-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.water-area {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        radial-gradient(ellipse at 50% 120%, rgba(56, 182, 255, 0.15), transparent 60%),
        linear-gradient(180deg, #0d2440 0%, #081a30 55%, #04101f 100%);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5), 0 8px 30px rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 波浪 */
.wave {
    position: absolute;
    left: -50%;
    width: 200%;
    height: 120px;
    border-radius: 45%;
    background: rgba(56, 182, 255, 0.07);
    animation: wave-drift 9s linear infinite;
}

.wave-1 { bottom: -40px; animation-duration: 9s; }
.wave-2 { bottom: -20px; background: rgba(56, 182, 255, 0.05); animation-duration: 13s; animation-direction: reverse; }

@keyframes wave-drift {
    from { transform: translateX(0) rotate(0deg); }
    to   { transform: translateX(50%) rotate(360deg); }
}

/* 气泡 */
.bubble {
    position: absolute;
    bottom: -30px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(120, 200, 255, 0.18);
    border: 1px solid rgba(150, 215, 255, 0.35);
    animation: bubble-rise 6s ease-in infinite;
}

.b1 { left: 18%; animation-delay: 0s; }
.b2 { left: 46%; width: 9px; height: 9px; animation-delay: 2.2s; }
.b3 { left: 72%; width: 18px; height: 18px; animation-delay: 4s; }

@keyframes bubble-rise {
    0%   { transform: translateY(0); opacity: 0; }
    15%  { opacity: 1; }
    100% { transform: translateY(-115vh) translateX(20px); opacity: 0; }
}

/* 结果区 */
.result-display {
    position: relative;
    z-index: 2;
    max-width: 80%;
    padding: 18px 28px;
    background: rgba(10, 22, 40, 0.72);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
    backdrop-filter: blur(4px);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.result-display:hover {
    transform: scale(1.02);
    border-color: rgba(56, 182, 255, 0.45);
}

.result-text {
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: 1px;
}

/* 抛竿按钮 */
.cast-btn {
    height: 76px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 8px;
    text-indent: 8px;
    color: #fff;
    background: linear-gradient(180deg, #2f9ee0, #1668a8);
    border: 1px solid rgba(120, 200, 255, 0.5);
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(31, 122, 190, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.cast-btn:hover {
    transform: translateY(-3px) scale(1.015);
    filter: brightness(1.12);
    box-shadow: 0 10px 26px rgba(31, 122, 190, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.cast-btn:active {
    transform: translateY(1px) scale(0.99);
    filter: brightness(0.95);
}

/* ===== 右侧商店 ===== */
.shop {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.shop-title {
    font-size: 20px;
    letter-spacing: 2px;
    text-align: center;
    color: var(--gold);
    text-shadow: 0 0 12px rgba(255, 207, 92, 0.4);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}

.shop-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.shop-card:hover {
    transform: translateX(-4px);
    border-color: rgba(255, 207, 92, 0.5);
    box-shadow: 0 4px 14px rgba(255, 207, 92, 0.15);
}

.shop-item-name { font-size: 14px; }
.shop-item-price { font-size: 13px; color: var(--gold); font-variant-numeric: tabular-nums; }

/* 卖鱼按钮 */
.sell-btn {
    margin-top: auto;
    height: 56px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #3a2a00;
    background: linear-gradient(180deg, #ffe08a, #f0b429);
    border: 1px solid rgba(255, 220, 130, 0.6);
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(240, 180, 41, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.sell-btn:hover {
    transform: translateY(-3px) scale(1.015);
    filter: brightness(1.08);
    box-shadow: 0 10px 24px rgba(240, 180, 41, 0.5);
}

.sell-btn:active {
    transform: translateY(1px) scale(0.99);
}

/* ===== 屏幕区块（#screen-xxx 界面切换体系，知识库规格版）===== */
/* 由 JS 切换 .active 类实现界面淡入淡出；默认隐藏，不占交互。
   注意：底部预留全局导航栏空间，导航栏不参与屏幕切换 */
[id^="screen-"] {
    position: absolute;
    inset: 0 0 86px 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    overflow-y: auto;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(56, 182, 255, 0.12), transparent 55%),
        linear-gradient(170deg, rgba(6, 16, 31, 0.96), rgba(10, 22, 40, 0.97));
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px) scale(0.985);
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
}

[id^="screen-"].active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* 屏幕标题：统一的界面头 */
.screen-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--accent);
    text-shadow: 0 0 14px rgba(56, 182, 255, 0.5);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

/* 屏幕内卡片网格（背包八格 / 贮藏室 / 属性等通用容器） */
.screen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.screen-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 92px;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.screen-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 182, 255, 0.55);
    box-shadow: 0 8px 20px rgba(56, 182, 255, 0.18);
}

/* ===== 屏幕按钮：更有诱惑力 ===== */
/* 屏幕内通用按钮（返回/确认/加点/解锁等） */
.screen-btn,
.back-btn {
    height: 52px;
    padding: 0 34px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #fff;
    background: linear-gradient(180deg, #3bb0f2 0%, #1f7ac2 55%, #1668a8 100%);
    border: 1px solid rgba(120, 200, 255, 0.55);
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 22px rgba(31, 122, 190, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.18s ease, filter 0.18s ease;
}

/* 顶部流光扫过：诱惑感的核心 */
.screen-btn::after,
.back-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.screen-btn:hover::after,
.back-btn:hover::after { left: 130%; }

.screen-btn:hover,
.back-btn:hover {
    transform: translateY(-3px) scale(1.03);
    filter: brightness(1.12) saturate(1.1);
    box-shadow: 0 12px 28px rgba(31, 122, 190, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.screen-btn:active,
.back-btn:active {
    transform: translateY(1px) scale(0.98);
    filter: brightness(0.95);
}

.screen-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.8);
    transform: none;
    box-shadow: none;
}

/* 危险/暖色变体（对决、卖鱼、重置等） */
.screen-btn.warm {
    color: #3a2a00;
    background: linear-gradient(180deg, #ffe08a, #f0b429);
    border-color: rgba(255, 220, 130, 0.6);
    box-shadow: 0 8px 22px rgba(240, 180, 41, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.screen-btn.warm:hover { box-shadow: 0 12px 28px rgba(240, 180, 41, 0.55); }

.screen-btn.danger {
    background: linear-gradient(180deg, #ff8a7a, #d44a3a);
    border-color: rgba(255, 140, 120, 0.55);
    box-shadow: 0 8px 22px rgba(212, 74, 58, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 键盘焦点可访问性 */
.cast-btn:focus-visible,
.sell-btn:focus-visible,
.screen-btn:focus-visible,
.back-btn:focus-visible {
    outline: 2px solid rgba(120, 200, 255, 0.8);
    outline-offset: 3px;
}

/* ===== 知识库 ui_dom_map 映射节点 ===== */

/* 主场景层（钓鱼演出唯一可见场景；HUD/导航不参与场景切换） */
.scene {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
}

/* 鱼竿 / 鱼线 / 鱼钩（对决"鱼钩相连"的视觉呈现） */
.fishing-rod {
    position: absolute;
    top: 8%;
    left: 6%;
    width: 6px;
    border-radius: 3px;
    background: linear-gradient(180deg, #8a5a2b, #5c3a18);
    transform-origin: bottom center;
    transform: rotate(-18deg);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fishing-rod.casting { transform: rotate(-52deg); }

.line {
    position: absolute;
    width: 2px;
    background: linear-gradient(180deg, rgba(216, 234, 255, 0.7), rgba(216, 234, 255, 0.15));
    transform-origin: top center;
    transition: height 0.4s ease;
}

.hook {
    position: absolute;
    width: 12px;
    height: 16px;
    border: 2px solid rgba(216, 234, 255, 0.8);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* 事件横幅（chapter_start 等触发器提示） */
.event-banner {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    padding: 10px 22px;
    font-size: 15px;
    letter-spacing: 1px;
    background: rgba(10, 22, 40, 0.85);
    border: 1px solid rgba(255, 207, 92, 0.55);
    border-radius: 10px;
    color: var(--gold);
    backdrop-filter: blur(4px);
    animation: banner-fade 2.6s ease forwards;
}

@keyframes banner-fade {
    0%   { opacity: 0; transform: translate(-50%, -8px); }
    12%  { opacity: 1; transform: translate(-50%, 0); }
    82%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -6px); }
}

/* 五种鱼（单价：小鱼1/中鱼3/大鱼5/变异鱼3.5/巨12，纯概率呈现层） */
.fish {
    position: absolute;
    border-radius: 50% 60% 55% 45%;
    transition: transform 0.6s linear;
}

.fish.small    { width: 22px; height: 14px; background: #6fc3e8; }
.fish.medium   { width: 34px; height: 20px; background: #4aa3d8; }
.fish.large    { width: 48px; height: 28px; background: #2f7fb8; }
.fish.mutated  { width: 36px; height: 22px; background: radial-gradient(circle, #9fe86f, #4faf3c); box-shadow: 0 0 10px rgba(140, 230, 90, 0.55); }
.fish.colossal { width: 84px; height: 46px; background: radial-gradient(circle at 40% 40%, #3a5f8f, #12263f); box-shadow: 0 0 16px rgba(0, 0, 0, 0.6); }

/* 操作按钮层（甩竿/收线/对决/背包） */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.action-buttons button {
    flex: 1;
    max-width: 180px;
    height: 56px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(180deg, #3bb0f2 0%, #1f7ac2 55%, #1668a8 100%);
    border: 1px solid rgba(120, 200, 255, 0.55);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.18s ease;
}

.action-buttons button:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.12);
}

.action-buttons button:disabled {
    /* can_refuse=false 时按钮置灰（低级不可拒绝高级） */
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.8);
}

/* 生命条：仅对决中扣减，归零做消散动画 */
.health-bar {
    height: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #ff6b5b, #ff9b8b);
    box-shadow: 0 0 8px rgba(255, 123, 107, 0.5);
    transition: width 0.4s ease;
}

.health-fill.ko {
    animation: dissipate 0.9s ease forwards;
}

@keyframes dissipate {
    to { opacity: 0; transform: scale(1.6); filter: blur(6px); }
}

/* 等级信息：Player 与 Rod 两套数值体系分开显示 */
.level-info, .rod-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
}

.rod-info .rod-tier {
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

/* 背包弹层：严格八格，一格一物；金币不进格子，只更新 .gold-display */
.backpack-panel {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    padding: 14px;
    background: rgba(15, 32, 56, 0.95);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.backpack-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.backpack-panel .slot {
    width: 72px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--line);
    border-radius: 10px;
}

.backpack-panel .slot.filled {
    border-style: solid;
    border-color: rgba(56, 182, 255, 0.45);
}

/* 剧情对话层（覆盖在场景之上） */
.dialog-layer {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 70;
    width: min(560px, 88%);
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.7;
    background: rgba(6, 16, 31, 0.92);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

.dialog-layer.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ===== 底部导航栏 ===== */
.nav-bar {
    display: flex;
    gap: 12px;
    padding: 12px 18px;
    justify-content: center;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.nav-btn {
    flex: 1;
    max-width: 220px;
    height: 52px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.nav-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 182, 255, 0.55);
    filter: brightness(1.15);
}

.nav-btn:active { transform: translateY(1px); }

.nav-primary {
    height: 64px;
    font-size: 22px;
    letter-spacing: 6px;
    color: #fff;
    background: linear-gradient(180deg, #2f9ee0, #1668a8);
    border-color: rgba(120, 200, 255, 0.5);
}

/* ===== 主菜单 ===== */
.screen-menu {
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.menu-title {
    font-size: 44px;
    letter-spacing: 6px;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(56, 182, 255, 0.5);
}

.menu-subtitle {
    color: var(--text-dim);
    letter-spacing: 3px;
}

.menu-panel {
    display: flex;
    gap: 14px;
    margin-bottom: 10px;
}

/* ===== 背包八格 ===== */
.screen-inventory { padding: 20px; }

.inventory-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 14px;
}

.inventory-slot {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px dashed var(--line);
    border-radius: 10px;
}

.inventory-slot.filled {
    border-style: solid;
    border-color: rgba(56, 182, 255, 0.45);
}

.slot-name { font-size: 16px; }
.slot-price { font-size: 13px; color: var(--gold); }
.slot-empty { color: var(--text-dim); font-size: 14px; }

/* ===== 商店 ===== */
.screen-shop { padding: 20px; max-width: 480px; margin: 0 auto; width: 100%; }
.shop-list { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }

/* ===== 钓鱼界面布局 ===== */
.screen-game {
    flex-direction: row;
    gap: 18px;
    min-height: 0;
}

.screen-game .hud { width: 240px; }
.screen-game .fishing-area { flex: 1; min-width: 0; }

/* ===== 响应式 ===== */
@media (max-width: 980px) {
    #game-container { flex-direction: column; overflow-y: auto; }
    .hud, .shop { width: 100%; flex-direction: row; flex-wrap: wrap; }
    .hud-card, .shop-card { flex: 1 1 40%; }
    .water-area { min-height: 300px; }
}

/* ==== 对齐设计稿补充（2026-11-27 全栈开发） ==== */
/* 背包格：格内标注等级与数量（规格四节） */
.slot-meta { font-size: 13px; color: var(--gold); }

/* 商店：出售与购买两栏（规格十二节） */
.shop-columns { display: flex; gap: 16px; width: 100%; }
.shop-column { flex: 1; min-width: 0; }
.shop-column-title {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 4px;
}
.shop-list { display: flex; flex-direction: column; gap: 8px; }
.shop-note { font-size: 13px; color: var(--text-dim); margin: 4px 0 12px; }
.buy-btn {
    padding: 4px 12px;
    font-size: 13px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #2f6fed, #5a9bff);
    color: #fff;
}
.buy-btn:hover { filter: brightness(1.15); }

/* 钓鱼区鱼竿信息卡 */
.rod-display .hud-value { color: #7fd4ff; }

/* 剧情事件横幅（ui_dom_map：.event-banner） */
.event-banner {
    position: absolute;
    top: 12px; left: 50%;
    transform: translate(-50%, -8px);
    max-width: 86%;
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(20, 30, 50, 0.85);
    border: 1px solid rgba(127, 212, 255, 0.35);
    color: #cfeaff;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    pointer-events: none;
    z-index: 5;
}
.event-banner.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ============================================
   v0.2 视觉重构（2026-11-29 设计匠人）
   调研口径：A Dark Room（克制、暗场 + 单一暖色强调、
   信息只在该出现时出现、靠排版与留白造氛围）
   × Melvor Idle（沉稳暗色面板、稳定的层级秩序、
   tabular 数字、柔和景深）
   原则：做减法。光即导航，暗即留白。
   ============================================ */

/* ---- 主题微调：更深的海夜，暖光作为唯一强调 ---- */
:root {
    --bg-deep: #071120;
    --bg-panel: #0b1a2e;
    --bg-card: #12233d;
    --line: rgba(90, 160, 220, 0.14);
    --text: #d5e6f5;
    --text-dim: #6e94b8;
    --accent: #4fb8e8;
    --lantern: #ffb454;              /* 内部地图暖灯 */
    --glow-accent: rgba(79, 184, 232, 0.35);
    --glow-lantern: rgba(255, 180, 84, 0.4);
}

/* 全局：安静的低频氛围光，替代花哨渐变 */
body {
    background:
        radial-gradient(ellipse 120% 60% at 50% -10%, rgba(30, 70, 110, 0.25), transparent 60%),
        linear-gradient(175deg, #04090f 0%, var(--bg-deep) 40%, #0a1c30 100%);
    letter-spacing: 0.02em;
}

/* ---- 钓鱼界面：沉浸式水域（暗场 + 月光 + 呼吸感） ---- */
.water-area {
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(160, 210, 255, 0.10), transparent 55%),
        radial-gradient(ellipse 90% 70% at 50% 115%, rgba(20, 60, 100, 0.45), transparent 65%),
        linear-gradient(180deg, #0a1e38 0%, #06152a 55%, #030d1a 100%);
    box-shadow:
        inset 0 0 90px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(160, 210, 255, 0.08),
        0 10px 34px rgba(0, 0, 0, 0.5);
}

/* 月光水面碎光：极简的两道涟漪，替代喧闹动效 */
.water-area::before,
.water-area::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 46%;
    height: 2px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(190, 225, 255, 0.35), transparent 70%);
    filter: blur(1px);
    animation: moon-shimmer 7s ease-in-out infinite alternate;
    pointer-events: none;
}
.water-area::before { top: 26%; transform: translateX(-72%); }
.water-area::after  { top: 38%; width: 30%; transform: translateX(-18%); animation-delay: -3.2s; }

@keyframes moon-shimmer {
    from { opacity: 0.25; transform: translateX(-72%) scaleX(0.9); }
    to   { opacity: 0.7;  transform: translateX(-66%) scaleX(1.1); }
}

/* 波浪降调：更透明、更慢，只做背景呼吸 */
.wave { background: rgba(79, 184, 232, 0.045); }
.wave-1 { animation-duration: 14s; }
.wave-2 { background: rgba(79, 184, 232, 0.03); animation-duration: 20s; }

/* 气泡降调：少量、慢速、更含蓄 */
.bubble {
    width: 10px; height: 10px;
    background: rgba(140, 200, 250, 0.10);
    border-color: rgba(160, 215, 255, 0.22);
    animation-duration: 9s;
}

/* 结果文案：A Dark Room 式的克制——去掉卡片框，让文字直接浮在暗场上 */
.result-display {
    background: none;
    border: none;
    backdrop-filter: none;
    box-shadow: none;
    padding: 12px 20px;
}
.result-display:hover { transform: none; border-color: transparent; }
.result-text {
    font-size: 17px;
    color: var(--text);
    text-shadow: 0 0 18px rgba(79, 184, 232, 0.35), 0 2px 8px rgba(0, 0, 0, 0.8);
    transition: opacity 0.4s ease;
}

/* 抛竿按钮：单一主行动点，暖光呼吸引导视线 */
.cast-btn {
    height: 68px;
    letter-spacing: 10px;
    background: linear-gradient(180deg, #3ba4dd, #1d6fae);
    border-color: rgba(150, 210, 255, 0.45);
    animation: cast-breathe 3.4s ease-in-out infinite;
}
@keyframes cast-breathe {
    0%, 100% { box-shadow: 0 6px 20px rgba(31, 110, 175, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
    50%      { box-shadow: 0 8px 30px rgba(31, 130, 205, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
}
.cast-btn:hover { animation: none; }

/* HUD：层级做减法——数字是主角，卡片退为底 */
.hud-card { background: rgba(18, 35, 61, 0.7); box-shadow: none; }
.hud-card:hover { transform: none; border-color: var(--line); box-shadow: none; }
.hud-title { text-shadow: none; opacity: 0.9; }
.gold-display .hud-value { text-shadow: 0 0 14px rgba(255, 207, 92, 0.3); }

/* ---- 内部地图：暗场地图 + 暖灯节点（A Dark Room 灯火语言） ---- */
.screen-map { align-items: center; }

.map-hint {
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 3px;
    text-align: center;
}

.map-canvas {
    position: relative;
    width: min(680px, 100%);
    flex: 1;
    min-height: 340px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        radial-gradient(ellipse 60% 50% at 50% 45%, rgba(255, 180, 84, 0.05), transparent 60%),
        linear-gradient(180deg, #081527 0%, #050e1d 100%);
    box-shadow:
        inset 0 0 80px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(160, 210, 255, 0.06);
    overflow: hidden;
}

/* 环境暖雾：地图中央一点点被灯照亮的空气感 */
.map-ambient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 45% 38% at 50% 52%, rgba(255, 180, 84, 0.07), transparent 70%);
    animation: ambient-flicker 5.5s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes ambient-flicker {
    from { opacity: 0.7; } to { opacity: 1; }
}

/* 小径：两点之间的暗色连线，替代网格 */
.map-path {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(180, 200, 230, 0.12) 20%, rgba(180, 200, 230, 0.12) 80%, transparent);
    pointer-events: none;
}
.map-path-a { top: 33%; left: 20%; width: 60%; }
.map-path-b { top: 66%; left: 20%; width: 60%; }

/* 节点：暗色石台 + 暖灯icon；hover 时灯火变亮，像走近了一盏灯 */
.map-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 108px;
    height: 108px;
    padding: 10px;
    border: 1px solid rgba(180, 200, 230, 0.14);
    border-radius: 16px;
    background: rgba(14, 28, 50, 0.85);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1),
                border-color 0.28s ease, box-shadow 0.28s ease;
}
.map-node:hover:not(.map-locked) {
    transform: translateY(-4px);
    border-color: rgba(255, 180, 84, 0.55);
    box-shadow: 0 10px 30px rgba(255, 150, 60, 0.18), 0 0 24px rgba(255, 180, 84, 0.12);
}

.map-node-icon { font-size: 26px; line-height: 1; filter: saturate(0.8) brightness(0.9); transition: filter 0.28s ease; }
.map-node:hover:not(.map-locked) .map-node-icon { filter: saturate(1) brightness(1.15) drop-shadow(0 0 8px var(--glow-lantern)); }

.map-node-name { font-size: 15px; font-weight: 600; letter-spacing: 2px; }
.map-node-sub  { font-size: 11px; color: var(--text-dim); letter-spacing: 1px; }

/* 未解锁节点：几乎隐入黑暗，只留一个问号（信息只在该出现时出现） */
.map-locked {
    cursor: default;
    opacity: 0.45;
    border-style: dashed;
    background: rgba(10, 20, 36, 0.6);
}
.map-locked .map-node-icon {
    color: var(--text-dim);
    font-size: 28px;
    font-weight: 700;
    filter: none;
}

/* 节点布局（手工排布：两行小径，节奏 2-2-1） */
.map-food    { top: 12%; left: 12%; }
.map-shop    { top: 12%; right: 12%; }
.map-stats   { top: 46%; left: 34%; }
.map-lottery { top: 46%; right: 12%; }
.map-locked  { bottom: 8%; left: 12%; }

/* 地图节点键盘焦点 */
.map-node:focus-visible {
    outline: 2px solid rgba(255, 180, 84, 0.8);
    outline-offset: 3px;
}

/* ---- 响应式：窄屏时地图改为纵向流式 ---- */
@media (max-width: 640px) {
    .map-canvas { min-height: 520px; }
    .map-path { display: none; }
    .map-food, .map-shop, .map-stats, .map-lottery, .map-locked {
        top: auto; right: auto; bottom: auto; left: 50%;
        transform: translateX(-50%);
        position: relative;
        margin: 10px auto;
    }
    .map-node:hover:not(.map-locked) { transform: translateX(-50%) translateY(-4px); }
    .map-canvas { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
}


/* ============================================================
   V0.1.3 交互增强：抛竿反馈动画 + 大本营建筑手感
   ============================================================ */

/* ---------- 抛竿：按钮抖动（拟人化蓄力→甩竿） ---------- */
.cast-btn.is-casting {
    animation: cast-shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    pointer-events: none; /* 动画期间防连点 */
}

@keyframes cast-shake {
    0%   { transform: translateX(0) rotate(0deg); }
    15%  { transform: translateX(-4px) rotate(-1.5deg); }
    30%  { transform: translateX(4px)  rotate(1.5deg); }
    45%  { transform: translateX(-3px) rotate(-1deg) translateY(-4px); }
    60%  { transform: translateX(3px)  rotate(1deg)  translateY(-6px); }
    80%  { transform: translateX(-1px) rotate(0deg)  translateY(1px); }
    100% { transform: translateX(0) rotate(0deg); }
}

/* 抛竿瞬间的落点涟漪（由 JS 在水面内动态插入，动画结束自动移除） */
.ripple-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.ripple {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(140, 215, 255, 0.85);
    background: radial-gradient(circle, rgba(160, 225, 255, 0.28) 0%, transparent 65%);
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0;
    animation: ripple-spread 1.4s ease-out forwards;
}

@keyframes ripple-spread {
    0%   { transform: translate(-50%, -50%) scale(0.2); opacity: 0.9; }
    60%  { opacity: 0.55; }
    100% { transform: translate(-50%, -50%) scale(9);   opacity: 0; }
}

/* 涟漪中心的落水小水花 */
.ripple::after {
    content: '';
    position: absolute;
    inset: 35%;
    border-radius: 50%;
    background: rgba(220, 245, 255, 0.7);
    animation: ripple-splash 0.45s ease-out forwards;
}

@keyframes ripple-splash {
    0%   { transform: scale(0.4); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* ---------- 大本营建筑：hover / 点击手感 ---------- */
.camp-building {
    position: absolute;
    left: 22px;
    bottom: 18px;
    z-index: 3;
    width: 96px;
    padding: 10px 8px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* 屋顶（三角形） */
.camp-roof {
    width: 0;
    height: 0;
    border-left: 34px solid transparent;
    border-right: 34px solid transparent;
    border-bottom: 26px solid #8a5a33;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
    transition: border-bottom-color 0.25s ease, transform 0.25s ease;
}

/* 屋身 */
.camp-body {
    position: relative;
    width: 56px;
    height: 38px;
    background: linear-gradient(180deg, #b07a48, #8a5a33);
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 3px 3px 5px 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* 门 */
.camp-door {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 16px;
    height: 20px;
    transform: translateX(-50%);
    background: #3d2817;
    border-radius: 8px 8px 0 0;
    transition: background 0.25s ease;
}

/* 旗子 */
.camp-flag {
    position: absolute;
    top: -14px;
    left: 6px;
    width: 2px;
    height: 14px;
    background: #d9b96c;
}
.camp-flag::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 0;
    width: 14px;
    height: 9px;
    background: #e2574c;
    clip-path: polygon(0 0, 100% 30%, 0 60%);
    animation: camp-flag-wave 2.4s ease-in-out infinite;
    transform-origin: left center;
}

@keyframes camp-flag-wave {
    0%, 100% { transform: scaleX(1) skewX(0deg); }
    50%      { transform: scaleX(0.85) skewX(-8deg); }
}

/* 名称标签 */
.camp-label {
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(220, 235, 250, 0.75);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

/* hover：整楼轻轻抬起 + 屋顶亮起 + 门口透光 + 标签点亮 */
.camp-building:hover .camp-body {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 200, 110, 0.35);
}
.camp-building:hover .camp-roof {
    border-bottom-color: #a9713f;
    transform: translateY(-3px);
}
.camp-building:hover .camp-door {
    background: radial-gradient(circle at 50% 20%, #ffd98a, #b57a2e);
    box-shadow: 0 0 10px rgba(255, 210, 120, 0.55);
}
.camp-building:hover .camp-label {
    color: #ffd98a;
    text-shadow: 0 0 8px rgba(255, 210, 120, 0.6);
}
.camp-building:focus-visible {
    outline: 2px solid rgba(120, 200, 255, 0.7);
    outline-offset: 4px;
    border-radius: 8px;
}

/* 点击：压缩回弹（像踩了一下门槛） */
.camp-building:active .camp-body,
.camp-building:active .camp-roof {
    transform: translateY(1px) scale(0.96);
    transition-duration: 0.08s;
}

/* 点击后的「开门」弹跳动画（JS 加 .is-open 类） */
.camp-building.is-open .camp-body {
    animation: camp-bounce 0.5s ease;
}
.camp-building.is-open .camp-door {
    background: radial-gradient(circle at 50% 20%, #ffe9ad, #d19135);
    box-shadow: 0 0 14px rgba(255, 220, 140, 0.7);
}

@keyframes camp-bounce {
    0%   { transform: translateY(0) scale(1); }
    30%  { transform: translateY(-7px) scale(1.05); }
    55%  { transform: translateY(1px)  scale(0.97); }
    75%  { transform: translateY(-3px) scale(1.02); }
    100% { transform: translateY(0) scale(1); }
}
