/* ========================================
   Fishing Legends
   ======================================== */

:root {
  --ocean-deep: #0a2a4a;
  --ocean-mid: #143c6a;
  --ocean-light: #1a7090;
  --sky-top: #87ceeb;
  --sky-warm: #f4a460;
  --gold: #ffd700;
  --gold-dim: #c4a44a;
  --sand: #f5f0e0;
  --wood: #5c3a1e;
  --danger: #cc3333;
  --success: #00c853;
  --text-light: #e8e0d0;
  --panel-bg: rgba(10,30,50,0.85);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', 'Georgia', sans-serif;
  color: var(--text-light);
  background: var(--ocean-deep);
  min-height: 100vh;
  min-height: 100dvh;
}

.fishing-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 215, 92, 0.16), transparent 30%),
    radial-gradient(ellipse at 50% 78%, rgba(22, 123, 153, 0.24), transparent 48%),
    linear-gradient(165deg, #0b3552 0%, #08243b 45%, #04121e 100%);
}

.fishing-loading-overlay[hidden] {
  display: none;
}

.fishing-loading-panel {
  width: min(460px, 92vw);
  text-align: center;
  color: #fff;
}

.fishing-loading-mark {
  width: 86px;
  height: 86px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 215, 92, 0.6);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 92, 0.15), rgba(11, 66, 91, 0.72));
  box-shadow: 0 0 34px rgba(255, 215, 92, 0.2), inset 0 0 22px rgba(137, 224, 255, 0.12);
  color: var(--gold);
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: 2px;
  animation: fishingLoadingFloat 2.2s ease-in-out infinite;
}

.fishing-loading-kicker {
  margin: 0 0 6px;
  color: rgba(158, 222, 243, 0.78);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.fishing-loading-panel h1 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1.8rem, 7vw, 2.45rem);
  letter-spacing: 0.08em;
  text-shadow: 0 0 24px rgba(255, 215, 0, 0.18);
}

.fishing-loading-panel > p:not(.fishing-loading-kicker) {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.fishing-loading-status {
  min-height: 1.3em;
}

.fishing-loading-bar {
  height: 12px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 92, 0.34);
  border-radius: 999px;
  background: rgba(1, 12, 20, 0.62);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.42);
}

.fishing-loading-bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b91b8, #8ee7ff, #ffd75c);
  box-shadow: 0 0 16px rgba(142, 231, 255, 0.42);
  transition: width 220ms ease;
}

.fishing-loading-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.82rem;
}

.fishing-loading-error {
  min-height: 20px;
  margin-top: 14px;
  color: #ff9b91;
  font-size: 0.88rem;
}

