* { box-sizing: border-box; }
body { margin: 0; font-family: 'Malgun Gothic', sans-serif; overflow: hidden; background-color: #001529; }

#game-container {
    width: 100vw; height: 100vh;
    background: url('imgs/bg.jpg') center center / cover no-repeat;
    position: relative; perspective: 1000px;
}

/* ── 개발자 모드 버튼 ────────────────────────────────────────── */
#dev-btn {
    position: fixed; top: 16px; left: 16px; z-index: 999;
    background: rgba(0,0,0,0.5); color: #fff;
    border: 1px solid rgba(255,255,255,0.3); border-radius: 20px;
    padding: 7px 14px; font-size: 12px; font-weight: bold;
    cursor: pointer; backdrop-filter: blur(6px);
    transition: background 0.2s;
}
#dev-btn:hover { background: rgba(255,80,80,0.6); }

/* ── 음악 플레이어 ───────────────────────────────────────────── */
#music-btn {
    position: fixed; top: 96px; left: 16px; z-index: 200;
    background: rgba(0,0,0,0.5); color: #fff;
    border: 1px solid rgba(255,255,255,0.2); border-radius: 20px;
    padding: 7px 14px; font-size: 13px; font-weight: bold;
    cursor: pointer; backdrop-filter: blur(6px);
    display: flex; align-items: center; gap: 6px;
    transition: background 0.2s, border-color 0.2s, max-width 0.3s;
    user-select: none; max-width: 160px; overflow: hidden;
}
#music-btn:hover { background: rgba(255,255,255,0.15); }
#music-btn.playing { border-color: rgba(100,200,255,0.5); color: #7df0ff; }
#music-btn-label {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 120px;
}

#music-panel {
    position: fixed; top: 130px; left: 16px; z-index: 199;
    background: rgba(10, 20, 40, 0.92); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15); border-radius: 16px;
    width: 240px; padding: 12px 0 10px;
    opacity: 0; transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#music-panel.show {
    opacity: 1; transform: translateY(0) scale(1);
    pointer-events: all;
}
.music-panel-header {
    font-size: 11px; font-weight: bold;
    color: rgba(255,255,255,0.4); letter-spacing: 0.5px;
    padding: 2px 14px 8px; border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 8px;
}
#music-track-info {
    padding: 0 14px 6px;
}
#music-track-name {
    font-size: 13px; color: #fff; font-weight: bold;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#music-track-index {
    font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 2px;
}

/* 재생바 */
#music-progress-area {
    padding: 4px 14px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 6px;
}
#music-seek {
    width: 100%; accent-color: #7df0ff; cursor: pointer;
    height: 4px; display: block;
}
#music-time-row {
    display: flex; justify-content: space-between;
    font-size: 11px; color: rgba(255,255,255,0.4);
    margin-top: 4px;
}

#music-controls {
    display: flex; justify-content: center; align-items: center;
    gap: 8px; padding: 0 14px 8px;
}
#music-controls button {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    color: #fff; border-radius: 50%; width: 36px; height: 36px;
    font-size: 14px; cursor: pointer; transition: background 0.15s;
    display: flex; align-items: center; justify-content: center;
}
#music-controls button:hover { background: rgba(255,255,255,0.2); }
#music-play {
    width: 44px !important; height: 44px !important;
    font-size: 18px !important;
    background: rgba(100,200,255,0.15) !important;
    border-color: rgba(100,200,255,0.4) !important;
}
#music-play:hover { background: rgba(100,200,255,0.3) !important; }

#music-modes {
    display: flex; justify-content: center; gap: 6px;
    padding: 0 14px 8px;
}
#music-modes button {
    flex: 1;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.5); border-radius: 20px;
    padding: 5px 0; font-size: 12px; cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-align: center;
}
#music-modes button:hover { background: rgba(255,255,255,0.12); color: #fff; }
#music-modes button.active {
    background: rgba(100,200,255,0.15); border-color: rgba(100,200,255,0.5);
    color: #7df0ff;
}

#music-volume-row {
    display: flex; align-items: center; gap: 8px;
    padding: 2px 14px 6px;
}
#music-volume-row span { font-size: 13px; }
#music-volume {
    flex: 1; accent-color: #7df0ff; cursor: pointer;
}

/* 플레이리스트 */
#music-playlist-toggle {
    width: calc(100% - 28px); margin: 0 14px 0;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5); border-radius: 8px;
    padding: 5px 10px; font-size: 12px; cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left; display: flex; justify-content: space-between; align-items: center;
}
#music-playlist-toggle:hover { background: rgba(255,255,255,0.1); color: #fff; }
#music-playlist {
    max-height: 0; overflow: hidden;
    transition: max-height 0.25s ease;
}
#music-playlist.open { max-height: 200px; overflow-y: auto; }
#music-playlist::-webkit-scrollbar { width: 3px; }
#music-playlist::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.music-playlist-item {
    padding: 7px 14px; font-size: 12px; color: rgba(255,255,255,0.6);
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    transition: background 0.1s, color 0.1s;
}
.music-playlist-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.music-playlist-item.active { color: #7df0ff; }
.music-playlist-item .pl-num { color: rgba(255,255,255,0.25); font-size: 11px; min-width: 16px; }
.music-playlist-item .pl-playing { font-size: 10px; }

/* ── 접속자 현황 버튼 ────────────────────────────────────────── */
#presence-btn {
    position: fixed; top: 56px; left: 16px; z-index: 200;
    background: rgba(0,0,0,0.5); color: #fff;
    border: 1px solid rgba(255,255,255,0.2); border-radius: 20px;
    padding: 7px 14px; font-size: 13px; font-weight: bold;
    cursor: pointer; backdrop-filter: blur(6px);
    display: flex; align-items: center; gap: 7px;
    transition: background 0.2s;
    user-select: none;
}
#presence-btn:hover { background: rgba(255,255,255,0.15); }

.presence-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 6px rgba(46,204,113,0.8);
    animation: presence-blink 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes presence-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ── 접속자 목록 패널 ────────────────────────────────────────── */
#presence-panel {
    position: fixed; top: 90px; left: 16px; z-index: 201;
    background: rgba(10, 20, 40, 0.92); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15); border-radius: 16px;
    width: 200px; max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
    opacity: 0; transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#presence-panel.show {
    opacity: 1; transform: translateY(0) scale(1);
    pointer-events: all;
}
#presence-panel::-webkit-scrollbar { width: 4px; }
#presence-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.presence-panel-header {
    font-size: 11px; font-weight: bold;
    color: rgba(255,255,255,0.4); letter-spacing: 0.5px;
    padding: 2px 14px 8px; border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 4px;
}
.presence-user {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 14px; transition: background 0.15s;
}
.presence-user:hover { background: rgba(255,255,255,0.06); }
.presence-me { background: rgba(30,144,255,0.1); }
.presence-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    object-fit: cover; border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}
.presence-avatar-placeholder {
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
}
.presence-name {
    font-size: 13px; color: rgba(255,255,255,0.85);
    font-weight: bold; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.presence-me-tag {
    font-size: 10px; background: #1e90ff;
    color: white; padding: 1px 6px; border-radius: 10px;
    margin-left: 4px; font-weight: bold;
}
.presence-empty {
    font-size: 12px; color: rgba(255,255,255,0.3);
    text-align: center; padding: 16px 0;
}



/* ── 로그인 필요 안내 ────────────────────────────────────────── */
#login-required-msg {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: rgba(0, 0, 0, 0.82); color: white;
    padding: 18px 36px; border-radius: 50px;
    font-size: 17px; font-weight: bold;
    border: 2px solid rgba(255,255,255,0.25);
    z-index: 600; pointer-events: none;
    opacity: 0; transition: opacity 0.3s, transform 0.3s;
}
#login-required-msg.show {
    opacity: 1; transform: translate(-50%, -50%) scale(1);
}
/* ── 전설/신화 챌린지 ─────────────────────────────────────────── */
#challenge-overlay {
    position: fixed; inset: 0; z-index: 600;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    pointer-events: none;
    opacity: 0; transition: opacity 0.3s;
    user-select: none; -webkit-user-select: none;
}
#challenge-overlay.show {
    opacity: 1; pointer-events: all;
}
#challenge-warning {
    font-size: 30px; font-weight: 900; letter-spacing: 3px;
    color: #fff;
    text-shadow: 0 2px 0 #000, 0 -2px 0 #000, 2px 0 0 #000, -2px 0 0 #000;
    background: rgba(0,0,0,0.6);
    padding: 10px 24px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 28px;
    animation: challenge-pulse 0.6s ease-in-out infinite alternate;
}
@keyframes challenge-pulse {
    from { transform: scale(1);    opacity: 1; }
    to   { transform: scale(1.06); opacity: 0.85; }
}
#challenge-box {
    background: rgba(0,0,0,0.75); backdrop-filter: blur(10px);
    border: 2px solid rgba(255,100,0,0.6); border-radius: 20px;
    padding: 24px 36px; text-align: center; min-width: 260px;
}
#challenge-timer-bar {
    width: 100%; height: 10px; background: rgba(255,255,255,0.1);
    border-radius: 5px; overflow: hidden; margin-bottom: 16px;
}
#challenge-timer-fill {
    height: 100%; width: 100%; border-radius: 5px;
    background: linear-gradient(to right, #ff4400, #ffaa00);
    transition: width 0.1s linear;
}
#challenge-info {
    font-size: 48px; font-weight: 900; line-height: 1;
    margin-bottom: 10px;
}
#challenge-clicks { color: #ffdd44; }
#challenge-goal   { color: rgba(255,255,255,0.5); font-size: 28px; }
#challenge-hint {
    font-size: 14px; color: rgba(255,255,255,0.6); letter-spacing: 1px;
}

