/* Reel Legends — game-specific styles. Chrome (nav, waves, header, footer)
   comes from styles.css; everything below is the game UI. */

.game-body { color: #eaf7ff; }
.game-header { margin-bottom: 1.25rem; animation: none; }

/* ---- HUD ---- */
.game-hud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 1rem;
}
.hud-stat {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 0.6rem 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.hud-icon { font-size: 1.2rem; }
.hud-label { font-size: 0.8rem; opacity: 0.7; font-weight: 600; }
.hud-level { flex-direction: row; flex-wrap: wrap; min-width: 220px; }
.hud-zonebox { font-family: 'Fredoka One', cursive; }
.xpbar {
    flex-basis: 100%;
    height: 7px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 4px;
}
.xpbar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffd166, #7ee787);
    transition: width 0.25s ease;
}

/* ---- Tabs ---- */
.game-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.game-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #eaf7ff;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.55rem 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}
.game-tab:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.18); }
.game-tab.active {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* ---- Panels ---- */
.game-panel { display: none; animation: fadein 0.3s ease; }
.game-panel.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel-title { font-family: 'Fredoka One', cursive; font-size: 1.8rem; margin-bottom: 0.25rem; }
.panel-sub { opacity: 0.8; margin-bottom: 1.25rem; }

/* ---- Play layout ---- */
.play-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; }
.play-main {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1rem;
}
#game-canvas {
    width: 100%;
    height: 380px;
    display: block;
    border-radius: 14px;
    background: #0a4f6e;
    touch-action: none;
    cursor: pointer;
}
.play-hint { font-size: 0.9rem; opacity: 0.8; margin-top: 0.75rem; text-align: center; }
kbd {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 1px 6px;
    font-family: monospace;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.play-side {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 1rem;
}
.side-title { font-size: 1.1rem; margin: 0.25rem 0 0.6rem; opacity: 0.9; }
.side-title:not(:first-child) { margin-top: 1.2rem; }

/* Zones */
.zone-list { display: flex; flex-direction: column; gap: 0.5rem; }
.zone-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #eaf7ff;
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    transition: transform 0.12s ease, background 0.2s ease;
}
.zone-btn:hover:not(.locked) { transform: translateX(3px); background: rgba(255, 255, 255, 0.18); }
.zone-btn.active { background: linear-gradient(135deg, #ff9a56, #ff6b6b); border-color: transparent; }
.zone-btn.locked { opacity: 0.5; cursor: not-allowed; }
.zone-emoji { font-size: 1.3rem; }
.zone-name { flex: 1; }
.zone-req { font-size: 0.75rem; opacity: 0.85; }

/* Catch log */
.catch-log { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.catch-log li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    font-weight: 600;
}
.log-meta { opacity: 0.75; font-size: 0.8rem; white-space: nowrap; }

/* ---- Generic list rows (shop / pearls / achievements) ---- */
.list { display: flex; flex-direction: column; gap: 0.6rem; }
.shop-row, .ach-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 0.8rem 1rem;
}
.shop-emoji, .ach-icon { font-size: 1.8rem; flex-shrink: 0; }
.shop-main, .ach-main { flex: 1; min-width: 0; }
.shop-title, .ach-title { font-weight: 700; font-size: 1.05rem; }
.shop-lvl { font-size: 0.8rem; opacity: 0.75; font-weight: 600; }
.shop-blurb, .ach-desc { font-size: 0.85rem; opacity: 0.8; }
.shop-effect { font-size: 0.8rem; color: #7ee787; font-weight: 600; margin-top: 2px; }
.shop-buy {
    flex-shrink: 0;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 0.6rem 1rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    min-width: 92px;
    transition: transform 0.12s ease, filter 0.2s ease;
}
.shop-buy.pearl { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.shop-buy:hover:not(:disabled) { transform: scale(1.05); }
.shop-buy:disabled { opacity: 0.45; cursor: not-allowed; }

/* Achievements */
.ach-row.done { border-color: rgba(126, 231, 135, 0.5); background: rgba(126, 231, 135, 0.12); }
.ach-reward { font-size: 0.85rem; font-weight: 700; white-space: nowrap; opacity: 0.9; }

/* ---- Fishdex ---- */
.dex-zone-header { font-family: 'Fredoka One', cursive; font-size: 1.15rem; margin: 1.25rem 0 0.6rem; opacity: 0.95; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.dex-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 0.75rem;
    text-align: center;
}
.dex-card.undiscovered { opacity: 0.6; }
.dex-emoji { font-size: 2.2rem; }
.dex-name { font-weight: 700; font-size: 0.95rem; margin-top: 0.25rem; }
.dex-rarity { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.dex-meta { font-size: 0.78rem; opacity: 0.8; margin-top: 0.25rem; }
.dex-pun { font-size: 0.75rem; opacity: 0.7; font-style: italic; margin-top: 0.35rem; }

/* ---- Prestige ---- */
.prestige-box {
    background: rgba(124, 58, 237, 0.18);
    border: 1px solid rgba(167, 139, 250, 0.4);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
}
.prestige-box p { margin-bottom: 0.9rem; }

/* ---- Buttons ---- */
.btn-game {
    background: linear-gradient(135deg, #ff9a56, #ff6b6b);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 0.8rem 1.6rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.12s ease, filter 0.2s ease;
}
.btn-game:hover:not(:disabled) { transform: translateY(-2px); }
.btn-game:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-game.cast { display: block; width: 100%; margin-top: 0.9rem; }
.btn-game.prestige { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.btn-game.small { font-size: 0.9rem; padding: 0.55rem 1rem; }
.btn-game.danger { background: linear-gradient(135deg, #f87171, #dc2626); }

/* ---- Stats ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.6rem; }
.stat-row {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
}
.save-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.save-note { margin-top: 0.75rem; font-size: 0.85rem; }

/* ---- Toasts ---- */
.toast-container {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(360px, 90vw);
}
.toast {
    background: rgba(2, 48, 71, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast-new   { border-color: #ffd166; }
.toast-ach   { border-color: #ffa657; }
.toast-level { border-color: #7ee787; }
.toast-zone  { border-color: #58a6ff; }
.toast-warn  { border-color: #f87171; }
.toast-save  { border-color: #a78bfa; }

/* ---- Responsive ---- */
@media (max-width: 820px) {
    .play-layout { grid-template-columns: 1fr; }
    #game-canvas { height: 320px; }
}
@media (max-width: 480px) {
    .game-tab { font-size: 0.85rem; padding: 0.45rem 0.7rem; }
    .panel-title { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .game-panel, .toast, .xpbar-fill { animation: none; transition: none; }
    .game-tab:hover, .zone-btn:hover, .shop-buy:hover, .btn-game:hover { transform: none; }
}