.fishing-loading-retry {
  margin-top: 8px;
  padding: 9px 26px;
  border: 1px solid rgba(255, 226, 132, 0.7);
  border-radius: 999px;
  background: linear-gradient(180deg, #f3c853, #9d7017);
  color: #071c29;
  font-weight: 800;
  cursor: pointer;
}

@keyframes fishingLoadingFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ========== ?========== */
.login-page {
  background: linear-gradient(180deg, #1a3a5c 0%, #0a2a4a 40%, #061a30 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-container { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
  background: var(--panel-bg);
  border: 2px solid var(--gold-dim);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 60px rgba(26,112,144,0.15);
}
.logo-icon { font-size: 4rem; margin-bottom: 8px; }
.logo-section h1 {
  font-size: 1.8rem;
  color: var(--gold);
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(255,215,0,0.3);
}
.subtitle { color: var(--ocean-light); font-size: 0.95rem; margin: 4px 0 20px; }

.login-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { text-align: left; }
.form-group label { display: block; font-size: 0.85rem; color: var(--gold-dim); margin-bottom: 4px; }
.form-group input {
  width: 100%; padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(212,168,83,0.3);
  border-radius: 10px;
  color: #fff; font-size: 1rem;
  transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--gold); }

.btn-enter {
  background: linear-gradient(180deg, #d4a853, #8b6914);
  border: 2px solid #f0d68a;
  border-radius: 12px;
  padding: 12px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  margin-top: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  transition: all 0.15s;
}
.btn-enter:hover { background: linear-gradient(180deg, #e8bc60, #a0781a); }
.btn-enter.loading { opacity: 0.6; pointer-events: none; }

.error-message { color: #ff6666; font-size: 0.9rem; margin-top: 12px; min-height: 20px; }
.login-footer { margin-top: 18px; color: rgba(255,255,255,0.4); font-size: 0.75rem; }

/* ========== ?========== */
.game-page {
  background: linear-gradient(180deg, #0a2a4a 0%, #061a30 100%);
  min-height: 100vh;
}

.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 24px;
  background: linear-gradient(180deg, #143c6a 0%, #0a2a4a 100%);
  border-bottom: 2px solid var(--gold-dim);
  box-shadow: 0 2px 15px rgba(0,0,0,0.4);
}
.brand { font-size: 1.4rem; font-weight: bold; color: var(--gold); letter-spacing: 2px; }
.user-info { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.balance-display { display: inline-flex; align-items: center; gap: 5px; color: #ffd700; font-weight: bold; text-shadow: 0 0 8px rgba(255,215,0,0.3); }
.wallet-coin {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 1px solid #ffe47a;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #fff7b0 0 10%, transparent 12%),
    radial-gradient(circle, #ffd85a 0 48%, #e3a72c 50% 70%, #8d5b11 72% 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 238, 145, 0.42), 0 1px 4px rgba(255, 196, 43, 0.38);
}
.btn-small { background: rgba(212,168,83,0.15); border: 1px solid rgba(212,168,83,0.3); color: var(--gold); padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.btn-small:hover { background: rgba(212,168,83,0.3); }
.btn-exit { background: rgba(255,100,100,0.15) !important; border: 1px solid rgba(255,100,100,0.3) !important; color: #ff8888 !important; margin-left: 4px; }
.btn-exit:hover { background: rgba(255,100,100,0.3) !important; }

/*  ? */
.main-area {
  display: flex;
  height: calc(100vh - 60px);
  gap: 0;
}

/* 1/3 + 2/3?*/
.ocean-zone {
  flex: 1;
  background: linear-gradient(180deg,
    #6ab0d0 0%, #87ceeb 15%, #b8dff0 32%,
    #3a8090 34%, #1a6070 50%, #0a4a60 75%, #1a5040 88%, #2a6048 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/*  */
.water-surface {
  position: absolute;
  top: 33%; left: 0; right: 0;
  height: 6px;
  background: rgba(255,255,255,0.4);
  z-index: 4;
  box-shadow: 0 -2px 10px rgba(255,255,255,0.25), 0 6px 15px rgba(0,80,120,0.3);
}
/*  */
.underwater {
  position: absolute;
  top: 33%; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg,
    rgba(30,110,140,0.25) 0%, rgba(10,60,90,0.45) 30%, rgba(3,20,40,0.55) 80%, rgba(2,12,24,0.6) 100%);
  pointer-events: none;
  z-index: 0;
}
/* ?*/
.cloud {
  position: absolute; z-index: 1;
  width: 70px; height: 30px;
  background: rgba(255,255,255,0.7);
  border-radius: 20px;
  pointer-events: none;
}
.cloud::before, .cloud::after {
  content: ''; position: absolute;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
}
.cloud::before { width: 40px; height: 40px; top: -25px; left: 10px; }
.cloud::after  { width: 50px; height: 35px; top: -15px; left: 30px; }
.ocean-zone .bobber {
  width: 26px; height: 38px;
  position: absolute;
  top: 33%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  animation: bob 2s ease-in-out infinite;
}
/* ?*/
.bobber-body {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg,
    #ffffff 0%, #f0f0f0 30%,
    #ff2200 30%, #cc0000 70%,
    #880000 70%, #660000 100%);
  box-shadow:
    inset 0 -3px 6px rgba(0,0,0,0.4),
    0 3px 8px rgba(0,0,0,0.5),
    0 0 12px rgba(255,50,0,0.3);
  position: relative;
  z-index: 2;
}
/*  */
.bobber-body::before {
  content: '';
  position: absolute;
  top: -16px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 18px;
  background: linear-gradient(180deg, #ff4400, #cc2200);
  border-radius: 2px 2px 0 0;
}
/*  */
.bobber-body::after {
  content: '';
  position: absolute;
  top: -20px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px;
  background: #ffaa00;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255,170,0,0.5);
}
/*  */
.bobber-shadow {
  width: 20px; height: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  margin: 2px auto 0;
  filter: blur(2px);
}
.ocean-zone .line {
  position: absolute;
  width: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.3), rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  left: 50%;
  top: calc(33% + 15px);
  height: 80px;
  z-index: 5;
  transform: translateX(-50%);
}
/*  +  */
.bait-on-hook {
  position: absolute;
  left: 50%;
  top: calc(33% + 95px);
  transform: translate(-50%, 0);
  z-index: 6;
  font-size: 20px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
  animation: baitBob 2s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bait-on-hook .hook {
  font-size: 16px;
  line-height: 1;
  color: #888;
}
@keyframes baitBob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -4px); }
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-8px); }
}
@keyframes driftCloud {
  from { transform: translateX(-120px); }
  to   { transform: translateX(calc(100vw + 120px)); }
}

/*    */
.seaweed {
  position: absolute; bottom: 0;
  width: 18px; border-radius: 10px 10px 0 0;
  opacity: 0.9;
  transform-origin: bottom center;
  animation: sway 3s ease-in-out infinite;
  z-index: 3;
  filter: drop-shadow(0 0 8px rgba(46,204,113,0.35));
}
.seaweed::after {
  content: ''; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 35px; background: inherit; border-radius: 50%; opacity: 0.65;
}
@keyframes sway {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}
.coral {
  position: absolute; bottom: 0; z-index: 3;
  opacity: 0.88;
  border-radius: 50% 50% 10% 10%;
  filter: drop-shadow(0 0 10px rgba(255,107,74,0.5));
}
.rock {
  position: absolute; bottom: -2px; z-index: 2;
  border-radius: 45% 45% 0 0;
  opacity: 0.65;
  background: linear-gradient(180deg, #7a8a9a 0%, #5a6a7a 30%, #3a4a5a 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.1);
}

/*    */
.jellyfish {
  position: absolute;
  font-size: 28px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 2;
  animation: driftDown 20s linear infinite;
}
@keyframes driftDown {
  0%   { top: -10%; transform: translateX(0); }
  50%  { transform: translateX(30px); }
  100% { top: 100%; transform: translateX(-20px); }
}

/*  */
.swim-fish {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  animation: swimRightToLeft linear infinite;
  transform: scaleX(-1);
}
.swim-fish img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35));
}
@keyframes swimRightToLeft {
  from { left: 110%; }
  to   { left: -150px; }
}

/* ???*/
.fish-hooked {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  animation: reelIn 0.8s ease-in forwards;
}
.fish-hooked img, .fish-hooked .hooked-emoji {
  width: 100px;
  height: auto;
  animation: fishWiggle 0.15s ease-in-out infinite;
}
@keyframes reelIn {
  0%   { top: 50%; left: 50%; transform: translate(-50%, 0) scale(0.3); opacity: 0; }
  20%  { transform: translate(-50%, -20%) scale(0.5); opacity: 0.8; }
  60%  { transform: translate(40%, -30%) scale(0.8); opacity: 1; }
  100% { transform: translate(60%, -40%) scale(1); opacity: 1; }
}
@keyframes fishWiggle {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* ?*/
.fish-hooked.mermaid {
  animation: mermaidReelIn 1.2s ease-out forwards;
}
.fish-hooked.mermaid img {
  width: 140px;
  animation: mermaidRise 1s ease-out;
}
@keyframes mermaidReelIn {
  0%   { top: 55%; left: 50%; transform: translate(-50%, 0) scale(0.2); opacity: 0; }
  25%  { top: 35%; transform: translate(-50%, 0) scale(0.5); opacity: 0.9; }
  60%  { top: 25%; left: 35%; transform: translate(0, 0) scale(0.8); opacity: 1; }
  100% { top: 20%; left: 60%; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes mermaidRise {
  0%   { filter: brightness(2) blur(2px); }
  50%  { filter: brightness(1.3) blur(0); }
  100% { filter: brightness(1) blur(0); }
}

/* === Result Panel === */
.result-panel {
  width: 440px;
  min-width: 360px;
  background: var(--panel-bg);
  border-left: 2px solid var(--gold-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 26px 22px 160px 22px;
  gap: 14px;
  overflow-y: auto;
}
.result-panel .catch-image {
  width: 200px; height: 200px;
  border-radius: 14px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.result-panel .catch-image img { width: 100%; height: 100%; object-fit: contain; }
.result-panel .catch-name { font-size: 1.45rem; font-weight: bold; color: var(--gold); text-align: center; }
.result-panel .catch-value { font-size: 2rem; font-weight: bold; }
.result-panel .catch-value.win { color: var(--success); }
.result-panel .catch-value.lose { color: var(--danger); }
.result-panel .catch-tier {
  padding: 4px 18px; border-radius: 12px;
  font-size: 0.85rem; font-weight: bold; letter-spacing: 1px;
}
#idleArea { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#idleArea .catch-name { font-size: 1.35rem; margin-bottom: 4px; }
#resultArea { display: none; flex-direction: column; align-items: center; gap: 6px; }
.tier-common { background: rgba(100,200,100,0.2); color: #88cc88; }
.tier-medium { background: rgba(100,150,255,0.2); color: #88aaff; }
.tier-large { background: rgba(200,100,255,0.2); color: #cc88ff; }
.tier-rare { background: rgba(255,200,0,0.2); color: #ffd700; }

/* === Collection Area === */
.collection-area {
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid rgba(255,215,0,0.15);
}
.collection-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: rgba(255,255,255,0.55);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}
.collection-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.collection-item {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 4px 8px;
  min-width: 54px;
}
.collection-item img { width: 44px; height: 44px; object-fit: contain; }
.collection-item .fish-emoji { font-size: 1.5rem; }
.collection-item .fish-count { font-size: 0.85rem; color: var(--gold); font-weight: bold; }
.collection-empty { color: rgba(255,255,255,0.25); font-size: 0.85rem; }

/* === Miss Bucket === */
.miss-bucket-wrapper { position: relative; display: inline-block; }
.miss-handle {
  position: absolute;
  top: -28px; left: 50%;
  transform: translateX(-50%);
  width: 68px; height: 28px;
  border: 4px solid #b8944a;
  border-bottom: none;
  border-radius: 34px 34px 0 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.miss-bucket {
  width: 110px; height: 120px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0px, rgba(0,0,0,0.06) 1px, transparent 1px, transparent 11px),
    linear-gradient(90deg,
      #5a3520 0%, #7a4a2a 8%, #a06838 20%, #c08048 35%,
      #c88850 50%,
      #b87840 65%, #905830 80%, #6a4020 92%, #4a2810 100%);
  border-left: 3px solid #8a6030;
  border-right: 3px solid #6a4018;
  border-bottom: 4px solid #4a2810;
  border-top: 5px solid #c09050;
  border-radius: 8px 8px 26px 26px;
  position: relative;
  box-shadow:
    inset 2px 0 8px rgba(255,255,255,0.15),
    inset -4px 0 12px rgba(0,0,0,0.5),
    inset 0 -8px 16px rgba(0,0,0,0.4),
    inset 0 4px 6px rgba(255,255,255,0.1),
    0 10px 30px rgba(0,0,0,0.6);
}
/* Metal band 1 */
.miss-bucket::before {
  content: '';
  position: absolute;
  top: 20px; left: -4px; right: -4px;
  height: 6px;
  background: linear-gradient(180deg,
    #8a6a30, #c8a858, #e8d080, #c8a858, #8a6a30);
  border-radius: 2px;
  box-shadow: 0 2px 3px rgba(0,0,0,0.4);
}
/* Metal band 2 */
.miss-bucket::after {
  content: '';
  position: absolute;
  top: 56px; left: -4px; right: -4px;
  height: 6px;
  background: linear-gradient(180deg,
    #8a6a30, #c8a858, #e8d080, #c8a858, #8a6a30);
  border-radius: 2px;
  box-shadow: 0 2px 3px rgba(0,0,0,0.4);
}
.miss-empty {
  position: absolute;
  top: 68%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 3px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.btn-cast {
  padding: 16px 54px;
  background: linear-gradient(180deg, #d4a853, #8b6914);
  border: 3px solid #f0d68a;
  border-radius: 13px;
  font-size: 1.35rem; font-weight: bold; color: #fff;
  cursor: pointer;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
  animation: glow 1.5s infinite alternate;
  letter-spacing: 1px;
}
@keyframes glow { from { box-shadow: 0 0 8px rgba(240,214,138,0.3); } to { box-shadow: 0 0 20px rgba(240,214,138,0.6); } }

/*  ? */
.bait-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(10,30,50,0.95), #0a1e32);
  border-top: 2px solid var(--gold-dim);
  padding: 12px 22px;
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  z-index: 100;
}
.bait-card {
  width: 112px; height: 124px;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.bait-card:hover { border-color: rgba(212,168,83,0.5); background: rgba(255,255,255,0.1); transform: translateY(-3px); }
.bait-card.selected {
  border-color: var(--gold); background: rgba(255,215,0,0.12);
  box-shadow: 0 0 20px rgba(255,215,0,0.3); transform: translateY(-5px);
}
.bait-card.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.bait-card .bait-icon { font-size: 2.2rem; }
.bait-card .bait-img {
  width: 48px; height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
/*  ? */
#bait-gold { border-color: rgba(255,215,0,0.5) !important; background: rgba(255,215,0,0.1) !important; }
#bait-gold .bait-img { filter: drop-shadow(0 0 6px gold); }
#bait-gold .bait-name { color: #ffd700 !important; }
#bait-gold .bait-cost { color: #ffd700 !important; }
.bait-card .bait-name { font-size: 0.7rem; color: rgba(255,255,255,0.7); }
.bait-card .bait-cost { font-size: 0.75rem; font-weight: bold; color: var(--gold); }

.btn-action {
  padding: 14px 32px;
  background: linear-gradient(180deg, #e85d3a, #b02a10);
  border: 2px solid #ff7755;
  border-radius: 14px;
  font-size: 1.3rem; font-weight: bold; color: #fff;
  cursor: pointer;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.15s;
  margin-left: 8px;
}
.btn-action:hover { background: linear-gradient(180deg, #ff6e4a, #c83818); transform: scale(1.05); }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-action.casting { animation: castPulse 0.5s infinite alternate; }
@keyframes castPulse { from { box-shadow: 0 0 5px rgba(255,100,50,0.3); } to { box-shadow: 0 0 25px rgba(255,100,50,0.7); } }

/*  ? */
.collection-area {
  width: 100%;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(212,168,83,0.25);
}
.collection-title {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--gold-dim);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.collection-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.collection-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.06);
  min-width: 52px;
}
.collection-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.collection-item .fish-emoji {
  font-size: 1.6rem;
}
.collection-item .fish-count {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: bold;
}
.collection-empty {
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
}

/*  ? */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 1000;
  justify-content: center; align-items: center;
}
.modal.show { display: flex; }
.modal-content {
  background: #0a1e32;
  border: 2px solid var(--gold-dim);
  border-radius: 16px;
  padding: 20px;
  max-width: 600px; width: 90%;
  max-height: 80vh; overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-header h2 { color: var(--gold); }
.btn-close { background: none; border: none; color: var(--gold); font-size: 1.4rem; cursor: pointer; }
.modal-body { color: var(--text-light); }
.modal-body table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.modal-body th { color: var(--gold-dim); padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.1); text-align: left; }
.modal-body td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.05); }

/*  ? */
#effects-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden;
}

#catchCeremonyLayer {
  position: fixed;
  inset: 0;
  z-index: 10002;
  pointer-events: none;
  overflow: hidden;
}

.catch-ceremony {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  animation: ceremonyFade 1.9s ease-out forwards;
}

.catch-ceremony.common {
  --ceremony-main: #7ce4ff;
  --ceremony-accent: #dffaff;
  --ceremony-glow: rgba(124, 228, 255, 0.42);
  --ceremony-scale: 0.92;
}

.catch-ceremony.premium {
  --ceremony-main: #ffd66e;
  --ceremony-accent: #fff3b2;
  --ceremony-glow: rgba(255, 214, 110, 0.58);
  --ceremony-scale: 1.08;
}

.catch-ceremony.jackpot {
  --ceremony-main: #ffdc5f;
  --ceremony-accent: #fff8cc;
  --ceremony-glow: rgba(255, 210, 70, 0.78);
  --ceremony-scale: 1.22;
  animation-duration: 2.3s;
}

.ceremony-radial {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(circle at 50% 42%, var(--ceremony-glow), transparent 30%),
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.26), transparent 16%);
  animation: ceremonyRadial 1.4s ease-out forwards;
}

.ceremony-water-ring,
.ceremony-shockwave {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 88px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(210, 250, 255, 0.86);
  transform: translate(-50%, -50%) scale(0.2);
  box-shadow: 0 0 24px rgba(130, 230, 255, 0.54);
  animation: ceremonyWaterRing 0.9s ease-out forwards;
}

.ceremony-shockwave {
  border-color: var(--ceremony-main);
  animation-delay: 0.16s;
  animation-duration: 1.2s;
}

.ceremony-fish-wrap {
  position: relative;
  z-index: 3;
  padding: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,255,255,0.24), transparent 58%),
    radial-gradient(circle, var(--ceremony-glow), transparent 66%);
  filter: drop-shadow(0 24px 28px rgba(0,0,0,0.4));
  animation: ceremonyFishReveal 1.28s cubic-bezier(0.2, 1.35, 0.35, 1) forwards;
}

.ceremony-fish {
  width: calc(112px * var(--ceremony-scale));
  max-width: 34vw;
  display: block;
  filter: drop-shadow(0 0 26px var(--ceremony-glow)) drop-shadow(0 14px 16px rgba(0,0,0,0.42));
  animation: ceremonyFishWiggle 0.42s ease-in-out 0.35s 3;
}

.catch-ceremony.jackpot .ceremony-fish {
  width: min(190px, 42vw);
}

.ceremony-banner {
  position: absolute;
  z-index: 4;
  top: calc(50% + 112px);
  left: 50%;
  min-width: min(380px, calc(100vw - 34px));
  transform: translate(-50%, 24px) scale(0.86);
  opacity: 0;
  padding: 12px 22px;
  border-radius: 18px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(18, 25, 34, 0.94), rgba(5, 8, 14, 0.96)),
    radial-gradient(circle at 50% 0%, var(--ceremony-glow), transparent 55%);
  border: 1px solid var(--ceremony-main);
  color: #fff;
  box-shadow: 0 18px 44px rgba(0,0,0,0.48), 0 0 34px var(--ceremony-glow);
  animation: ceremonyBannerPop 1.25s ease-out 0.28s forwards;
}

.ceremony-label {
  display: block;
  color: var(--ceremony-main);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.ceremony-banner strong {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: clamp(1.1rem, 4.6vw, 2rem);
  text-shadow: 0 0 18px var(--ceremony-glow);
}

.ceremony-banner em {
  display: block;
  margin-top: 4px;
  color: var(--ceremony-accent);
  font-style: normal;
  font-size: clamp(1rem, 4vw, 1.7rem);
  font-weight: 900;
}

.ceremony-spark {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ceremony-main);
  box-shadow: 0 0 18px var(--ceremony-main);
  animation: ceremonySpark 1.05s ease-out forwards;
}

.catch-ceremony.jackpot .ceremony-spark {
  width: 10px;
  height: 10px;
}

/*  */
.splash {
  position: absolute;
  width: 8px; height: 8px;
  background: rgba(100,200,255,0.7);
  border-radius: 50%;
  animation: splashOut 0.8s ease-out forwards;
}
@keyframes splashOut {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(8); opacity: 0; }
}

/*  */
.catch-flash {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9998;
  animation: catchFlash 0.8s ease-out forwards;
}
.catch-flash.common { background: rgba(100,200,100,0.15); }
.catch-flash.medium { background: rgba(100,150,255,0.2); }
.catch-flash.large { background: rgba(200,100,255,0.25); }
.catch-flash.rare { background: rgba(255,215,0,0.35); }
@keyframes catchFlash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* === Earned Points Notification === */
.earned-notify {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  background: linear-gradient(180deg, rgba(20,15,0,0.95), rgba(10,5,0,0.95));
  border: 3px solid #ffd700;
  border-radius: 16px;
  padding: 16px 36px;
  text-align: center;
  color: #ffd700;
  font-weight: bold;
  font-size: 1rem;
  text-shadow: 0 0 20px rgba(255,215,0,0.6);
  box-shadow: 0 0 40px rgba(255,215,0,0.4), inset 0 0 20px rgba(255,215,0,0.1);
  animation: earnedPop 2s ease-out forwards;
  pointer-events: none;
}

.earned-notify.earned-premium,
.earned-notify.earned-jackpot {
  border-color: #fff1a8;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 234, 120, 0.28), transparent 45%),
    linear-gradient(180deg, rgba(28,18,0,0.98), rgba(6,4,0,0.98));
}

.earned-notify.earned-jackpot {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 0 64px rgba(255,215,0,0.62), inset 0 0 24px rgba(255,215,0,0.2);
}

@keyframes ceremonyFade {
  0% { opacity: 0; }
  8% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes ceremonyRadial {
  0% { opacity: 0; transform: scale(0.72); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.18); }
}

@keyframes ceremonyWaterRing {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.18); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(5.4); }
}

@keyframes ceremonyFishReveal {
  0% { opacity: 0; transform: translateY(110px) scale(0.22) rotate(-18deg); }
  32% { opacity: 1; transform: translateY(-18px) scale(1.12) rotate(8deg); }
  58% { transform: translateY(0) scale(1) rotate(-4deg); }
  100% { opacity: 1; transform: translateY(-10px) scale(1.04) rotate(0deg); }
}

@keyframes ceremonyFishWiggle {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(5deg) scale(1.03); }
}

@keyframes ceremonyBannerPop {
  0% { opacity: 0; transform: translate(-50%, 28px) scale(0.78); }
  22% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  40%, 100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes ceremonySpark {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  18% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x) * 220px), calc(-50% + var(--y) * 150px)) scale(0.4);
  }
}

@keyframes earnedPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  25%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(0.9); }
}

/* ==========  ========== */
@media (max-width: 768px) {
  /*  ? */
  .top-bar { padding: 6px 10px; }
  .top-bar .brand { font-size: 0.9rem; letter-spacing: 1px; }
  .top-bar .user-info { gap: 4px; font-size: 0.75rem; }
  .top-bar .btn-small { padding: 2px 6px; font-size: 0.65rem; }
  .top-bar .balance-display { font-size: 0.85rem; }

  /*  ? */
  body.game-page {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /*    */
  .main-area {
    flex-direction: column;
    height: calc(100vh - 42px - 78px);  /* ?~42px + ?~78px */
  }
  .ocean-zone {
    height: 38vh; flex: none;
    min-height: 200px;
  }
  .result-panel {
    width: 100%;
    flex: 1;
    padding: 10px 10px 8px;
    justify-content: flex-start;
    gap: 8px;
    border-left: none;
    border-top: 2px solid var(--gold-dim);
    overflow-y: auto;
  }

  /*    */
  .result-panel .catch-image { width: 90px; height: 90px; }
  .result-panel .catch-name { font-size: 1rem; }
  .result-panel .catch-value { font-size: 1.3rem; }
  .btn-cast { padding: 10px 24px; font-size: 0.95rem; }
  #idleArea .catch-name { font-size: 1rem; }
  #selectedBaitHint { font-size: 0.75rem !important; }

  /*    */
  .collection-area { padding-top: 6px; margin-top: 6px; }
  .collection-title { font-size: 0.7rem; margin-bottom: 4px; }
  .collection-grid { gap: 4px; }
  .collection-item {
    min-width: 40px;
    padding: 2px 4px;
    border-radius: 6px;
  }
  .collection-item img { width: 26px; height: 26px; }
  .collection-item .fish-emoji { font-size: 1.1rem; }
  .collection-item .fish-count { font-size: 0.6rem; }

  /*    */
  .bait-bar {
    padding: 6px 8px;
    gap: 5px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    bottom: 0;
    height: auto;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .bait-bar::-webkit-scrollbar { display: none; }

  .bait-card {
    width: 55px;
    height: 66px;
    flex-shrink: 0;
    gap: 1px;
    border-radius: 8px;
    border-width: 1.5px;
  }
  .bait-card .bait-icon { font-size: 1.4rem; }
  .bait-card .bait-img {
    width: 34px; height: 34px;
  }
  .bait-card .bait-name { font-size: 0.55rem; }
  .bait-card .bait-cost { font-size: 0.6rem; }

  /*  */
  #bait-gold { border-color: rgba(255,215,0,0.6) !important; background: rgba(255,215,0,0.12) !important; }
  #bait-gold .bait-img { filter: drop-shadow(0 0 6px gold); }
  #bait-gold .bait-name { color: #ffd700 !important; }
  #bait-gold .bait-cost { color: #ffd700 !important; }

  /*  idle ? */
  #idleArea {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  #idleArea .catch-name { font-size: 1rem; }
  #selectedBaitHint { font-size: 0.75rem !important; }

  /*  CAST   */
  #btnCast {
    display: inline-block;
    padding: 14px 48px !important;
    font-size: 1.2rem !important;
  }

  /* ?*/
  .cloud { transform: scale(0.5); }
  .cloud::before, .cloud::after { transform: scale(0.5); }

  /* ?*/
  .login-container { padding: 10px; }
  .login-card { padding: 20px 14px; }
  .logo-icon { font-size: 2.6rem; }
  .logo-section h1 { font-size: 1.3rem; }
}

/* ==========================================================
   Dimensional arcade upgrade
   ========================================================== */
.game-page {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 191, 91, 0.16), transparent 32%),
    linear-gradient(180deg, #08243e 0%, #041525 100%);
}

.top-bar {
  min-height: 58px;
  background:
    linear-gradient(180deg, rgba(21, 69, 109, 0.96), rgba(5, 23, 43, 0.98)),
    radial-gradient(circle at 20% 0%, rgba(255, 215, 120, 0.18), transparent 40%);
  border-bottom: 1px solid rgba(255, 215, 120, 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.brand {
  font-size: 1.55rem;
  text-shadow: 0 2px 0 rgba(0,0,0,0.55), 0 0 18px rgba(255, 210, 70, 0.35);
}

.balance-display,
.user-display,
.btn-small {
  border-radius: 10px;
}

.balance-display,
.user-display {
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255,255,255,0.08);
}

.main-area {
  height: calc(100vh - 58px);
  background: linear-gradient(90deg, rgba(2,12,24,0.3), transparent 40%, rgba(0,0,0,0.28));
}

.ocean-zone {
  flex: 1 1 auto;
  min-width: 0;
  background:
    linear-gradient(180deg,
      #78c7e8 0%,
      #a5dff1 19%,
      #f4c487 30%,
      #1c7c98 33%,
      #0f6382 48%,
      #063f61 72%,
      #022139 100%);
  box-shadow: inset -22px 0 38px rgba(0,0,0,0.28);
}

.ocean-zone::before {
  content: '';
  position: absolute;
  inset: 33% 0 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(175deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 38px),
    radial-gradient(ellipse at 50% 18%, rgba(130,230,255,0.22), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.32));
  mix-blend-mode: screen;
  z-index: 1;
}

.ocean-zone::after {
  content: '';
  position: absolute;
  left: -5%;
  right: -5%;
  top: 31%;
  height: 28px;
  background:
    radial-gradient(ellipse at 12% 50%, rgba(255,255,255,0.55), transparent 18%),
    radial-gradient(ellipse at 38% 45%, rgba(255,255,255,0.38), transparent 20%),
    radial-gradient(ellipse at 72% 55%, rgba(255,255,255,0.45), transparent 19%),
    linear-gradient(180deg, rgba(255,255,255,0.4), rgba(66,175,210,0.18));
  filter: blur(1px);
  opacity: 0.78;
  animation: shimmerSea 4s ease-in-out infinite;
  z-index: 4;
}

.sun-glow {
  position: absolute;
  top: 6%;
  left: 12%;
  width: 220px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 224, 146, 0.75), rgba(255, 177, 77, 0.22) 46%, transparent 70%);
  filter: blur(2px);
  z-index: 0;
}

.scene-label {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(2, 20, 36, 0.54);
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.78);
  font-size: 0.84rem;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
  backdrop-filter: blur(8px);
}