#broadcast-banner {
    position: fixed; top: -80px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #2c1b00; font-size: 16px; font-weight: bold;
    padding: 14px 40px; border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 500; white-space: nowrap;
    transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#broadcast-banner.show { top: 20px; }
#broadcast-banner.legendary-banner {
    background: linear-gradient(135deg, #c0392b, #922b21);
    color: #fff;
    box-shadow: 0 4px 24px rgba(192,57,43,0.6), 0 0 40px rgba(192,57,43,0.3);
    animation: legendary-banner-pulse 1.4s ease-in-out infinite;
}
@keyframes legendary-banner-pulse {
    0%, 100% { box-shadow: 0 4px 24px rgba(192,57,43,0.6), 0 0 40px rgba(192,57,43,0.3); }
    50%       { box-shadow: 0 4px 32px rgba(192,57,43,0.9), 0 0 60px rgba(192,57,43,0.5); }
}

/* ── UI 레이어 ───────────────────────────────────────────────── */
#ui-layer {
    position: absolute; top: 20px; right: 20px;
    z-index: 100; display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.ui-btn {
    background: rgba(255,255,255,0.25); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.4); color: white;
    padding: 10px 20px; border-radius: 50px; cursor: pointer;
    font-weight: bold; font-size: 14px; transition: background 0.2s;
}
.ui-btn:hover { background: rgba(255,255,255,0.4); }

/* ── 인증 영역 ───────────────────────────────────────────────── */
#auth-area { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.auth-btn {
    background: rgba(255,255,255,0.9); color: #333;
    border: none; padding: 8px 16px; border-radius: 50px;
    cursor: pointer; font-weight: bold; font-size: 13px;
}
.auth-btn:hover { background: white; }
#user-info { display: none; align-items: center; gap: 8px; background: rgba(0,0,0,0.35); padding: 6px 12px; border-radius: 50px; }
#user-photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid white; }
#user-name  { color: white; font-size: 13px; font-weight: bold; }
#signin-btn { display: block; }

/* ── 안내 텍스트 ─────────────────────────────────────────────── */
#instruction {
    position: absolute; top: 15%; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.6); color: white; padding: 15px 40px;
    border-radius: 50px; font-size: 18px; z-index: 10; pointer-events: none;
}

/* ── 낚시대 ──────────────────────────────────────────────────── */
#fishing-scene {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 10px; height: 100vh; pointer-events: none; z-index: 5; transform-style: preserve-3d;
}
#rod-handle {
    position: absolute; bottom: -15vh; width: 30px; height: 140vh;
    background: linear-gradient(to right, #2c1b18, #5d4037, #2c1b18);
    border-radius: 20px; transform-origin: bottom center;
    transform: rotateX(25deg); transition: transform 0.6s ease-out;
}
#fishing-line { display: none; }
.rod-cast #rod-handle { transform: rotateX(75deg) translateY(10vh); }
.rod-vibrate #rod-handle { animation: rod-shake 0.1s infinite; }
.rod-pull #rod-handle { transform: rotateX(-30deg) translateY(-20vh); }
@keyframes rod-shake {
    0%   { transform: rotateX(75deg) translateY(10vh) rotateY(1.5deg); }
    100% { transform: rotateX(75deg) translateY(10vh) rotateY(-1.5deg); }
}

/* ── 찌 ──────────────────────────────────────────────────────── */
#float {
    position: absolute;
    width: 12px; height: 32px;
    display: none; z-index: 4;
    transform: translateX(-50%);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    background: linear-gradient(180deg,
        #ff3333 0%, #ff3333 52%,
        #ffffff 52%, #ffffff 100%);
    border-radius: 50% 50% 45% 45% / 40% 40% 55% 55%;
    border: 1px solid rgba(0,0,0,0.15);
    box-shadow:
        inset 2px 3px 5px rgba(255,255,255,0.35),
        inset -1px -2px 4px rgba(0,0,0,0.2);
}

.bite { animation: bobbing 0.25s ease-in-out infinite; }
@keyframes bobbing {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(10px); }
}

/* ── 결과 팝업 ───────────────────────────────────────────────── */
#result-popup {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8);
    background: white; padding: 30px; border-radius: 30px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4); z-index: 1100;
    display: none; width: 320px; opacity: 0;
    transition: 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#result-popup.show { display: block; transform: translate(-50%, -50%) scale(1); opacity: 1; }

/* ── 에픽 팝업 ────────────────────────────────────────────────── */
#result-popup.epic-popup {
    background: linear-gradient(160deg, #1a0a2e, #2d1060);
    border: 2px solid #9b59b6;
    box-shadow:
        0 0 0 4px rgba(155,89,182,0.2),
        0 0 40px rgba(155,89,182,0.5),
        0 20px 60px rgba(0,0,0,0.6);
    animation: epic-glow 2s ease-in-out infinite;
}
#result-popup.epic-popup h2       { color: #d7a6ff; }
#result-popup.epic-popup #fish-pop-desc { color: rgba(255,255,255,0.7); }
#result-popup.epic-popup .fish-image-container {
    background: rgba(155,89,182,0.15);
    border: 1px solid rgba(155,89,182,0.4);
}
#result-popup.epic-popup #fish-rarity-badge {
    background: linear-gradient(135deg, #9b59b6, #6c3483);
    box-shadow: 0 0 14px rgba(155,89,182,0.7);
}
#result-popup.epic-popup .main-btn {
    background: linear-gradient(135deg, #9b59b6, #6c3483);
    color: white; font-weight: 900;
    box-shadow: 0 4px 14px rgba(155,89,182,0.5);
}
#result-popup.epic-popup .mj-reward-amount { color: #d7a6ff; }

@keyframes epic-glow {
    0%, 100% { box-shadow: 0 0 0 4px rgba(155,89,182,0.2), 0 0 40px rgba(155,89,182,0.5), 0 20px 60px rgba(0,0,0,0.6); }
    50%       { box-shadow: 0 0 0 7px rgba(155,89,182,0.3), 0 0 65px rgba(155,89,182,0.75), 0 20px 60px rgba(0,0,0,0.6); }
}