.fisherman-stage {
  position: absolute;
  left: 18px;
  bottom: 28px;
  z-index: 18;
  width: min(23vw, 230px);
  min-width: 135px;
  pointer-events: none;
  filter: drop-shadow(0 16px 22px rgba(0,0,0,0.58));
}

.fisherman-stage img {
  width: 100%;
  display: block;
  border-radius: 12px;
  mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 100%);
  opacity: 0.94;
}

.deck-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  z-index: 17;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.18) 0 2px, transparent 2px 58px),
    linear-gradient(180deg, #9b6533 0%, #70401f 45%, #3d2111 100%);
  border-top: 3px solid rgba(244, 199, 123, 0.7);
  box-shadow: inset 0 8px 14px rgba(255,255,255,0.12), 0 -16px 30px rgba(0,0,0,0.24);
}

.water-surface {
  height: 4px;
  background: rgba(231, 250, 255, 0.72);
  box-shadow: 0 -4px 16px rgba(255,255,255,0.34), 0 8px 20px rgba(0,74,120,0.52);
}

.bobber-body {
  box-shadow:
    inset -6px -6px 10px rgba(0,0,0,0.38),
    inset 4px 4px 8px rgba(255,255,255,0.5),
    0 10px 18px rgba(0,0,0,0.45),
    0 0 16px rgba(255,50,0,0.34);
}

.bait-on-hook {
  font-size: 24px;
  text-shadow: 0 4px 9px rgba(0,0,0,0.42);
}

.result-panel {
  width: clamp(360px, 31vw, 460px);
  background:
    linear-gradient(180deg, rgba(8, 29, 51, 0.94), rgba(3, 13, 27, 0.96)),
    radial-gradient(circle at 50% 6%, rgba(255, 214, 110, 0.14), transparent 36%);
  border-left: 1px solid rgba(255, 215, 120, 0.45);
  box-shadow: inset 16px 0 36px rgba(255,255,255,0.03), -18px 0 42px rgba(0,0,0,0.28);
}

.panel-kicker {
  color: rgba(255, 214, 130, 0.7);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.result-panel .catch-image {
  width: 220px;
  height: 220px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 229, 130, 0.22), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 0 40px rgba(255,255,255,0.04), 0 24px 48px rgba(0,0,0,0.34);
}

.result-panel .catch-image img {
  filter: drop-shadow(0 16px 16px rgba(0,0,0,0.42));
}

.result-panel .catch-name {
  text-shadow: 0 2px 0 rgba(0,0,0,0.65), 0 0 22px rgba(255,215,0,0.24);
}

.btn-cast {
  min-width: 190px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffe08a 0%, #d49628 48%, #74470d 100%);
  border: 1px solid rgba(255, 244, 183, 0.9);
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.45),
    inset 0 -6px 12px rgba(59,29,0,0.45),
    0 12px 0 #4b2b08,
    0 18px 30px rgba(0,0,0,0.36);
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn-cast:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
}

.btn-cast:active,
.btn-cast.casting {
  transform: translateY(8px);
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.24),
    inset 0 -4px 10px rgba(59,29,0,0.52),
    0 4px 0 #4b2b08,
    0 10px 18px rgba(0,0,0,0.28);
}

.bait-bar {
  min-height: 146px;
  background:
    linear-gradient(180deg, rgba(11, 36, 57, 0.94), rgba(4, 14, 26, 0.98)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 64px);
  box-shadow: 0 -18px 40px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.08);
}

.bait-card {
  width: 118px;
  height: 126px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.035)),
    radial-gradient(circle at 50% 20%, rgba(255,255,255,0.14), transparent 36%);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -10px 18px rgba(0,0,0,0.18),
    0 10px 20px rgba(0,0,0,0.22);
}

.bait-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 26px rgba(0,0,0,0.28);
}

.bait-card.selected {
  background:
    linear-gradient(180deg, rgba(255, 226, 118, 0.22), rgba(255, 164, 42, 0.08)),
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.26), transparent 36%);
  box-shadow:
    0 0 0 2px rgba(255,215,0,0.58),
    0 18px 34px rgba(255, 187, 58, 0.18),
    0 16px 24px rgba(0,0,0,0.34);
}

.bait-card .bait-img {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 8px 8px rgba(0,0,0,0.42));
}

.bait-card .bait-name {
  font-size: 0.75rem;
  font-weight: 700;
}

.bait-card .bait-cost {
  color: #ffe38c;
}

.collection-area {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
}

.earned-notify {
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 235, 139, 0.28), transparent 42%),
    linear-gradient(180deg, rgba(28,18,0,0.98), rgba(6,4,0,0.98));
}

.game-page {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.main-area {
  height: calc(100vh - 58px - 152px);
  height: calc(100dvh - 58px - 152px);
  min-height: 420px;
}

.result-panel {
  overflow: hidden;
}

@keyframes shimmerSea {
  0%, 100% { transform: translateX(-8px); opacity: 0.58; }
  50% { transform: translateX(10px); opacity: 0.88; }
}

@keyframes pop {
  0% { transform: scale(0.1); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

@media (max-width: 900px) {
  .main-area {
    flex-direction: column;
    height: calc(100vh - 64px - 102px);
    height: calc(100dvh - 64px - 102px);
    min-height: 0;
  }

  .ocean-zone {
    flex: 0 0 min(42vh, 360px);
    height: min(42vh, 360px);
    min-height: 245px;
  }

  .fisherman-stage {
    width: 112px;
    left: 8px;
    bottom: 18px;
  }

  .deck-rail {
    height: 38px;
  }

  .result-panel {
    width: 100%;
    min-width: 0;
    flex: 1;
    min-height: 0;
    border-left: 0;
    border-top: 1px solid rgba(255,215,120,0.45);
    padding: 8px 12px 12px;
    gap: 6px;
    overflow: hidden;
  }

  .panel-kicker {
    display: none;
  }

  .result-panel .catch-image {
    width: 92px;
    height: 92px;
    border-radius: 14px;
  }

  .result-panel .catch-name {
    font-size: 1.05rem;
  }

  .result-panel .catch-value {
    font-size: 1.35rem;
  }

  .collection-area {
    margin-top: 4px;
    padding: 7px;
  }

  .bait-bar {
    min-height: 102px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .bait-card {
    width: 68px;
    height: 78px;
    border-radius: 11px;
  }

  .bait-card .bait-img {
    width: 38px;
    height: 38px;
  }

  .btn-cast {
    min-width: 160px;
    padding: 12px 32px !important;
    font-size: 1rem !important;
  }

  #btnCast {
    min-width: 148px;
    padding: 9px 28px !important;
    font-size: 0.95rem !important;
  }

  .scene-label {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    font-size: 0.72rem;
    padding: 6px 10px;
  }
}

@media (max-width: 900px) and (max-height: 520px) {
  .login-page {
    align-items: flex-start;
    overflow-y: auto;
    min-height: 100dvh;
  }

  .login-container {
    max-width: 420px;
    padding: 8px 12px;
  }

  .login-card {
    padding: 10px 16px;
    border-radius: 14px;
  }

  .logo-icon {
    display: none;
  }

  .logo-section h1 {
    font-size: 1.25rem;
  }

  .subtitle {
    margin: 2px 0 6px;
  }

  .login-form {
    gap: 6px;
  }

  .form-group label {
    font-size: 0.72rem;
    margin-bottom: 2px;
  }

  .form-group input {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 16px;
  }

  .btn-enter {
    min-height: 42px;
    padding: 8px;
  }

  .login-footer {
    display: none;
  }

  .error-message {
    min-height: 14px;
    margin-top: 6px;
  }

  .top-bar {
    padding: 5px 10px;
    min-height: 46px;
  }

  .brand {
    font-size: 1rem;
  }

  .user-info {
    gap: 6px;
    font-size: 0.75rem;
  }

  .btn-small {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  .main-area {
    flex-direction: row;
    height: calc(100vh - 48px - 86px);
    height: calc(100dvh - 48px - 86px);
    min-height: 0;
  }

  .ocean-zone {
    flex: 1 1 auto;
    width: auto;
    height: auto;
    min-height: 0;
  }

  .result-panel {
    flex: 0 0 300px;
    width: 300px;
    min-width: 260px;
    height: auto;
    border-top: 0;
    border-left: 1px solid rgba(255,215,120,0.45);
    padding: 6px 10px;
    gap: 4px;
  }

  .result-panel .catch-image {
    width: 58px;
    height: 58px;
  }

  .result-panel .catch-name {
    font-size: 0.9rem;
  }

  #selectedBaitHint {
    font-size: 0.68rem !important;
  }

  #idleArea {
    gap: 5px;
  }

  #btnCast {
    min-width: 132px;
    min-height: 34px;
    padding: 7px 22px !important;
    font-size: 0.86rem !important;
  }

  .collection-area {
    display: none;
  }

  .scene-label {
    top: 8px;
    left: 8px;
    max-width: 62%;
  }

  .fisherman-stage {
    width: 92px;
    bottom: 12px;
  }

  .deck-rail {
    height: 30px;
  }

  .bait-bar {
    min-height: 86px;
    height: 86px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .bait-card {
    width: 58px;
    height: 68px;
    flex: 0 0 58px;
  }

  .bait-card .bait-img {
    width: 32px;
    height: 32px;
  }

  .bait-card .bait-name {
    font-size: 0.54rem;
  }

  .bait-card .bait-cost {
    font-size: 0.58rem;
  }
}

@media (max-width: 480px) and (min-height: 560px) {
  .top-bar {
    gap: 6px;
  }

  .user-info {
    min-width: 0;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .user-display {
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-area {
    height: calc(100vh - 64px - 94px);
    height: calc(100dvh - 64px - 94px);
  }

  .result-panel {
    padding: 7px 10px 8px;
    gap: 4px;
  }

  .result-panel .catch-image {
    width: 68px;
    height: 68px;
  }

  .result-panel .catch-name {
    font-size: 0.95rem;
  }

  #idleArea {
    gap: 4px;
  }

  #idleArea > div[style*="margin-top"] {
    margin-top: 4px !important;
  }

  #btnCast {
    min-width: 136px;
    min-height: 34px;
    padding: 7px 24px !important;
    font-size: 0.9rem !important;
  }

  .bait-bar {
    min-height: 94px;
    height: 94px;
    gap: 4px;
    justify-content: space-between;
    overflow: hidden;
  }

  .bait-card {
    width: 44px;
    height: 74px;
    flex: 0 0 44px;
    gap: 1px;
    border-radius: 9px;
  }

  .bait-card.selected {
    transform: translateY(-3px) scale(1.01);
  }

  .bait-card .bait-img {
    width: 28px;
    height: 28px;
  }

  .bait-card .bait-name {
    max-width: 42px;
    font-size: 0.48rem;
    line-height: 1.05;
  }

  .bait-card .bait-cost {
    font-size: 0.52rem;
  }
}

@media (max-width: 480px) and (max-height: 700px) {
  .collection-area {
    display: none;
  }
}

/* ==========================================================
   First-person sea fishing immersion
   ========================================================== */
.ocean-zone {
  background:
    linear-gradient(180deg, rgba(124, 204, 230, 0.16) 0%, rgba(4, 24, 39, 0.1) 35%, rgba(0, 10, 18, 0.32) 100%),
    url("../assets/scenes/ocean_scene.jpg") center 48% / cover no-repeat,
    linear-gradient(180deg, #9fd8eb 0%, #276e86 45%, #092b43 100%);
  isolation: isolate;
  perspective: 1000px;
}

.ocean-zone::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent 32%),
    radial-gradient(ellipse at 50% 35%, rgba(255,255,255,0.18), transparent 48%);
  mix-blend-mode: screen;
  opacity: 0.58;
  animation: realisticWaveDrift 7s ease-in-out infinite;
}