/* ── 전설 팝업 ────────────────────────────────────────────────── */
#result-popup.legendary-popup {
    background: linear-gradient(160deg, #1a0800, #3d1a00);
    border: 2px solid #f1c40f;
    box-shadow:
        0 0 0 4px rgba(241,196,15,0.2),
        0 0 50px rgba(241,196,15,0.55),
        0 0 100px rgba(241,196,15,0.2),
        0 20px 60px rgba(0,0,0,0.7);
    animation: legendary-pulse 1.6s ease-in-out infinite;
}
#result-popup.legendary-popup h2       { color: #f1c40f; text-shadow: 0 0 12px rgba(241,196,15,0.6); }
#result-popup.legendary-popup #fish-pop-desc { color: rgba(255,255,255,0.75); }
#result-popup.legendary-popup .fish-image-container {
    background: rgba(241,196,15,0.1);
    border: 1px solid rgba(241,196,15,0.35);
    box-shadow: inset 0 0 20px rgba(241,196,15,0.1);
}
#result-popup.legendary-popup #fish-rarity-badge {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #1a0800;
    box-shadow: 0 0 18px rgba(241,196,15,0.8);
}
#result-popup.legendary-popup .main-btn {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #1a0800; font-weight: 900;
    box-shadow: 0 4px 16px rgba(241,196,15,0.5);
}
#result-popup.legendary-popup .mj-reward-amount { color: #f1c40f; }

@keyframes legendary-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(241,196,15,0.2), 0 0 50px rgba(241,196,15,0.55), 0 0 100px rgba(241,196,15,0.2), 0 20px 60px rgba(0,0,0,0.7); }
    50%       { box-shadow: 0 0 0 8px rgba(241,196,15,0.3), 0 0 80px rgba(241,196,15,0.8),  0 0 140px rgba(241,196,15,0.3), 0 20px 60px rgba(0,0,0,0.7); }
}

.fish-image-container {
    width: 100%; height: 150px; background: #f0f7ff;
    border-radius: 20px; display: flex; justify-content: center;
    align-items: center; margin-bottom: 15px;
    transition: background 0.3s, border 0.3s;
}
#fish-image { max-width: 80%; max-height: 80%; object-fit: contain; }
.main-btn {
    background: #1e90ff; color: white; border: none;
    padding: 12px; border-radius: 10px; width: 100%;
    cursor: pointer; font-weight: bold;
    transition: background 0.2s, box-shadow 0.2s;
}