.ocean-zone::after {
  background:
    repeating-linear-gradient(172deg, rgba(255,255,255,0.16) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, transparent 0%, rgba(0, 35, 56, 0.36) 58%, rgba(1, 8, 14, 0.72) 100%);
  opacity: 0.42;
}

.sea-horizon {
  position: absolute;
  left: 0;
  right: 0;
  top: 31%;
  height: 2px;
  z-index: 5;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.75), transparent);
  box-shadow: 0 0 18px rgba(255,255,255,0.5), 0 12px 22px rgba(255,255,255,0.18);
}

.lens-flare {
  position: absolute;
  top: 8%;
  right: 16%;
  width: 220px;
  height: 220px;
  z-index: 3;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 244, 190, 0.5), rgba(255, 214, 120, 0.16) 34%, transparent 66%);
  filter: blur(1px);
  opacity: 0.74;
  animation: lensPulse 5.2s ease-in-out infinite;
}

.water-vignette {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 0%, transparent 48%, rgba(0,0,0,0.26) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.26), transparent 18%, transparent 82%, rgba(0,0,0,0.2));
}

.water-foam {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 92px;
  height: 68px;
  z-index: 17;
  opacity: 0.78;
  background:
    radial-gradient(ellipse at 18% 55%, rgba(255,255,255,0.44), transparent 38%),
    radial-gradient(ellipse at 48% 58%, rgba(255,255,255,0.34), transparent 34%),
    radial-gradient(ellipse at 76% 45%, rgba(255,255,255,0.28), transparent 36%),
    linear-gradient(180deg, transparent, rgba(255,255,255,0.18), transparent);
  filter: blur(1.2px);
  animation: foamSlide 6s ease-in-out infinite;
}

.boat-gunwale {
  position: absolute;
  left: -3%;
  right: -3%;
  bottom: 42px;
  height: 92px;
  z-index: 24;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.28), transparent 18%, transparent 82%, rgba(0,0,0,0.32)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 90px),
    linear-gradient(180deg, #b97f42 0%, #8a552a 38%, #573017 74%, #27150a 100%);
  border-top: 3px solid rgba(255, 221, 148, 0.66);
  box-shadow: inset 0 12px 16px rgba(255,255,255,0.12), 0 -18px 40px rgba(0, 0, 0, 0.28);
  transform: perspective(900px) rotateX(7deg);
  transform-origin: bottom;
}

.deck-rail {
  z-index: 25;
  height: 42px;
  background:
    linear-gradient(180deg, rgba(255, 216, 138, 0.4), rgba(120, 68, 30, 0.86)),
    linear-gradient(90deg, #3c2413, #8d5a2d 22%, #c08749 50%, #74431f 78%, #2d180c);
  border-top-color: rgba(255, 232, 166, 0.86);
}

.rod-perspective {
  position: absolute;
  right: 2%;
  bottom: 36px;
  width: 44%;
  height: 58%;
  z-index: 31;
  pointer-events: none;
  transform: rotate(-13deg);
  transform-origin: 100% 100%;
  filter: drop-shadow(0 14px 14px rgba(0,0,0,0.45));
}

.rod-perspective::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 9px;
  height: 100%;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.25), transparent 45%),
    linear-gradient(180deg, #18110d 0%, #423022 32%, #15100e 100%);
  transform: skewX(-10deg);
}

.rod-perspective::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 2%;
  width: 2px;
  height: 86%;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(236, 247, 255, 0.72), rgba(255,255,255,0.22));
  transform: translateX(-18vw) rotate(12deg);
  box-shadow: 0 0 8px rgba(255,255,255,0.32);
}

.reel-handle {
  position: absolute;
  right: -18px;
  bottom: 14%;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 7px solid rgba(36, 31, 28, 0.94);
  background: radial-gradient(circle, #e2c17b 0 18%, #2a211b 20% 38%, transparent 40%);
  box-shadow: inset 0 0 12px rgba(255,255,255,0.18), 0 8px 18px rgba(0,0,0,0.42);
}

.reel-handle::after {
  content: "";
  position: absolute;
  right: -22px;
  top: 18px;
  width: 30px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e1c27a, #6b4b22);
  box-shadow: 0 3px 8px rgba(0,0,0,0.38);
}

.line-depth-marker {
  position: absolute;
  left: 50%;
  top: 35%;
  width: 2px;
  height: 34%;
  z-index: 19;
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.24), rgba(255,255,255,0.08));
  box-shadow: 0 0 8px rgba(255,255,255,0.42);
  transform: translateX(-50%);
  animation: lineTension 3.2s ease-in-out infinite;
}

.deck-hands {
  position: absolute;
  right: 4%;
  bottom: 42px;
  width: 118px;
  height: 72px;
  z-index: 32;
  pointer-events: none;
  opacity: 0.94;
  background:
    radial-gradient(ellipse at 28% 68%, #8a5f3e 0 18%, transparent 19%),
    radial-gradient(ellipse at 64% 60%, #9b6c47 0 20%, transparent 21%),
    linear-gradient(180deg, transparent 0 42%, rgba(35, 25, 20, 0.9) 43% 100%);
  filter: drop-shadow(0 10px 10px rgba(0,0,0,0.34));
}

.fisherman-stage {
  z-index: 26;
  left: 14px;
  bottom: 62px;
  opacity: 0.78;
  transform: perspective(700px) rotateY(8deg);
}

.fisherman-stage img {
  border-radius: 10px;
  mask-image: linear-gradient(180deg, #000 0%, #000 64%, transparent 100%);
}

.water-surface {
  top: 35%;
  z-index: 14;
  height: 3px;
  background: rgba(235, 252, 255, 0.74);
  box-shadow: 0 -6px 24px rgba(255,255,255,0.35), 0 10px 22px rgba(7, 59, 91, 0.38);
}

.underwater,
.seaweed,
.coral,
.rock {
  opacity: 0.28;
  filter: blur(0.4px) saturate(0.7);
}

.ocean-zone .bobber {
  z-index: 22;
  filter: drop-shadow(0 15px 14px rgba(0,0,0,0.36));
}

.bobber-body {
  border: 1px solid rgba(255,255,255,0.54);
}

.bait-on-hook {
  z-index: 21;
  filter: drop-shadow(0 8px 8px rgba(0,0,0,0.42));
}

.scene-label {
  z-index: 33;
  background: rgba(4, 19, 31, 0.64);
  border: 1px solid rgba(203, 239, 255, 0.24);
  backdrop-filter: blur(8px);
}

.ocean-zone.mode-casting .rod-perspective,
.ocean-zone.mode-bite .rod-perspective,
.ocean-zone.mode-caught .rod-perspective {
  animation: rodLoad 0.55s ease-in-out infinite;
}

.ocean-zone.mode-waiting .line-depth-marker {
  animation-duration: 1.8s;
  opacity: 0.9;
}

.ocean-zone.mode-bite .line-depth-marker,
.ocean-zone.mode-caught .line-depth-marker {
  animation: lineStrike 0.22s ease-in-out infinite;
  background: rgba(255,255,255,0.95);
}

.ocean-zone.mode-bite .water-foam,
.ocean-zone.mode-caught .water-foam {
  opacity: 1;
  filter: blur(0.6px) brightness(1.2);
}

@keyframes realisticWaveDrift {
  0%, 100% { transform: translate3d(-10px, 0, 0) scale(1.01); opacity: 0.44; }
  50% { transform: translate3d(12px, 4px, 0) scale(1.03); opacity: 0.72; }
}

@keyframes lensPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.52; }
  50% { transform: scale(1.08); opacity: 0.82; }
}

@keyframes foamSlide {
  0%, 100% { transform: translateX(-18px); opacity: 0.58; }
  50% { transform: translateX(22px); opacity: 0.88; }
}

@keyframes lineTension {
  0%, 100% { transform: translateX(-50%) rotate(-1deg); }
  50% { transform: translateX(-50%) rotate(1.5deg); }
}

@keyframes lineStrike {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-5deg); }
  50% { transform: translateX(-50%) translateY(8px) rotate(5deg); }
}

@keyframes rodLoad {
  0%, 100% { transform: rotate(-13deg) translateY(0); }
  50% { transform: rotate(-11deg) translateY(8px); }
}