/* ── 도감 팝업 ───────────────────────────────────────────────── */
#book-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 300;
    display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: 0.3s;
}
#book-popup.show { visibility: visible; opacity: 1; }
.book-content {
    background: #f4f7f9; width: 90%; max-width: 1000px; height: 85vh;
    border-radius: 30px; position: relative;
    display: flex; flex-direction: column; overflow: hidden;
}
.book-header { padding: 25px 65px 25px 25px; background: white; border-bottom: 1px solid #eee; text-align: center; }
.filter-bar { display: flex; justify-content: center; gap: 8px; margin-top: 15px; }
.filter-btn {
    padding: 8px 16px; border-radius: 20px; border: 1px solid #ddd;
    background: white; cursor: pointer; font-size: 13px; font-weight: bold;
}
.filter-btn.active { background: #1e90ff; color: white; border-color: #1e90ff; }
#book-list {
    flex: 1; overflow-y: auto; display: grid; padding: 30px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px;
}
.book-item {
    background: white; border-radius: 25px; padding: 20px;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.book-item img { width: 100%; height: 120px; object-fit: contain; background: #f9f9f9; border-radius: 15px; margin-bottom: 0; display: block; }

.fish-img-wrap {
    width: 100%; position: relative; margin-bottom: 15px;
}
.fish-catch-count {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(0,0,0,0.62); color: #fff;
    font-size: 12px; font-weight: bold;
    padding: 3px 9px; border-radius: 20px;
    backdrop-filter: blur(4px);
    letter-spacing: 0.3px; pointer-events: none;
}
.locked-img {
    width: 100%; height: 120px; background: #1a1a1a; border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; color: #333; margin-bottom: 15px;
}
.fish-rarity-tag {
    font-size: 11px; font-weight: bold; padding: 4px 12px;
    border-radius: 50px; color: white; margin-bottom: 10px; text-transform: uppercase;
}
.book-item .fish-name { font-weight: bold; font-size: 18px; margin-bottom: 8px; color: #333; }
.book-item .fish-desc { font-size: 13px; color: #666; line-height: 1.5; margin: 0; }
.book-item.locked .fish-name { color: #bbb !important; }
.book-item.locked .fish-desc { color: #ccc !important; }
.book-item.locked .fish-rarity-tag { background: #ddd !important; color: #ddd !important; }
.close-book { position: absolute; top: 20px; right: 25px; font-size: 35px; border: none; background: none; cursor: pointer; color: #bbb; }

.auth-btn.small {
    padding: 5px 10px; font-size: 12px;
}

/* ── 채팅 알림 토스트 ────────────────────────────────────────── */
#chat-toast {
    position: fixed; bottom: 90px; left: 24px;
    max-width: 280px;
    background: rgba(10, 20, 40, 0.88); backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.9); font-size: 13px; line-height: 1.4;
    padding: 10px 16px; border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    z-index: 390; pointer-events: none;
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#chat-toast.show { opacity: 1; transform: translateY(0); }
.chat-toast-name { font-weight: bold; color: #7ec8ff; margin-right: 4px; }

/* ── 공유 토스트 ─────────────────────────────────────────────── */
#share-toast {
    position: fixed; bottom: 40px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20, 20, 20, 0.92); color: white;
    padding: 14px 28px; border-radius: 50px;
    font-size: 15px; font-weight: bold;
    z-index: 700; pointer-events: none;
    opacity: 0; transition: opacity 0.3s, transform 0.3s;
    white-space: nowrap;
}
#share-toast.show {
    opacity: 1; transform: translateX(-50%) translateY(0);
}

/* ── 닉네임 팝업 ─────────────────────────────────────────────── */
#nickname-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 600;
    display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: 0.25s;
}
#nickname-popup.show { visibility: visible; opacity: 1; }

.nickname-content {
    background: white; border-radius: 20px;
    padding: 32px 28px; width: 320px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.nickname-content h3 { margin: 0 0 8px; font-size: 20px; color: #333; }
.nickname-desc { font-size: 13px; color: #888; margin: 0 0 20px; }

#nickname-input {
    width: 100%; padding: 12px 16px; border: 2px solid #e0e0e0;
    border-radius: 12px; font-size: 16px; outline: none;
    box-sizing: border-box; transition: border-color 0.2s;
    text-align: center;
}
#nickname-input:focus { border-color: #1e90ff; }

.nickname-btns {
    display: flex; gap: 10px; margin-top: 16px;
}
.nickname-cancel {
    flex: 1; padding: 12px; border-radius: 12px;
    border: 2px solid #e0e0e0; background: white;
    color: #666; font-size: 15px; cursor: pointer; font-weight: bold;
}
.nickname-cancel:hover { background: #f5f5f5; }
.nickname-save {
    flex: 1; padding: 12px; border-radius: 12px;
    border: none; background: #1e90ff;
    color: white; font-size: 15px; cursor: pointer; font-weight: bold;
}
.nickname-save:hover { background: #1a7ee0; }

/* ── 명예의 전당 팝업 ────────────────────────────────────────── */
#hof-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 300;
    display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: 0.3s;
}
#hof-popup.show { visibility: visible; opacity: 1; }

.hof-content {
    background: linear-gradient(160deg, #0a1628, #1a2a4a);
    width: 90%; max-width: 860px;
    max-height: 88vh; overflow-y: auto;
    border-radius: 30px; position: relative;
    padding: 40px 40px 50px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 60px rgba(241,196,15,0.15);
}
.hof-content::-webkit-scrollbar { width: 5px; }
.hof-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.hof-header { text-align: center; margin-bottom: 36px; }
.hof-header h2 { color: #f1c40f; font-size: 28px; margin: 0 0 6px; }
.hof-subtitle { color: rgba(255,255,255,0.4); font-size: 14px; margin: 0; }

.hof-cards { display: none; } /* 구버전 — 미사용 */

/* ── 최근 전설 카드 (1명) ────────────────────────────────────── */
.hof-legend-card {
    background: rgba(241,196,15,0.06);
    border: 1px solid rgba(241,196,15,0.35);
    border-radius: 16px; overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 0 20px rgba(241,196,15,0.08);
}
.hof-legend-card-title {
    font-size: 14px; font-weight: bold; color: #f1c40f;
    padding: 14px 20px 6px;
    background: rgba(241,196,15,0.05);
    letter-spacing: 0.3px;
}
.hof-legend-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
}
.hof-legend-left  { display: none; } /* 구버전 */
.hof-legend-right { display: none; } /* 구버전 */

/* ── 순위 섹션 ───────────────────────────────────────────────── */
.hof-rank-sections {
    display: flex; flex-direction: column; gap: 24px;
}
.hof-rank-section {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; overflow: hidden;
}
.hof-rank-title {
    font-size: 14px; font-weight: bold; color: rgba(255,255,255,0.7);
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    letter-spacing: 0.3px;
}
.hof-rank-title:has(+ .hof-rank-desc) {
    padding-bottom: 6px;
    border-bottom: none;
}
.hof-rank-desc {
    font-size: 11px; color: rgba(255,255,255,0.38);
    padding: 0 20px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}
.hof-legend-card-desc {
    font-size: 11px; color: rgba(241,196,15,0.5);
    padding: 0 20px 10px;
    border-bottom: 1px solid rgba(241,196,15,0.15);
    background: rgba(241,196,15,0.05);
}
.hof-rank-list {
    max-height: 230px; overflow-y: auto;
    padding: 8px 0;
}
.hof-rank-list::-webkit-scrollbar { width: 4px; }
.hof-rank-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.hof-rank-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px; transition: background 0.15s;
}
.hof-rank-row:hover { background: rgba(255,255,255,0.05); }
.hof-rank-me { background: rgba(30,144,255,0.1); }
.hof-rank-medal { font-size: 18px; width: 28px; flex-shrink: 0; text-align: center; }
.hof-rank-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    object-fit: cover; border: 1px solid rgba(255,255,255,0.2); flex-shrink: 0;
}
.hof-rank-avatar-placeholder {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.hof-rank-name {
    flex: 1; font-size: 14px; font-weight: bold; color: white;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hof-rank-me-tag {
    font-size: 10px; background: #1e90ff; color: white;
    padding: 1px 6px; border-radius: 8px; margin-left: 5px;
    font-weight: bold; vertical-align: middle;
}
.hof-rank-value {
    font-size: 13px; color: #f1c40f; font-weight: bold;
    flex-shrink: 0; white-space: nowrap;
}
.hof-rank-empty {
    text-align: center; color: rgba(255,255,255,0.3);
    font-size: 13px; padding: 20px;
}

.hof-card-icon { font-size: 32px; line-height: 1; }
.hof-card-title { font-size: 15px; font-weight: bold; color: white; margin-top: 4px; }
.hof-card-desc { font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.4; }
.hof-avatar {
    width: 60px; height: 60px; border-radius: 50%;
    object-fit: cover; border: 2px solid rgba(255,255,255,0.25);
    margin: 8px 0 4px; display: none;
}
.hof-player-name { font-size: 18px; font-weight: bold; color: white; }
.hof-stat-row { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; }
.hof-count { font-size: 32px; font-weight: bold; color: #f1c40f; line-height: 1; }
.hof-unit  { font-size: 14px; color: rgba(255,255,255,0.5); }
.hof-fish-name { font-size: 20px; font-weight: bold; color: #f1c40f; }


/* ── 도감 섹션 그룹 (전체 보기) ─────────────────────────────── */
#book-list.book-list-sections {
    display: block;
    padding: 24px 30px;
}

.book-section {
    margin-bottom: 32px;
}

.book-section-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.book-section-badge {
    font-size: 13px; font-weight: bold;
    padding: 5px 16px; border-radius: 50px;
    color: white; letter-spacing: 0.5px;
}

.book-section-count {
    font-size: 13px; color: #aaa; font-weight: bold;
    margin-left: auto;
}

.book-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}


.rarity-일반    { background: #bdc3c7; }
.rarity-고급    { background: #2eb2cc; }
.rarity-희귀    { background: #25cf94; }
.rarity-에픽    { background: #9b59b6; }
.rarity-전설    { background: #ec0c0c; box-shadow: 0 0 10px rgba(255, 5, 5, 0.5); }

/* ── 무지개 닉네임 ───────────────────────────────────────────── */
.rainbow-name {
    color: #ff4444;
    font-weight: bold;
    display: inline-block;
    animation: rainbow-hue 3.5s linear infinite;
}
@keyframes rainbow-hue {
    from { filter: hue-rotate(0deg); }
    to   { filter: hue-rotate(360deg); }
}

/* ── 채팅창 ──────────────────────────────────────────────────── */
#chat-panel {
    position: fixed; bottom: 20px; left: 20px;
    width: 320px; height: 420px;
    background: rgba(10, 20, 40, 0.92); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15); border-radius: 20px;
    display: flex; flex-direction: column; z-index: 400;
    transform: translateY(120%); opacity: 0;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s;
    pointer-events: none;
}
#chat-panel.open { transform: translateY(0); opacity: 1; pointer-events: all; }

#chat-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white; font-weight: bold; font-size: 14px;
}
#chat-close-btn {
    background: none; border: none; color: rgba(255,255,255,0.5);
    font-size: 22px; cursor: pointer; line-height: 1;
}
#chat-close-btn:hover { color: white; }

#chat-messages {
    flex: 1; overflow-y: auto; padding: 12px;
    display: flex; flex-direction: column; gap: 10px;
}
#chat-messages::-webkit-scrollbar { width: 4px; }
#chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.chat-msg {
    display: flex; align-items: flex-end; gap: 8px;
}
.chat-msg.mine { flex-direction: row-reverse; }

.chat-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.chat-bubble {
    max-width: 70%; display: flex; flex-direction: column; gap: 3px;
}
.chat-name { font-size: 11px; color: rgba(255,255,255,0.5); padding-left: 4px; }
.chat-text {
    background: rgba(255,255,255,0.15); color: white;
    padding: 8px 12px; border-radius: 14px 14px 14px 4px;
    font-size: 13px; line-height: 1.4; word-break: break-all;
}
.chat-msg.mine .chat-text {
    background: #1e90ff; border-radius: 14px 14px 4px 14px;
}
.chat-time { font-size: 10px; color: rgba(255,255,255,0.3); padding: 0 4px; align-self: flex-end; }

#chat-input-area {
    display: flex; gap: 8px; padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
#chat-input {
    flex: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px; padding: 8px 14px; color: white; font-size: 13px; outline: none;
}
#chat-input::placeholder { color: rgba(255,255,255,0.35); }
#chat-input:focus { border-color: rgba(255,255,255,0.4); }
#chat-input-area button {
    background: #1e90ff; color: white; border: none;
    border-radius: 20px; padding: 8px 14px; cursor: pointer;
    font-size: 13px; font-weight: bold; white-space: nowrap;
}
#chat-input-area button:hover { background: #1a7ee0; }

/* ── 도전과제 팝업 ────────────────────────────────────────────── */
#ach-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 300;
    display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: 0.3s;
}
#ach-popup.show { visibility: visible; opacity: 1; }

.ach-content {
    background: #f4f7f9; width: 90%; max-width: 680px; height: 85vh;
    border-radius: 30px; position: relative;
    display: flex; flex-direction: column; overflow: hidden;
}
.ach-header {
    padding: 25px; background: white; border-bottom: 1px solid #eee; text-align: center;
}
.ach-header h2 { margin: 0 0 4px; font-size: 22px; }
.ach-subtitle { font-size: 13px; color: #aaa; margin: 0; }

#ach-list {
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 14px;
}

.ach-card {
    background: white; border-radius: 18px; padding: 18px 20px;
    display: flex; align-items: center; gap: 16px;
    border: 2px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.15s;
}
.ach-card:hover { transform: translateY(-2px); }
.ach-unlocked { border-color: #d4edda; background: #f8fff9; }
.ach-locked   { opacity: 0.65; }

.ach-icon { font-size: 32px; line-height: 1; flex-shrink: 0; }

.ach-card-body { flex: 1; min-width: 0; }
.ach-card-name {
    font-size: 16px; font-weight: bold; color: #222;
    margin-bottom: 4px; display: flex; align-items: center; gap: 8px;
}
.ach-title-preview {
    font-size: 12px; font-weight: bold;
    background: rgba(0,0,0,0.05); padding: 2px 8px; border-radius: 20px;
}
.ach-card-desc { font-size: 13px; color: #888; margin-bottom: 8px; }

.ach-progress-wrap {
    height: 6px; background: #eee; border-radius: 3px; overflow: hidden; margin-bottom: 4px;
}
.ach-progress-bar {
    height: 100%; background: linear-gradient(90deg, #1e90ff, #00c6ff);
    border-radius: 3px; transition: width 0.4s ease;
}
.ach-progress-text { font-size: 11px; color: #aaa; font-weight: bold; }

.ach-card-right { flex-shrink: 0; }

.ach-title-btn {
    background: #1e90ff; color: white; border: none;
    padding: 8px 16px; border-radius: 20px;
    font-size: 13px; font-weight: bold; cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.ach-title-btn:hover { background: #1a7ee0; }
.ach-title-btn.active {
    background: #2ecc71; cursor: default;
}
.ach-locked-tag { font-size: 20px; }

/* ── 보상 뱃지 ───────────────────────────────────────────────── */
.ach-reward-badge {
    display: inline-block; font-size: 11px; font-weight: bold;
    padding: 2px 8px; border-radius: 10px; margin-left: 6px;
    vertical-align: middle;
}
.ach-reward-badge.badge-title {
    background: rgba(241,196,15,0.15); color: #c9a800;
    border: 1px solid rgba(241,196,15,0.4);
}
.ach-reward-badge.badge-item {
    background: rgba(46,204,113,0.15); color: #27ae60;
    border: 1px solid rgba(46,204,113,0.4);
}

/* ── 패치노트 팝업 ───────────────────────────────────────────── */
#patch-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 300;
    display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: 0.3s;
}
#patch-popup.show { visibility: visible; opacity: 1; }

.patch-content {
    background: #f4f7f9; width: 90%; max-width: 560px; max-height: 80vh;
    border-radius: 30px; position: relative;
    display: flex; flex-direction: column; overflow: hidden;
}
.patch-header {
    padding: 25px; background: white; border-bottom: 1px solid #eee; text-align: center;
}
.patch-header h2 { margin: 0; font-size: 22px; }
.patch-body {
    flex: 1; overflow-y: auto; padding: 20px 28px;
}
.patch-version {
    font-size: 12px; font-weight: bold; color: #aaa;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 10px;
}
.patch-list {
    margin: 0 0 8px; padding-left: 20px;
    display: flex; flex-direction: column; gap: 8px;
}
.patch-list li {
    font-size: 14px; color: #444; line-height: 1.5;
}

/* ── 도전과제 달성 토스트 ─────────────────────────────────────── */
#ach-toast {
    position: fixed; bottom: 90px; right: 24px;
    background: rgba(10, 20, 40, 0.95); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15); border-radius: 16px;
    padding: 14px 18px; z-index: 800;
    display: flex; align-items: center; gap: 12px;
    max-width: 280px;
    opacity: 0; transform: translateX(30px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}
#ach-toast.show { opacity: 1; transform: translateX(0); }
.ach-toast-icon { font-size: 28px; flex-shrink: 0; }
.ach-toast-body { display: flex; flex-direction: column; gap: 2px; }
.ach-toast-title { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
.ach-toast-name  { font-size: 15px; color: white; font-weight: bold; }
.ach-toast-reward { font-size: 13px; font-weight: bold; }

/* ── 채팅 칭호 태그 ──────────────────────────────────────────── */
.chat-title-tag { font-weight: bold; font-size: 11px; margin-right: 2px; }

/* ── 보물상자 버튼 ───────────────────────────────────────────── */
#treasure-btn {
    position: fixed; bottom: 20px; left: 20px; z-index: 200;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(10px);
    border: 2px solid rgba(255,215,0,0.35); border-radius: 50%;
    width: 52px; height: 52px; font-size: 26px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.15s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    user-select: none;
}
#treasure-btn:hover { background: rgba(255,215,0,0.18); transform: scale(1.1); }
#treasure-btn.ready {
    border-color: rgba(255,215,0,0.85);
    animation: treasure-btn-glow 2s ease-in-out infinite;
}
@keyframes treasure-btn-glow {
    0%,100% { box-shadow: 0 0 14px rgba(255,215,0,0.5), 0 0 28px rgba(255,215,0,0.2); }
    50%     { box-shadow: 0 0 26px rgba(255,215,0,0.9), 0 0 52px rgba(255,215,0,0.4); }
}

/* ── 보물상자 팝업 ───────────────────────────────────────────── */
#treasure-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 400;
    display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: 0.3s;
}
#treasure-popup.show { visibility: visible; opacity: 1; }
.treasure-content {
    background: linear-gradient(145deg, #1c1100, #2b1a00);
    border: 1px solid rgba(255,215,0,0.25); border-radius: 28px;
    padding: 38px 40px 32px; width: 90%; max-width: 360px;
    text-align: center; position: relative;
    box-shadow: 0 0 60px rgba(255,180,0,0.08), 0 20px 60px rgba(0,0,0,0.7);
}
.treasure-title {
    font-size: 19px; font-weight: bold; color: #f1c40f;
    margin-bottom: 5px; letter-spacing: 0.5px;
}
.treasure-subtitle {
    font-size: 12px; color: rgba(255,255,255,0.38);
    margin-bottom: 26px;
}
/* ── CSS 보물상자 아이콘 ─────────────────────────────────────── */
.tchest {
    width: 100px; height: 78px;
    margin: 0 auto 22px;
    position: relative;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.55));
    perspective: 300px;
}
/* 뚜껑 */
.tchest-lid {
    position: absolute; top: 0; left: 0;
    width: 100px; height: 38px;
    background: linear-gradient(160deg, #c0722a 0%, #8b4513 55%, #6b3310 100%);
    border: 2.5px solid #d4a017;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    transform-origin: center bottom;
    transition: transform 0.5s cubic-bezier(0.175,0.885,0.32,1.275);
    z-index: 2;
    overflow: hidden;
}
.tchest-lid::before {
    content: "";
    position: absolute; top: 10px; left: 10px; right: 10px;
    height: 2px; border-radius: 1px;
    background: rgba(255,255,255,0.12);
}
.tchest-lid::after {
    content: "";
    position: absolute; top: 18px; left: 10px; right: 10px;
    height: 2px; border-radius: 1px;
    background: rgba(255,255,255,0.08);
}
.tchest-lid-band {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, #b8860b, #f1c40f 40%, #f1c40f 60%, #b8860b);
}
/* 중간 밴드 */
.tchest-band {
    position: absolute; top: 36px; left: 0;
    width: 100px; height: 8px;
    background: linear-gradient(90deg, #9a7209, #f1c40f 30%, #ffe066 50%, #f1c40f 70%, #9a7209);
    z-index: 3;
}
/* 몸통 */
.tchest-body {
    position: absolute; bottom: 0; left: 0;
    width: 100px; height: 42px;
    background: linear-gradient(160deg, #9b4515 0%, #7a3410 55%, #5a2608 100%);
    border: 2.5px solid #d4a017;
    border-top: none;
    border-radius: 0 0 10px 10px;
    display: flex; align-items: center; justify-content: center;
    gap: 0;
}
/* 자물쇠 */
.tchest-lock {
    width: 22px; height: 22px;
    background: radial-gradient(circle at 35% 35%, #ffe066, #d4a017 60%, #9a7209);
    border-radius: 50%;
    border: 2px solid #7a5800;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.tchest-keyhole {
    width: 6px; height: 9px;
    background: rgba(0,0,0,0.55);
    border-radius: 3px 3px 2px 2px;
    position: relative; top: 2px;
    clip-path: polygon(50% 0%, 100% 40%, 75% 100%, 25% 100%, 0% 40%);
}
/* 손잡이 */
.tchest-handle {
    width: 14px; height: 7px;
    background: linear-gradient(180deg, #d4a017, #9a7209);
    border-radius: 4px;
    position: absolute; top: 50%; transform: translateY(-50%);
    border: 1.5px solid #7a5800;
}
.tchest-handle--left  { left: 10px; }
.tchest-handle--right { right: 10px; }

/* 상태별 스타일 */
.tchest.ready .tchest-lid,
.tchest.ready .tchest-band,
.tchest.ready .tchest-body {
    filter: brightness(1.15);
}
.tchest.locked .tchest-lid,
.tchest.locked .tchest-band,
.tchest.locked .tchest-body {
    filter: brightness(0.5) saturate(0.4);
}
/* 흔들기 */
.tchest.shake { animation: tchest-shake 0.65s ease; }
@keyframes tchest-shake {
    0%,100% { transform: rotate(0deg) scale(1); }
    15%     { transform: rotate(-8deg) scale(1.06); }
    35%     { transform: rotate(8deg) scale(1.11); }
    55%     { transform: rotate(-5deg) scale(1.08); }
    75%     { transform: rotate(5deg) scale(1.04); }
}
/* 열기: 뚜껑이 뒤로 젖혀짐 */
.tchest.open .tchest-lid {
    transform: rotateX(-130deg);
}

/* ── 보물상자 상태 텍스트 ────────────────────────────────────── */
.treasure-status {
    font-size: 14px; color: rgba(255,255,255,0.65);
    margin-bottom: 22px; min-height: 52px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 6px;
}
.treasure-cooldown {
    font-size: 28px; font-weight: bold; color: #e67e22;
    font-variant-numeric: tabular-nums; letter-spacing: 1px;
}
#treasure-open-btn {
    width: 100%; padding: 13px;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    border: none; border-radius: 50px;
    font-size: 15px; font-weight: bold; color: #1a0a00;
    cursor: pointer; transition: opacity 0.2s, transform 0.1s;
}
#treasure-open-btn:hover:not(:disabled) { opacity: 0.88; transform: scale(1.02); }
#treasure-open-btn:disabled {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.25); cursor: default;
}

/* ── 보물상자 보상 결과 팝업 ─────────────────────────────────── */
#treasure-result-popup {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1200;
    display: flex; align-items: center; justify-content: center;
    visibility: hidden; opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}
#treasure-result-popup.show { visibility: visible; opacity: 1; }
.treasure-result-card {
    background: linear-gradient(145deg, #1c1100, #2b1a00);
    border: 2px solid rgba(255,215,0,0.4);
    border-radius: 28px; padding: 40px 44px 32px;
    text-align: center;
    box-shadow: 0 0 80px rgba(255,180,0,0.15), 0 20px 60px rgba(0,0,0,0.7);
    animation: result-card-in 0.45s cubic-bezier(0.175,0.885,0.32,1.275);
}
#treasure-result-popup.tier-고급 .treasure-result-card { border-color: rgba(46,178,204,0.6); }
#treasure-result-popup.tier-희귀 .treasure-result-card { border-color: rgba(37,207,148,0.6); }
#treasure-result-popup.tier-에픽 .treasure-result-card { border-color: rgba(155,89,182,0.7); box-shadow: 0 0 80px rgba(155,89,182,0.2), 0 20px 60px rgba(0,0,0,0.7); }
#treasure-result-popup.tier-전설 .treasure-result-card { border-color: rgba(236,12,12,0.7);  box-shadow: 0 0 100px rgba(236,12,12,0.2), 0 20px 60px rgba(0,0,0,0.7); }
@keyframes result-card-in {
    0%   { transform: scale(0.7) translateY(20px); opacity: 0; }
    100% { transform: scale(1)   translateY(0);    opacity: 1; }
}
.treasure-result-icon {
    font-size: 72px; line-height: 1; display: block;
    margin-bottom: 10px;
    animation: result-icon-bounce 0.6s cubic-bezier(0.175,0.885,0.32,1.275) 0.15s backwards;
}
@keyframes result-icon-bounce {
    0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
    70%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1)   rotate(0deg); opacity: 1; }
}
.treasure-result-label {
    font-size: 13px; color: rgba(255,255,255,0.45);
    margin-bottom: 8px; letter-spacing: 0.5px;
}
.treasure-result-tag {
    display: inline-block;
    font-size: 12px; font-weight: bold;
    padding: 3px 14px; border-radius: 50px;
    margin-bottom: 10px; color: #fff;
}
.treasure-result-tag.tier-일반 { background: #7f8c8d; }
.treasure-result-tag.tier-고급 { background: #2eb2cc; }
.treasure-result-tag.tier-희귀 { background: #25cf94; }
.treasure-result-tag.tier-에픽 { background: #9b59b6; box-shadow: 0 0 8px rgba(155,89,182,0.6); }
.treasure-result-tag.tier-전설 { background: #ec0c0c; box-shadow: 0 0 10px rgba(236,12,12,0.6); }
.treasure-result-amount {
    font-size: 36px; font-weight: bold; color: #f1c40f;
    margin-bottom: 28px;
    animation: result-amount-in 0.5s cubic-bezier(0.175,0.885,0.32,1.275) 0.3s backwards;
}
#treasure-result-popup.tier-고급 .treasure-result-amount { color: #2eb2cc; }
#treasure-result-popup.tier-희귀 .treasure-result-amount { color: #25cf94; }
#treasure-result-popup.tier-에픽 .treasure-result-amount { color: #c084fc; }
#treasure-result-popup.tier-전설 .treasure-result-amount {
    background: linear-gradient(90deg, #ff4e4e, #f1c40f, #ff4e4e);
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: result-amount-in 0.5s cubic-bezier(0.175,0.885,0.32,1.275) 0.3s backwards,
               jackpot-shine 1.5s linear infinite;
}
@keyframes jackpot-shine {
    0%   { background-position: 0% }
    100% { background-position: 200% }
}
@keyframes result-amount-in {
    0%   { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}
.treasure-result-confirm-btn {
    padding: 13px 52px;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    border: none; border-radius: 50px;
    font-size: 16px; font-weight: bold; color: #1a0a00;
    cursor: pointer; transition: opacity 0.2s, transform 0.1s;
    animation: result-amount-in 0.5s cubic-bezier(0.175,0.885,0.32,1.275) 0.45s backwards;
}
.treasure-result-confirm-btn:hover { opacity: 0.88; transform: scale(1.04); }

/* ── 하단 HUD (MJ + 상점) ────────────────────────────────────── */
#hud-bar {
    position: fixed; bottom: 20px; right: 20px;
    display: flex; align-items: center; gap: 10px;
    z-index: 200;
}

#mj-display {
    display: flex; align-items: center; gap: 6px;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,215,0,0.35); border-radius: 50px;
    padding: 8px 16px; color: white;
    box-shadow: 0 0 12px rgba(255,215,0,0.15);
}
.mj-icon { font-size: 16px; }
#mj-amount {
    font-size: 15px; font-weight: bold; color: #f1c40f;
    min-width: 30px; text-align: right;
    font-variant-numeric: tabular-nums;
}
.mj-unit { font-size: 12px; color: rgba(255,255,255,0.5); font-weight: bold; }

#shop-btn {
    background: rgba(0,0,0,0.55); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 50px;
    color: rgba(255,255,255,0.85); padding: 8px 16px;
    font-size: 14px; font-weight: bold; cursor: pointer;
    transition: background 0.2s;
}
#shop-btn:hover { background: rgba(255,255,255,0.15); }

/* ── 팝업 MJ 획득 표시 ───────────────────────────────────────── */
#fish-mj-reward {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    margin: 6px 0 14px;
    animation: mj-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
.mj-reward-icon { font-size: 16px; }
.mj-reward-amount {
    font-size: 17px; font-weight: bold; color: #e6a817;
}
@keyframes mj-pop {
    0%   { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

/* ── 명예의전당 재산 순위 ─────────────────────────────────────── */
/* ── 내아이템 버튼 ───────────────────────────────────────────── */
#myitems-btn {
    background: rgba(0,0,0,0.55); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 50px;
    color: rgba(255,255,255,0.85); padding: 8px 16px;
    font-size: 14px; font-weight: bold; cursor: pointer;
    transition: background 0.2s;
}
#myitems-btn:hover { background: rgba(255,255,255,0.15); }

/* ── 상점 / 내아이템 팝업 공통 ──────────────────────────────── */
#shop-popup, #myitems-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 300;
    display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: 0.3s;
}
#shop-popup.show, #myitems-popup.show { visibility: visible; opacity: 1; }

.shop-content {
    background: #f4f7f9; width: 90%; max-width: 680px; height: 80vh;
    border-radius: 30px; position: relative;
    display: flex; flex-direction: column; overflow: hidden;
}
.shop-header {
    padding: 20px 60px 16px 24px;
    background: white;
    border-bottom: 1px solid #eee;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.shop-header h2 { margin: 0; font-size: 22px; flex-shrink: 0; }
.shop-subtitle   { font-size: 13px; color: #aaa; margin: 0; }

.shop-mj-balance {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
    margin-right: 40px; /* close-book 버튼 공간 확보 */
}
.shop-mj-label {
    font-size: 11px; color: #bbb; font-weight: bold; text-transform: uppercase; letter-spacing: 0.4px;
}
.shop-mj-value {
    font-size: 16px; font-weight: bold; color: #e6a817;
    background: rgba(230,168,23,0.1); border: 1px solid rgba(230,168,23,0.25);
    padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}

.shop-tabs {
    display: flex; gap: 0;
    background: white; border-bottom: 2px solid #eee;
}
.shop-tab {
    flex: 1; padding: 12px 0; border: none; background: none;
    font-size: 14px; font-weight: bold; color: #aaa; cursor: pointer;
    border-bottom: 3px solid transparent; transition: 0.2s;
}
.shop-tab.active { color: #1e90ff; border-bottom-color: #1e90ff; }
.shop-tab:hover:not(.active) { background: #f9f9f9; }

#shop-list, #myitems-list {
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 12px;
}

.shop-empty {
    text-align: center; color: #bbb; font-size: 14px;
    padding: 50px 0;
}

.shop-item-card {
    background: white; border-radius: 16px; padding: 16px 18px;
    display: flex; align-items: center; gap: 14px;
    border: 2px solid #eee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.15s;
}
.shop-item-card:hover { transform: translateY(-2px); }
.shop-owned    { border-color: #d4edda; background: #f8fff9; }
.shop-equipped { border-color: #cce0ff; background: #f0f7ff; }

.shop-item-icon { font-size: 28px; flex-shrink: 0; }
.shop-item-body { flex: 1; min-width: 0; }
.shop-item-name { font-size: 15px; font-weight: bold; color: #222; margin-bottom: 3px; }
.shop-item-desc { font-size: 12px; color: #999; }
.shop-item-action { flex-shrink: 0; }

.shop-buy-btn {
    background: #1e90ff; color: white; border: none;
    padding: 8px 16px; border-radius: 20px;
    font-size: 13px; font-weight: bold; cursor: pointer;
    transition: background 0.2s; white-space: nowrap;
}
.shop-buy-btn:hover:not(:disabled) { background: #1a7ee0; }
.shop-buy-btn.owned { background: #2ecc71; cursor: default; }
.shop-buy-btn.cant-afford { background: #ccc; cursor: not-allowed; }

.shop-equip-btn {
    background: #1e90ff; color: white; border: none;
    padding: 8px 16px; border-radius: 20px;
    font-size: 13px; font-weight: bold; cursor: pointer;
    transition: background 0.2s; white-space: nowrap;
}
.shop-equip-btn:hover:not(.equipped) { background: #1a7ee0; }
.shop-equip-btn.equipped { background: #2ecc71; cursor: default; }

/* ── 내아이템 칭호 출처 태그 ─────────────────────────────────── */
.myitem-source-tag {
    font-size: 10px; font-weight: bold;
    padding: 2px 7px; border-radius: 10px;
    margin-left: 6px; vertical-align: middle;
}
.ach-tag  { background: rgba(155,89,182,0.15); color: #9b59b6; }
.shop-tag { background: rgba(30,144,255,0.15); color: #1e90ff; }

/* ── 전설 파티클 ─────────────────────────────────────────────── */
.legendary-particle {
    position: fixed;
    top: -50px;
    z-index: 1050;
    pointer-events: none;
    animation: particle-fall linear forwards;
    filter: drop-shadow(0 0 5px rgba(241,196,15,0.9));
}
@keyframes particle-fall {
    0%   { transform: translateY(0) rotate(0deg) scale(1);   opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translateY(115vh) rotate(540deg) scale(0.4); opacity: 0; }
}

/* ── 낚싯대 파티클 애니메이션 ────────────────────────────────── */
@keyframes rod-ptcl {
    0%   { transform: translate(0, 0) scale(0.4) rotate(0deg);   opacity: 0; }
    15%  { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0) rotate(180deg); opacity: 0; }
}

/* ── 날씨 오버레이 (비/눈) ───────────────────────────────────── */

/* 빗줄기 */
.weather-rain {
    position: absolute;
    top: -10%;
    height: 18px;
    background: linear-gradient(to bottom, transparent, rgba(174,214,241,0.55));
    border-radius: 0 0 2px 2px;
    animation: rain-fall linear infinite;
    transform: rotate(12deg);
    transform-origin: top center;
}
@keyframes rain-fall {
    0%   { top: -5%;   opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 0.7; }
    100% { top: 105%;  opacity: 0; }
}

/* 눈송이 */
.weather-snow {
    position: absolute;
    top: -5%;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    box-shadow: 0 0 4px rgba(255,255,255,0.6);
    animation: snow-fall linear infinite;
}
@keyframes snow-fall {
    0%   { top: -5%;  transform: translateX(0)      rotate(0deg);   opacity: 0; }
    5%   { opacity: 1; }
    50%  { transform: translateX(18px)  rotate(180deg); }
    95%  { opacity: 0.8; }
    100% { top: 105%; transform: translateX(-10px) rotate(360deg); opacity: 0; }
}

.weather-bubble {
    position: absolute;
    bottom: -10%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        rgba(255,255,255,0.6) 0%, rgba(150,220,255,0.25) 50%, rgba(100,190,255,0.1) 100%);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: inset -2px -2px 4px rgba(255,255,255,0.3);
    animation: bubble-rise linear infinite;
}
@keyframes bubble-rise {
    0%   { bottom: -10%; transform: translateX(0);              opacity: 0; }
    5%   { opacity: 1; }
    50%  { transform: translateX(var(--sway, 30px)); }
    90%  { opacity: 0.6; }
    100% { bottom: 105%; transform: translateX(calc(var(--sway, 30px) * -0.5)); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   신화 등급
══════════════════════════════════════════════════════════════ */

/* ── 신화 등급 뱃지 (무지개) ─────────────────────────────────── */
.rarity-신화 {
    background: linear-gradient(90deg,
        #ff0000, #ff7700, #ffee00, #00cc00, #0088ff, #8800ff, #ff00cc, #ff0000);
    background-size: 300% auto;
    color: white;
    font-weight: 900;
    border-radius: 8px;
    animation: myth-rainbow-bg 2s linear infinite;
    box-shadow: 0 0 14px rgba(255,100,200,0.7);
}
@keyframes myth-rainbow-bg {
    0%   { background-position: 0% center; }
    100% { background-position: 300% center; }
}

/* ── 신화 팝업 ────────────────────────────────────────────────── */
#result-popup.myth-popup {
    background: linear-gradient(160deg, #0d0d0d, #1a001a);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    box-shadow:
        0 0 0 2px #ff00cc,
        0 0 30px rgba(255,0,204,0.5),
        0 0 70px rgba(100,0,255,0.3),
        0 20px 60px rgba(0,0,0,0.8);
    animation: myth-border-pulse 1.5s ease-in-out infinite;
}
#result-popup.myth-popup h2 {
    background: linear-gradient(90deg,#ff0000,#ff7700,#ffee00,#00cc00,#0088ff,#8800ff,#ff00cc);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: myth-rainbow-bg 1.8s linear infinite;
    font-weight: 900;
}
#result-popup.myth-popup #fish-pop-desc { color: rgba(255,255,255,0.75); }
#result-popup.myth-popup .fish-image-container {
    background: rgba(255,0,200,0.08);
    border: 1px solid rgba(255,0,200,0.3);
    box-shadow: inset 0 0 30px rgba(100,0,255,0.15);
}
#result-popup.myth-popup .main-btn {
    background: linear-gradient(90deg,#ff0000,#ff7700,#ffee00,#00cc00,#0088ff,#8800ff,#ff00cc);
    background-size: 300% auto;
    animation: myth-rainbow-bg 2s linear infinite;
    color: white; font-weight: 900;
    box-shadow: 0 4px 20px rgba(200,0,255,0.5);
    border: none;
}
#result-popup.myth-popup .mj-reward-amount {
    background: linear-gradient(90deg,#ff0000,#ffee00,#00cc00,#0088ff,#ff00cc);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: myth-rainbow-bg 2s linear infinite;
    font-weight: 900;
}
@keyframes myth-border-pulse {
    0%,100% { box-shadow: 0 0 0 2px #ff00cc, 0 0 30px rgba(255,0,204,0.5), 0 0 70px rgba(100,0,255,0.3), 0 20px 60px rgba(0,0,0,0.8); }
    50%      { box-shadow: 0 0 0 3px #00ccff, 0 0 50px rgba(0,200,255,0.6), 0 0 100px rgba(255,0,200,0.4), 0 20px 60px rgba(0,0,0,0.8); }
}

/* ── 신화 배너 ────────────────────────────────────────────────── */
#broadcast-banner.myth-banner {
    background: linear-gradient(90deg,#ff0000,#ff7700,#ffee00,#00cc00,#0088ff,#8800ff,#ff00cc,#ff0000);
    background-size: 300% auto;
    animation: myth-rainbow-bg 1.5s linear infinite, myth-banner-scale 0.6s ease-out;
    color: white;
    font-size: 18px;
    box-shadow:
        0 0 20px rgba(255,0,200,0.7),
        0 0 50px rgba(100,0,255,0.5),
        0 4px 30px rgba(0,0,0,0.5);
    padding: 16px 50px;
    letter-spacing: 0.5px;
}
@keyframes myth-banner-scale {
    0%   { transform: translateX(-50%) scale(0.7); opacity: 0; }
    100% { transform: translateX(-50%) scale(1);   opacity: 1; }
}

/* ── 신화 파티클 ─────────────────────────────────────────────── */
.myth-particle {
    position: fixed;
    top: -30px;
    z-index: 1050;
    pointer-events: none;
    animation: myth-particle-fall linear forwards;
}
@keyframes myth-particle-fall {
    0%   { transform: translateY(0)     rotate(0deg)   scale(1);   opacity: 0; }
    10%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg) scale(0.3); opacity: 0; }
}

/* ── 업데이트 알림 팝업 ──────────────────────────────────────── */
#update-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
    z-index: 2000; display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: 0.3s;
}
#update-popup.show { visibility: visible; opacity: 1; }
.update-content {
    background: white; border-radius: 24px; padding: 36px 32px;
    text-align: center; max-width: 320px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.update-icon { font-size: 48px; margin-bottom: 12px; }
.update-content h3 { font-size: 20px; font-weight: 900; color: #111; margin: 0 0 10px; }
.update-content p  { font-size: 14px; color: #666; line-height: 1.6; margin: 0 0 22px; }
.update-btn {
    background: #1e90ff; color: white; border: none;
    padding: 13px 32px; border-radius: 50px;
    font-size: 15px; font-weight: bold; cursor: pointer;
    width: 100%; transition: background 0.2s;
}
.update-btn:hover { background: #1a7ee0; }

/* ── 신화 물고기 등장 요일 안내 ──────────────────────────────── */
.myth-day-info {
    font-size: 11px;
    color: #aaa;
    margin: 4px 0 0;
}

/* ── 상점 선행조건 안내 ──────────────────────────────────────── */
.shop-item-req {
    font-size: 11px; color: #e67e22;
    margin-top: 4px; font-weight: bold;
}

/* ── 신화 낚싯대 무지개 글로우 애니메이션 ───────────────────── */
@keyframes myth-rod-glow {
    0%   { box-shadow: 0 0 22px 6px rgba(255,0,0,0.85),    0 0 65px 18px rgba(255,0,0,0.4); }
    12%  { box-shadow: 0 0 22px 6px rgba(255,80,0,0.85),   0 0 65px 18px rgba(255,80,0,0.4); }
    25%  { box-shadow: 0 0 22px 6px rgba(255,220,0,0.85),  0 0 65px 18px rgba(255,220,0,0.4); }
    37%  { box-shadow: 0 0 22px 6px rgba(0,210,0,0.85),    0 0 65px 18px rgba(0,210,0,0.4); }
    50%  { box-shadow: 0 0 22px 6px rgba(0,120,255,0.85),  0 0 65px 18px rgba(0,120,255,0.4); }
    62%  { box-shadow: 0 0 22px 6px rgba(100,0,255,0.85),  0 0 65px 18px rgba(100,0,255,0.4); }
    75%  { box-shadow: 0 0 22px 6px rgba(200,0,255,0.85),  0 0 65px 18px rgba(200,0,255,0.4); }
    87%  { box-shadow: 0 0 22px 6px rgba(255,0,150,0.85),  0 0 65px 18px rgba(255,0,150,0.4); }
    100% { box-shadow: 0 0 22px 6px rgba(255,0,0,0.85),    0 0 65px 18px rgba(255,0,0,0.4); }
}

/* ── 도감 진척도 바 ──────────────────────────────────────────── */
.book-title-row {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 8px;
}
.book-title-row h2 { margin: 0; }
.book-progress-text {
    font-size: 13px; font-weight: bold; color: #1e90ff;
}
.book-progress-bar-wrap {
    width: 100%; height: 6px;
    background: #eee; border-radius: 3px;
    margin-bottom: 14px; overflow: hidden;
}
.book-progress-bar {
    height: 100%; border-radius: 3px;
    background: linear-gradient(to right, #1e90ff, #00c6ff);
    transition: width 0.4s ease;
}

/* ── 처음 발견 배지 ──────────────────────────────────────────── */
.fish-new-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: white; font-size: 12px; font-weight: bold;
    padding: 4px 14px; border-radius: 20px;
    margin-bottom: 8px;
    animation: new-badge-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    box-shadow: 0 2px 8px rgba(241,196,15,0.5);
}
@keyframes new-badge-pop {
    0%   { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}