@media (max-width: 900px) {
  .lens-flare {
    width: 150px;
    height: 150px;
    right: 6%;
    top: 6%;
  }

  .rod-perspective {
    right: -8%;
    bottom: 24px;
    width: 48%;
    height: 54%;
  }

  .deck-hands {
    right: -6px;
    bottom: 32px;
    width: 90px;
    height: 58px;
  }

  .boat-gunwale {
    height: 72px;
    bottom: 30px;
  }

  .water-foam {
    bottom: 72px;
    height: 52px;
  }

  .fisherman-stage {
    width: 96px;
    bottom: 48px;
  }
}

@media (max-width: 480px) {
  .sea-horizon {
    top: 30%;
  }

  .rod-perspective {
    right: -18%;
    bottom: 18px;
    height: 50%;
  }

  .reel-handle {
    width: 46px;
    height: 46px;
    right: -8px;
    border-width: 5px;
  }

  .deck-hands {
    display: none;
  }

  .boat-gunwale {
    height: 58px;
    bottom: 28px;
  }

  .deck-rail {
    height: 30px;
  }

  .water-foam {
    bottom: 58px;
  }

  .fisherman-stage {
    width: 82px;
    bottom: 42px;
    opacity: 0.66;
  }

  .line-depth-marker {
    height: 28%;
  }
}

@media (max-width: 900px) and (max-height: 520px) {
  .rod-perspective {
    right: -4%;
    bottom: 18px;
    height: 58%;
  }

  .boat-gunwale {
    height: 54px;
    bottom: 28px;
  }

  .water-foam {
    bottom: 56px;
    height: 38px;
  }

  .fisherman-stage {
    width: 72px;
    bottom: 38px;
  }
}

/* ==========================================================
   Generated realistic fishing scene assets
   ========================================================== */
.ocean-zone {
  background:
    linear-gradient(180deg, rgba(4, 18, 29, 0.1), rgba(2, 11, 18, 0.38)),
    url("../assets/realistic/sea-fishing-bg-v1.png") center 55% / cover no-repeat,
    #0b3346;
}

.realism-backdrop,
.realism-depth-haze,
.rod-image-layer,
.strike-splash-layer,
.water-impact-layer,
.catch-focus-flash,
.reel-tension-meter {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.realism-backdrop {
  z-index: 1;
  background: url("../assets/realistic/sea-fishing-bg-v1.png") center 55% / cover no-repeat;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.02);
  animation: generatedSeaDrift 14s ease-in-out infinite;
}

.realism-depth-haze {
  z-index: 9;
  background:
    radial-gradient(ellipse at 72% 14%, rgba(255, 246, 207, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 34%, rgba(2, 13, 22, 0.28) 100%),
    radial-gradient(ellipse at 50% 78%, transparent 0%, transparent 56%, rgba(0,0,0,0.28) 100%);
  mix-blend-mode: soft-light;
}

.rod-image-layer {
  z-index: 34;
  background: url("../assets/realistic/rod-foreground-v1.png") center bottom / cover no-repeat;
  filter: drop-shadow(0 18px 18px rgba(0,0,0,0.34));
  transform-origin: 86% 84%;
  animation: rodImageSway 4.6s ease-in-out infinite;
}

.strike-splash-layer {
  z-index: 30;
  opacity: 0;
  background: url("../assets/realistic/splash-strike-v1.png") 50% 58% / clamp(260px, 52vw, 740px) auto no-repeat;
  transform: translate3d(0, 10px, 0) scale(0.78);
  filter:
    drop-shadow(0 20px 24px rgba(0, 18, 28, 0.36))
    drop-shadow(0 0 20px rgba(206, 244, 255, 0.32));
}

.water-impact-layer {
  z-index: 29;
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 57%, rgba(255,255,255,0.86) 0%, rgba(170,230,255,0.5) 16%, transparent 39%),
    radial-gradient(ellipse at 50% 61%, rgba(26, 92, 122, 0.45) 0%, transparent 52%);
  transform: translate3d(0, 18px, 0) scale(0.58);
  filter: blur(0.4px);
}

.catch-focus-flash {
  z-index: 40;
  opacity: 0;
  background:
    radial-gradient(ellipse at 54% 42%, rgba(255,255,255,0.44), rgba(177, 230, 255, 0.16) 28%, transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.12), transparent 38%);
  mix-blend-mode: screen;
}

.reel-tension-meter {
  left: auto;
  right: 18px;
  top: 18%;
  bottom: auto;
  width: 8px;
  height: min(180px, 38%);
  z-index: 42;
  opacity: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,214,64,0.86), rgba(255,75,52,0.92)),
    rgba(255,255,255,0.18);
  box-shadow:
    0 0 18px rgba(255,255,255,0.38),
    inset 0 0 0 1px rgba(255,255,255,0.3);
  transform-origin: bottom;
}

.ocean-zone.impact-cast .water-impact-layer {
  animation: waterImpactCast 0.82s ease-out;
}

.ocean-zone.impact-bite .water-impact-layer {
  animation: waterImpactBite 0.72s ease-out;
}

.ocean-zone.impact-catch .water-impact-layer {
  animation: waterImpactCatch 1.05s cubic-bezier(0.18, 0.9, 0.22, 1);
}

.ocean-zone.impact-bite,
.ocean-zone.impact-catch {
  animation: cameraKick 0.42s ease-out;
}

.ocean-zone.impact-catch .catch-focus-flash {
  animation: catchFocusFlash 0.9s ease-out;
}

.ocean-zone.tension-active .reel-tension-meter {
  animation: tensionPulse 0.42s ease-in-out infinite;
}

.ocean-zone.tension-common .reel-tension-meter {
  height: min(120px, 28%);
}

.ocean-zone.tension-medium .reel-tension-meter {
  height: min(150px, 34%);
}

.ocean-zone.tension-large .reel-tension-meter,
.ocean-zone.tension-rare .reel-tension-meter {
  height: min(190px, 42%);
}

.ocean-zone.tension-rare .reel-tension-meter {
  width: 10px;
  box-shadow:
    0 0 24px rgba(255,215,0,0.7),
    0 0 42px rgba(255,255,255,0.28),
    inset 0 0 0 1px rgba(255,255,255,0.44);
}

.ocean-zone.mode-bite .strike-splash-layer,
.ocean-zone.mode-caught .strike-splash-layer {
  opacity: 1;
  animation: strikeSplashBurst 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) infinite;
}

.ocean-zone.mode-casting .rod-image-layer {
  animation: rodImageCast 0.74s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ocean-zone.mode-bite .rod-image-layer,
.ocean-zone.mode-caught .rod-image-layer {
  animation: rodImageStrike 0.36s ease-in-out infinite;
}

.cloud,
.underwater,
.seaweed,
.coral,
.rock,
.fisherman-stage {
  display: none;
}

.rod-perspective,
.deck-hands,
.boat-gunwale,
.deck-rail {
  opacity: 0;
}

.water-foam {
  z-index: 28;
  bottom: 13%;
  opacity: 0.32;
  filter: blur(1px) brightness(1.25);
}

.swim-fish {
  z-index: 12;
  opacity: 0.18;
  mix-blend-mode: multiply;
  filter: blur(1.2px) saturate(0.55) brightness(0.62);
}

.swim-fish img {
  filter: drop-shadow(0 10px 14px rgba(0, 18, 28, 0.45));
}

.sea-horizon {
  z-index: 10;
  top: 34%;
  opacity: 0.54;
}

.lens-flare {
  z-index: 11;
  top: 4%;
  right: 4%;
  opacity: 0.5;
}

.water-vignette {
  z-index: 36;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 0%, transparent 62%, rgba(0,0,0,0.24) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.18), transparent 20%, transparent 82%, rgba(0,0,0,0.18));
}

.line,
.bait-on-hook,
.bobber,
.line-depth-marker,
.scene-label {
  position: absolute;
}

.line {
  z-index: 37;
}

.bait-on-hook,
.bobber,
.line-depth-marker {
  z-index: 38;
}

.scene-label {
  z-index: 41;
}

@keyframes generatedSeaDrift {
  0%, 100% { transform: scale(1.02) translate3d(-4px, 0, 0); }
  50% { transform: scale(1.035) translate3d(6px, 3px, 0); }
}

@keyframes rodImageSway {
  0%, 100% { transform: rotate(-0.25deg) translate3d(0, 0, 0); }
  50% { transform: rotate(0.35deg) translate3d(0, 4px, 0); }
}

@keyframes rodImageCast {
  0% { transform: rotate(0deg) translate3d(0, 0, 0); }
  45% { transform: rotate(-2.5deg) translate3d(-12px, -10px, 0); }
  100% { transform: rotate(0deg) translate3d(0, 0, 0); }
}

@keyframes rodImageStrike {
  0%, 100% { transform: rotate(-0.5deg) translate3d(0, 0, 0); }
  50% { transform: rotate(1.15deg) translate3d(6px, 9px, 0); }
}

@keyframes strikeSplashBurst {
  0% { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.62); }
  18% { opacity: 1; transform: translate3d(0, 0, 0) scale(1.04); }
  66% { opacity: 0.92; transform: translate3d(0, -6px, 0) scale(0.98); }
  100% { opacity: 0; transform: translate3d(0, -12px, 0) scale(1.12); }
}

@keyframes waterImpactCast {
  0% { opacity: 0; transform: translate3d(-4%, 18px, 0) scale(0.28); }
  34% { opacity: 0.78; transform: translate3d(-1%, 4px, 0) scale(0.72); }
  100% { opacity: 0; transform: translate3d(0, -12px, 0) scale(1.28); }
}

@keyframes waterImpactBite {
  0% { opacity: 0; transform: translate3d(0, 12px, 0) scale(0.42); }
  28% { opacity: 1; transform: translate3d(0, 0, 0) scale(0.9); }
  100% { opacity: 0; transform: translate3d(0, -18px, 0) scale(1.45); }
}

@keyframes waterImpactCatch {
  0% { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.36); filter: blur(0.2px); }
  18% { opacity: 1; transform: translate3d(0, 2px, 0) scale(1.12); filter: blur(0); }
  58% { opacity: 0.76; transform: translate3d(0, -8px, 0) scale(1.36); }
  100% { opacity: 0; transform: translate3d(0, -24px, 0) scale(1.72); filter: blur(1.2px); }
}

@keyframes catchFocusFlash {
  0% { opacity: 0; }
  16% { opacity: 0.88; }
  100% { opacity: 0; }
}

@keyframes cameraKick {
  0%, 100% { transform: translate3d(0, 0, 0); }
  18% { transform: translate3d(-7px, 4px, 0) rotate(-0.22deg); }
  42% { transform: translate3d(6px, -3px, 0) rotate(0.18deg); }
  70% { transform: translate3d(-3px, 1px, 0) rotate(-0.08deg); }
}

@keyframes tensionPulse {
  0%, 100% { opacity: 0.36; transform: scaleY(0.88); }
  50% { opacity: 0.92; transform: scaleY(1); }
}

@media (max-width: 900px) {
  .realism-backdrop,
  .ocean-zone {
    background-position: center 54%;
  }

  .rod-image-layer {
    background-size: auto 108%;
    background-position: 54% 100%;
  }

  .strike-splash-layer {
    background-size: clamp(230px, 64vw, 560px) auto;
    background-position: 50% 57%;
  }

  .reel-tension-meter {
    right: 10px;
    top: 16%;
  }
}

@media (max-width: 480px) {
  .realism-backdrop,
  .ocean-zone {
    background-position: center 52%;
  }

  .rod-image-layer {
    background-size: auto 100%;
    background-position: 58% 100%;
  }

  .strike-splash-layer {
    background-size: clamp(210px, 78vw, 420px) auto;
    background-position: 48% 56%;
  }

  .water-foam {
    bottom: 12%;
    height: 42px;
  }

  .reel-tension-meter {
    right: 8px;
    width: 6px;
    height: min(128px, 30%);
  }

  .ocean-zone.impact-bite,
  .ocean-zone.impact-catch {
    animation-duration: 0.3s;
  }
}

/* ==========================================================
   Boat-deck layout compression and catch landing scene
   ========================================================== */
.game-page {
  background:
    linear-gradient(180deg, rgba(8, 20, 28, 0.2), rgba(5, 10, 14, 0.82)),
    url("../assets/realistic/sea-fishing-bg-v1.png") center / cover fixed no-repeat,
    #07131a;
}

.main-area {
  height: calc(100svh - 52px - 96px);
  min-height: 520px;
  background: linear-gradient(180deg, rgba(9, 24, 32, 0.28), rgba(4, 9, 12, 0.54));
}

.result-panel {
  width: min(360px, 28vw);
  min-width: 300px;
  padding: 18px 16px 112px;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(10, 28, 34, 0.72), rgba(5, 13, 16, 0.82)),
    radial-gradient(ellipse at 50% 0%, rgba(255, 220, 140, 0.12), transparent 60%);
  border-left: 1px solid rgba(237, 209, 145, 0.38);
  backdrop-filter: blur(12px) saturate(1.08);
  box-shadow: inset 1px 0 rgba(255,255,255,0.08), -18px 0 42px rgba(0,0,0,0.18);
}

.result-panel .catch-image {
  width: 148px;
  height: 148px;
}

.result-panel .catch-value {
  font-size: 1.55rem;
}

.collection-area {
  margin-top: 6px;
  padding-top: 10px;
}

.bait-bar {
  min-height: 96px;
  height: 96px;
  padding: 8px 18px;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(44, 33, 22, 0.92), rgba(14, 18, 20, 0.96)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 88px),
    linear-gradient(90deg, #5b3b22, #8a633a 34%, #2d2118 100%);
  border-top: 1px solid rgba(255, 230, 170, 0.5);
  box-shadow: 0 -12px 32px rgba(0,0,0,0.36), inset 0 1px rgba(255,255,255,0.16);
}

.bait-card {
  width: 92px;
  height: 78px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.11), rgba(0,0,0,0.14)),
    rgba(16, 25, 28, 0.74);
}

.bait-card .bait-img {
  width: 34px;
  height: 34px;
}

.bait-card .bait-name {
  max-width: 86px;
  font-size: 0.62rem;
  line-height: 1.05;
}

.bait-card .bait-cost {
  font-size: 0.66rem;
}

.boat-deck-overlay,
.wake-shadow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wake-shadow-layer {
  z-index: 13;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(255,255,255,0.22), transparent 22%),
    linear-gradient(180deg, transparent 0 58%, rgba(2, 12, 18, 0.34) 100%);
  mix-blend-mode: screen;
  opacity: 0.72;
  animation: boatWakeBreath 5.8s ease-in-out infinite;
}

.boat-deck-overlay {
  z-index: 33;
  top: auto;
  height: 23%;
  min-height: 92px;
  background:
    linear-gradient(180deg, rgba(255,218,148,0.2), transparent 14%, rgba(12,6,3,0.44) 100%),
    repeating-linear-gradient(94deg, transparent 0 108px, rgba(22,10,4,0.7) 109px 113px, rgba(221,157,83,0.12) 114px 116px),
    repeating-linear-gradient(0deg, rgba(255,220,158,0.035) 0 2px, transparent 2px 8px),
    linear-gradient(90deg, #2d190d 0%, #65401f 24%, #8a5a2d 48%, #5a3419 73%, #241208 100%);
  border-top: 3px solid rgba(199,139,72,0.82);
  box-shadow: 0 -18px 38px rgba(0,18,28,0.3), inset 0 8px 18px rgba(255,202,123,0.14), inset 0 -18px 28px rgba(16,7,3,0.36);
  transform: perspective(900px) rotateX(8deg);
  transform-origin: bottom;
}

.ocean-zone.rod-whip-active .rod-image-layer {
  animation: rodWhipCast 0.86s cubic-bezier(0.2, 0.9, 0.16, 1) both;
}

.ocean-zone.rod-whip-active .line,
.ocean-zone.rod-whip-active .bait-on-hook {
  animation: lineSnapForward 0.62s ease-out both;
}

.landing-fish-scene {
  position: fixed;
  inset: 0;
  z-index: 10005;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 56%, rgba(255,255,255,0.18), transparent 24%),
    linear-gradient(180deg, transparent 0 48%, rgba(5, 11, 14, 0.58) 100%);
  animation: landingSceneFade 1s ease-out forwards;
}

.landing-deck-sheen {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -2%;
  height: 28%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.34), rgba(210,206,192,0.86) 26%, rgba(86,70,54,0.96) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 2px, transparent 2px 110px);
  border-top: 3px solid rgba(255,255,255,0.76);
  transform: perspective(800px) rotateX(8deg);
  transform-origin: bottom;
}

.landing-line {
  position: absolute;
  left: 52%;
  top: -4%;
  width: 2px;
  height: 56%;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.92));
  box-shadow: 0 0 12px rgba(255,255,255,0.6);
  transform: rotate(-10deg);
  animation: landingLinePull 0.92s ease-out forwards;
}

.landing-fish-card {
  position: absolute;
  left: 50%;
  top: 58%;
  width: min(230px, 44vw);
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,0.26), transparent 54%),
    linear-gradient(180deg, rgba(4, 18, 24, 0.18), rgba(0,0,0,0.34));
  filter: drop-shadow(0 28px 24px rgba(0,0,0,0.46));
  transform: translate(-50%, 40%) scale(0.2) rotate(-18deg);
  animation: fishLandingArc 0.9s cubic-bezier(0.18, 1.18, 0.25, 1) forwards;
}

.landing-fish-card img {
  width: min(190px, 38vw);
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(210,245,255,0.64)) drop-shadow(0 16px 14px rgba(0,0,0,0.42));
  animation: landedFishThrash 0.22s ease-in-out infinite;
}

.landing-callout {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe89c, #b47824);
  color: #1b1004;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 1px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.34);
}

.landing-fish-card strong {
  position: absolute;
  bottom: -24px;
  color: #fff4bc;
  font-size: clamp(1rem, 3vw, 1.45rem);
  text-shadow: 0 2px 12px rgba(0,0,0,0.8), 0 0 18px rgba(255,216,92,0.42);
}

.landing-spray {
  position: absolute;
  left: 50%;
  top: 64%;
  width: 160px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(210, 246, 255, 0.88);
  transform: translate(-50%, -50%) scale(0.25);
  opacity: 0;
  box-shadow: 0 0 24px rgba(195,240,255,0.44);
  animation: deckSprayPop 0.82s ease-out forwards;
}

.landing-spray-b {
  animation-delay: 0.14s;
  border-color: rgba(255,255,255,0.72);
}

.landing-jackpot .landing-fish-card {
  width: min(300px, 56vw);
}

.landing-jackpot .landing-fish-card img {
  width: min(250px, 50vw);
  filter: drop-shadow(0 0 34px rgba(255,220,80,0.8)) drop-shadow(0 18px 16px rgba(0,0,0,0.48));
}

@keyframes boatWakeBreath {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.48; }
  50% { transform: translateY(4px) scale(1.03); opacity: 0.78; }
}

@keyframes rodWhipCast {
  0% { transform: rotate(0deg) translate3d(0, 0, 0) scale(1); }
  24% { transform: rotate(-5deg) translate3d(-34px, -24px, 0) scale(1.02); }
  52% { transform: rotate(3.5deg) translate3d(16px, 10px, 0) scale(0.99); }
  100% { transform: rotate(0deg) translate3d(0, 0, 0) scale(1); }
}

@keyframes lineSnapForward {
  0% { transform: translate(-50%, 0) rotate(-6deg); }
  52% { transform: translate(-50%, 70px) rotate(8deg); }
  100% { transform: translate(-50%, 0) rotate(0deg); }
}

@keyframes landingSceneFade {
  0% { opacity: 0; }
  12% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes landingLinePull {
  0% { transform: translateY(-28%) rotate(-18deg); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(16%) rotate(-8deg); opacity: 0.85; }
}

@keyframes fishLandingArc {
  0% { opacity: 0; transform: translate(-50%, 72%) scale(0.18) rotate(-24deg); }
  24% { opacity: 1; transform: translate(-50%, -48%) scale(1.2) rotate(12deg); }
  58% { transform: translate(-50%, -14%) scale(1.02) rotate(-8deg); }
  100% { opacity: 1; transform: translate(-50%, -8%) scale(1.06) rotate(2deg); }
}

@keyframes landedFishThrash {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-4px); }
}

@keyframes deckSprayPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.18); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.6); }
}

@media (max-width: 768px) {
  .main-area {
    height: calc(100svh - 42px - 78px);
    min-height: 0;
  }

  .ocean-zone {
    height: min(62vh, calc(100svh - 220px));
    min-height: 300px;
  }

  .result-panel {
    max-height: 142px;
    min-height: 116px;
    padding: 8px 10px 6px;
    overflow: hidden;
    gap: 5px;
    background:
      linear-gradient(180deg, rgba(20, 34, 34, 0.7), rgba(8, 14, 15, 0.74)),
      linear-gradient(90deg, rgba(111,80,43,0.22), transparent 50%, rgba(111,80,43,0.18));
    backdrop-filter: blur(10px);
  }

  .result-panel .catch-image {
    width: 62px;
    height: 62px;
  }

  .result-panel .panel-kicker,
  .collection-area {
    display: none;
  }

  #idleArea {
    gap: 5px;
  }

  .btn-cast {
    min-height: 34px;
    padding: 7px 24px;
  }

  .boat-deck-overlay {
    height: 19%;
    min-height: 74px;
  }
}

@media (max-width: 480px) {
  .bait-bar {
    min-height: 78px;
    height: 78px;
    padding: 5px 6px;
  }

  .bait-card {
    width: 45px;
    height: 66px;
    flex: 0 0 45px;
  }

  .bait-card .bait-img {
    width: 25px;
    height: 25px;
  }

  .bait-card .bait-name {
    max-width: 43px;
    font-size: 0.46rem;
  }

  .bait-card .bait-cost {
    font-size: 0.52rem;
  }

  .landing-fish-card {
    top: 55%;
    width: min(210px, 72vw);
    min-height: 136px;
  }

  .landing-fish-card img {
    width: min(168px, 62vw);
    max-height: 122px;
  }

  .landing-deck-sheen {
    height: 25%;
  }
}

/* ==========================================================
   Mobile cast visibility and metal fishing bucket
   ========================================================== */
.fishing-bucket-wrapper {
  position: relative;
  width: 132px;
  height: 136px;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.fishing-bucket-handle {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 86px;
  height: 54px;
  border: 5px solid #c9d4dc;
  border-bottom: 0;
  border-radius: 50px 50px 0 0;
  transform: translateX(-50%);
  box-shadow:
    inset 0 2px rgba(255,255,255,0.8),
    0 5px 8px rgba(0,0,0,0.28);
}

.fishing-bucket {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 104px;
  height: 92px;
  transform: translateX(-50%);
  border-radius: 18px 18px 26px 26px;
  background: linear-gradient(90deg, #768894 0%, #dce6eb 18%, #9aaab4 42%, #f7fbfd 55%, #82919a 78%, #596872 100%);
  border: 2px solid rgba(255,255,255,0.76);
  box-shadow:
    inset 10px 0 18px rgba(255,255,255,0.22),
    inset -12px 0 20px rgba(0,0,0,0.24),
    inset 0 -16px 22px rgba(49,64,72,0.42),
    0 14px 24px rgba(0,0,0,0.42);
  overflow: hidden;
}

.fishing-bucket-rim {
  position: absolute;
  left: -7px;
  right: -7px;
  top: -8px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #c7d3db 42%, #6b7e88 100%);
  border: 2px solid rgba(255,255,255,0.88);
  box-shadow: 0 5px 9px rgba(0,0,0,0.28);
}

.fishing-bucket-water {
  position: absolute;
  left: 11px;
  right: 11px;
  top: 13px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 35% 35%, rgba(255,255,255,0.86), transparent 26%),
    linear-gradient(180deg, rgba(129,220,247,0.94), rgba(34,111,151,0.92));
  box-shadow: inset 0 -5px 10px rgba(0,42,72,0.34), 0 2px 7px rgba(20,120,160,0.34);
}

.fishing-bucket-label {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(18, 29, 34, 0.6);
  color: rgba(255,255,255,0.86);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.fishing-bucket-shadow {
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 108px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,0.34);
  filter: blur(5px);
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .result-panel {
    max-height: 168px;
    min-height: 142px;
    overflow: visible;
    padding-bottom: 8px;
  }

  .result-panel .catch-image:empty {
    display: none;
  }

  #idleArea {
    min-height: 82px;
    justify-content: center;
    gap: 6px;
  }

  #idleArea .catch-name {
    font-size: 0.92rem;
    line-height: 1.1;
    margin: 0;
  }

  #idleArea > div[style*="margin-top"] {
    margin-top: 3px !important;
  }

  #selectedBaitHint {
    font-size: 0.68rem !important;
    line-height: 1.1;
    min-height: 0;
  }

  #btnCast {
    display: inline-block;
    min-width: 118px;
    min-height: 36px;
    padding: 8px 22px !important;
    font-size: 0.92rem !important;
    line-height: 1;
  }
}

@media (max-width: 480px) {
  .fishing-bucket-wrapper {
    width: 96px;
    height: 98px;
  }

  .fishing-bucket-handle {
    width: 62px;
    height: 38px;
    border-width: 4px;
  }

  .fishing-bucket {
    width: 78px;
    height: 68px;
    bottom: 9px;
    border-radius: 14px 14px 21px 21px;
  }

  .fishing-bucket-label {
    font-size: 0.5rem;
    letter-spacing: 1px;
    padding: 2px 7px;
  }

  .fishing-bucket-shadow {
    width: 80px;
  }
}

/* ==========================================================
   Mobile caught collection strip
   ========================================================== */
@media (max-width: 768px) {
  .collection-area {
    display: block !important;
    width: 100%;
    max-height: 52px;
    margin-top: 3px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 215, 120, 0.16);
    overflow: hidden;
    flex: 0 0 auto;
  }

  .collection-title {
    display: none;
  }

  .collection-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 1px 2px 4px;
  }

  .collection-grid::-webkit-scrollbar {
    display: none;
  }

  .collection-item {
    flex: 0 0 auto;
    min-width: 46px;
    height: 38px;
    padding: 2px 6px;
    border-radius: 8px;
    flex-direction: row;
    gap: 3px;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
  }

  .collection-item img {
    width: 28px;
    height: 28px;
  }

  .collection-item .fish-emoji {
    font-size: 1.15rem;
  }

  .collection-item .fish-count {
    font-size: 0.62rem;
    line-height: 1;
  }

  .collection-empty {
    display: inline-flex;
    align-items: center;
    height: 34px;
    font-size: 0.68rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .collection-area {
    max-height: 46px;
    margin-top: 2px;
    padding-top: 3px;
  }

  .collection-item {
    min-width: 42px;
    height: 34px;
    padding: 1px 5px;
  }

  .collection-item img {
    width: 24px;
    height: 24px;
  }
}

/* ==========================================================
   Mobile usability pass v20
   ========================================================== */
@media (max-width: 768px) {
  html,
  body.game-page {
    width: 100%;
    min-height: 100svh;
    overflow: hidden;
  }

  .game-page {
    height: 100svh;
  }

  .top-bar {
    height: 42px;
    min-height: 42px;
    flex: 0 0 auto;
    padding: 5px 8px;
  }

  .main-area {
    height: calc(100svh - 42px - 86px);
    min-height: 0;
    overflow: hidden;
  }

  .ocean-zone {
    flex: 1 1 auto;
    height: min(58vh, calc(100svh - 292px));
    min-height: 250px;
  }

  .result-panel {
    width: 100%;
    max-height: 196px;
    min-height: 172px;
    padding: 6px 10px 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .result-panel .panel-kicker {
    margin-bottom: 1px;
    font-size: 0.6rem;
    line-height: 1;
  }

  .result-panel .catch-image:empty {
    display: none;
  }

  #idleArea {
    width: 100%;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
  }

  #idleArea .catch-name {
    max-width: 100%;
    font-size: 0.96rem;
    line-height: 1.08;
    margin: 0;
  }

  #idleArea > div[style*="margin-top"] {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 4px !important;
  }

  #selectedBaitHint {
    max-width: 100%;
    font-size: 0.7rem !important;
    line-height: 1.1;
  }

  #btnCast {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    min-width: 144px;
    min-height: 42px;
    padding: 9px 28px !important;
    font-size: 0.98rem !important;
    line-height: 1;
    border-radius: 999px;
  }

  .collection-area {
    display: block !important;
    width: 100%;
    max-height: 70px;
    margin-top: 4px;
    padding-top: 5px;
    border-top: 1px solid rgba(255, 215, 120, 0.18);
    overflow: hidden;
    flex: 0 0 auto;
  }

  .collection-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 4px 6px;
  }

  .collection-grid::-webkit-scrollbar {
    display: none;
  }

  .collection-item {
    flex: 0 0 auto;
    min-width: 64px;
    height: 54px;
    padding: 4px 8px;
    border-radius: 10px;
    flex-direction: row;
    gap: 5px;
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.16);
    box-shadow: inset 0 1px rgba(255,255,255,0.1), 0 6px 12px rgba(0,0,0,0.18);
  }

  .collection-item img {
    width: 42px;
    height: 42px;
  }

  .collection-item .fish-emoji {
    font-size: 1.55rem;
  }

  .collection-item .fish-count {
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
  }

  .collection-empty {
    display: inline-flex;
    align-items: center;
    height: 48px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .main-area {
    height: calc(100svh - 40px - 82px);
  }

  .ocean-zone {
    height: min(55vh, calc(100svh - 284px));
    min-height: 232px;
  }

  .result-panel {
    max-height: 190px;
    min-height: 166px;
    padding: 5px 8px 7px;
  }

  #idleArea {
    min-height: 88px;
    gap: 5px;
  }

  #btnCast {
    min-width: 136px;
    min-height: 40px;
    padding: 8px 24px !important;
  }

  .collection-area {
    max-height: 64px;
    margin-top: 3px;
    padding-top: 4px;
  }

  .collection-grid {
    gap: 7px;
    padding-bottom: 5px;
  }

  .collection-item {
    min-width: 58px;
    height: 50px;
    padding: 3px 7px;
  }

  .collection-item img {
    width: 38px;
    height: 38px;
  }

  .collection-item .fish-emoji {
    font-size: 1.42rem;
  }

  .collection-item .fish-count {
    font-size: 0.74rem;
  }
}

/* ==========================================================
   Collection fish value labels v21
   ========================================================== */
.collection-item .fish-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 32px;
  line-height: 1;
}

.collection-item .fish-value {
  color: rgba(232, 244, 255, 0.86);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

@media (max-width: 768px) {
  .collection-item {
    min-width: 76px;
  }

  .collection-item .fish-meta {
    min-width: 34px;
  }

  .collection-item .fish-value {
    font-size: 0.66rem;
  }
}

@media (max-width: 480px) {
  .collection-item {
    min-width: 72px;
  }

  .collection-item .fish-value {
    font-size: 0.62rem;
  }
}

/* Keep the catch strip visible in mobile landscape/tablet emulation too. */
@media (min-width: 769px) and (max-width: 900px) {
  .collection-area {
    display: block !important;
    width: 100%;
    max-height: 66px;
    margin-top: 3px;
    padding-top: 4px;
    overflow: hidden;
    flex: 0 0 auto;
  }

  .collection-title {
    display: none;
  }

  .collection-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 3px 5px;
  }

  .collection-item {
    flex: 0 0 auto;
    min-width: 68px;
    height: 48px;
    padding: 3px 6px;
    flex-direction: row;
  }

  .collection-item img {
    width: 34px;
    height: 34px;
  }
}
