/**
 * ============================================================================
 * GAME-MANCING.CSS - Visual Arena Bawah Laut, Animasi Memancing, Ikan, & Versus
 * ============================================================================
 */

/* Kontainer Utama Game */
.game-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #023e8a;
  display: flex;
  flex-direction: column;
}

/* 1. HUD & TOP QUESTION BAR (RAMAH PROYEKTOR KELAS) */
.mancing-hud-topbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 20px;
  min-height: 64px;
  height: 64px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #38bdf8;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hud-player-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-avatar {
  font-size: 1.6rem;
}

.hud-player-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #7dd3fc;
}

.hud-question-badge {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hud-stats-group {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hud-timer-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  border: 2px solid #38bdf8;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.hud-timer-badge.timer-warning {
  border-color: #ef4444;
  background: #7f1d1d;
  animation: pulseTimer 0.8s infinite alternate;
}

@keyframes pulseTimer {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.hud-score-pill {
  background: linear-gradient(135deg, #ff9f1c 0%, #fb8500 100%);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(255, 159, 28, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hud-counters {
  display: flex;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
}

.counter-correct { color: #4ade80; }
.counter-wrong { color: #f87171; }

/* PANEL PERTANYAAN DI BAGIAN ATAS */
.mancing-question-panel {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  width: 58%;
  max-width: 680px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 4px solid #38bdf8;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  padding: 10px 22px;
  text-align: center;
  z-index: 85;
}

.q-badge-mini {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}

.mancing-q-text {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.mancing-q-image-box {
  margin-top: 10px;
  max-height: 140px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  display: none;
}

.mancing-q-image-box img {
  max-height: 140px;
  max-width: 100%;
  object-fit: contain;
}

/* ======================================================== */
/* 2. ARENA BAWAH LAUT KAYA VISUAL & DINAMIS               */
/* ======================================================== */
.mancing-sea-arena {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 12%, #48cae4 0%, #0096c7 22%, #0077b6 46%, #023e8a 74%, #03045e 100%);
  overflow: hidden;
}

/* Langit & Sinar Matahari di Atas Permukaan Air */
.mancing-sky-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 195px;
  background: linear-gradient(180deg, #70d6ff 0%, #bae6fd 65%, #e0f2fe 100%);
  pointer-events: none;
  z-index: 2;
}

.sky-sun-radiance {
  position: absolute;
  top: 20px;
  left: 8%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, #fff3b0 0%, #ffd166 40%, rgba(255, 209, 102, 0.3) 70%, transparent 100%);
  border-radius: 50%;
  filter: drop-shadow(0 0 35px #ffd166);
}

.sky-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 40px;
}
.sky-cloud::before, .sky-cloud::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.sky-cloud-1 {
  top: 35px;
  left: -120px;
  width: 130px;
  height: 38px;
  animation: skyCloudDrift 30s linear infinite;
}
.sky-cloud-1::before { width: 50px; height: 50px; top: -22px; left: 20px; }
.sky-cloud-1::after { width: 40px; height: 40px; top: -16px; left: 65px; }

.sky-cloud-2 {
  top: 75px;
  left: -180px;
  width: 170px;
  height: 48px;
  animation: skyCloudDrift 42s linear infinite 14s;
  opacity: 0.8;
}
.sky-cloud-2::before { width: 68px; height: 68px; top: -28px; left: 30px; }
.sky-cloud-2::after { width: 55px; height: 55px; top: -22px; left: 88px; }

@keyframes skyCloudDrift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 260px)); }
}

/* Sinar Cahaya Menembus Bawah Laut (God Rays / Sunbeams) */
.sunlight-caustics-dynamic {
  position: absolute;
  top: 180px;
  left: 0;
  width: 100%;
  height: 65%;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

.sun-beam {
  position: absolute;
  top: -20px;
  height: 120%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.12) 40%, rgba(72, 202, 228, 0.05) 75%, transparent 100%);
  transform-origin: top center;
  filter: blur(8px);
  animation: sunbeamSway 7s ease-in-out infinite alternate;
}

.beam-1 { left: 8%; width: 90px; transform: rotate(18deg); animation-duration: 6.5s; }
.beam-2 { left: 24%; width: 130px; transform: rotate(12deg); animation-duration: 8s; animation-delay: 1s; }
.beam-3 { left: 45%; width: 110px; transform: rotate(5deg); animation-duration: 7.2s; animation-delay: 2s; }
.beam-4 { left: 66%; width: 140px; transform: rotate(-8deg); animation-duration: 8.5s; animation-delay: 0.5s; }
.beam-5 { left: 82%; width: 100px; transform: rotate(-15deg); animation-duration: 6.8s; animation-delay: 1.5s; }

@keyframes sunbeamSway {
  0% { opacity: 0.5; transform: rotate(var(--angle, 10deg)) skewX(-3deg); }
  100% { opacity: 0.9; transform: rotate(calc(var(--angle, 10deg) + 4deg)) skewX(3deg); }
}

/* Lapisan Ombak Permukaan Air Ganda (Double-Layer Waves) */
.sea-surface-waves-back {
  position: absolute;
  top: 172px;
  left: 0;
  width: 200%;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,35 C150,85 350,0 500,45 C650,95 900,10 1200,50 L1200,120 L0,120 Z' fill='%230096c7' opacity='0.7'%3E%3C/path%3E%3C/svg%3E");
  background-size: 600px 30px;
  animation: waveRollBack 10s linear infinite;
  pointer-events: none;
  z-index: 8;
}

.sea-surface-waves-front {
  position: absolute;
  top: 182px;
  left: 0;
  width: 200%;
  height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,20 C180,80 360,5 540,55 C720,105 900,20 1200,35 L1200,120 L0,120 Z' fill='%230077b6' opacity='0.85'%3E%3C/path%3E%3Cpath d='M0,22 C180,82 360,7 540,57 C720,107 900,22 1200,37' stroke='%23ffffff' stroke-width='3' fill='none' opacity='0.8'/%3E%3C/svg%3E");
  background-size: 550px 28px;
  animation: waveRollFront 7s linear infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes waveRollBack {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes waveRollFront {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

/* Siluet Gunung / Tebing Bawah Laut di Kejauhan */
.deep-sea-mountains {
  position: absolute;
  bottom: 90px;
  left: 0;
  width: 100%;
  height: 180px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200 L0 120 Q150 40 320 90 Q480 140 650 60 Q820 -10 980 80 Q1100 140 1200 100 L1200 200 Z' fill='%23005f73' opacity='0.35'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
  pointer-events: none;
  z-index: 12;
}

/* Ikan Latar Belakang di Kedalaman Jauh (Background Swarm) */
.bg-swimming-school {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 14;
}

.bg-fish {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.45;
  filter: blur(0.5px);
  animation: bgFishSwim 24s linear infinite;
}

.bg-fish-1 { top: 38%; left: -60px; animation-duration: 25s; animation-delay: 2s; }
.bg-fish-2 { top: 46%; left: -60px; animation-duration: 22s; animation-delay: 5s; transform: scale(0.85); }
.bg-fish-3 { top: 62%; right: -60px; animation-duration: 28s; animation-delay: 9s; transform: scaleX(-1); }
.bg-fish-4 { top: 72%; left: -60px; animation-duration: 20s; animation-delay: 14s; transform: scale(0.75); }

@keyframes bgFishSwim {
  0% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(30vw) translateY(-12px); }
  50% { transform: translateX(60vw) translateY(10px); }
  75% { transform: translateX(85vw) translateY(-8px); }
  100% { transform: translateX(calc(100vw + 100px)) translateY(0); }
}

/* Partikel Berkilau Bawah Laut (Plankton / Sparkles) */
.water-sparkles-field {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 16;
}

.sparkle-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 8px #70d6ff;
  animation: sparkleTwinkle 4s ease-in-out infinite alternate;
}

.sp-1 { top: 34%; left: 18%; animation-delay: 0.5s; }
.sp-2 { top: 48%; left: 42%; animation-delay: 1.5s; width: 6px; height: 6px; }
.sp-3 { top: 58%; left: 74%; animation-delay: 2.2s; }
.sp-4 { top: 70%; left: 28%; animation-delay: 3s; }
.sp-5 { top: 64%; left: 88%; animation-delay: 1.2s; width: 6px; height: 6px; }
.sp-6 { top: 80%; left: 52%; animation-delay: 2.8s; }

@keyframes sparkleTwinkle {
  0% { opacity: 0.2; transform: scale(0.6) translateY(0); }
  50% { opacity: 0.9; transform: scale(1.3) translateY(-10px); }
  100% { opacity: 0.3; transform: scale(0.7) translateY(-20px); }
}

/* ======================================================== */
/* 3. DASAR LAUT BERTINGKAT (SEABED ECOSYSTEM)             */
/* ======================================================== */
.seabed-ecosystem {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 130px;
  pointer-events: none;
  z-index: 20;
}

/* Bukit Pasir Belakang */
.seabed-dune-back {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 105px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120 L0 50 Q180 15 380 45 Q580 75 780 30 Q980 -10 1200 40 L1200 120 Z' fill='%23bc6c25'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
  opacity: 0.85;
}

/* Bukit Pasir Depan Keemasan */
.seabed-dune-front {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 75px;
  background: linear-gradient(180deg, #dda15e 0%, #bc6c25 60%, #9b5a1f 100%);
  border-top: 5px solid #ffb703;
  box-shadow: inset 0 8px 16px rgba(0, 0, 0, 0.25);
}

/* Grup Terumbu Karang Kartun Spektakuler */
.seabed-corals-group {
  position: absolute;
  bottom: 55px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 4%;
  z-index: 22;
}

.coral-cluster {
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease;
}

.coral-cluster:hover {
  transform: scale(1.08);
}

/* Hutan Rumput Laut / Kelp Forest Bergoyang Halus */
.seabed-kelp-forest {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  padding: 0 8%;
  z-index: 21;
}

.kelp-plant {
  transform-origin: bottom center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.kelp-1 { animation: kelpSwayLeft 4.5s ease-in-out infinite alternate; }
.kelp-2 { animation: kelpSwayRight 5.2s ease-in-out infinite alternate 0.5s; }
.kelp-3 { animation: kelpSwayLeft 4.8s ease-in-out infinite alternate 1.2s; }
.kelp-4 { animation: kelpSwayRight 5.6s ease-in-out infinite alternate 0.8s; }

@keyframes kelpSwayLeft {
  0% { transform: rotate(-7deg) skewX(-4deg); }
  100% { transform: rotate(9deg) skewX(5deg); }
}

@keyframes kelpSwayRight {
  0% { transform: rotate(8deg) skewX(4deg); }
  100% { transform: rotate(-8deg) skewX(-5deg); }
}

/* Fauna & Hewan Dasar Laut */
.seabed-critters {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 0 10%;
  z-index: 24;
}

.critter {
  font-size: 2.2rem;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

.star-critter {
  animation: starBreathe 3s ease-in-out infinite alternate;
}

@keyframes starBreathe {
  0% { transform: scale(1) rotate(-6deg); }
  100% { transform: scale(1.12) rotate(6deg); }
}

.pearl-clam {
  position: relative;
  display: inline-block;
}

.glowing-pearl {
  position: absolute;
  top: 45%;
  left: 45%;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #d8f3dc 60%, #95d5b2 100%);
  border-radius: 50%;
  box-shadow: 0 0 12px 3px #52b788, 0 0 20px 6px rgba(255, 255, 255, 0.8);
  animation: pearlGlow 2.5s ease-in-out infinite alternate;
}

@keyframes pearlGlow {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.25); opacity: 1; }
}

.conch-shell {
  transform: rotate(15deg);
}

.anemone-critter {
  font-size: 2.5rem;
}

/* ======================================================== */
/* 4. GELEMBUNG UDARA MENGKILAP (MULTI-UKURAN)             */
/* ======================================================== */
.underwater-bubbles-field {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 28;
}

.underwater-bubble {
  position: absolute;
  bottom: -40px;
  background: radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.9) 0%, rgba(224, 242, 254, 0.45) 55%, rgba(56, 189, 248, 0.3) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: inset 0 -3px 5px rgba(2, 132, 199, 0.35), 0 0 10px rgba(255, 255, 255, 0.5);
  animation: bubbleFloatWobble 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.underwater-bubble::before {
  content: '';
  position: absolute;
  top: 18%;
  left: 22%;
  width: 26%;
  height: 26%;
  background: #ffffff;
  border-radius: 50%;
}

.b-1 { width: 22px; height: 22px; animation-duration: 6.5s; animation-delay: 0.2s; }
.b-2 { width: 34px; height: 34px; animation-duration: 8.5s; animation-delay: 1.8s; }
.b-3 { width: 18px; height: 18px; animation-duration: 5.8s; animation-delay: 0.8s; }
.b-4 { width: 42px; height: 42px; animation-duration: 10s; animation-delay: 3.2s; }
.b-5 { width: 26px; height: 26px; animation-duration: 7.2s; animation-delay: 1.2s; }
.b-6 { width: 38px; height: 38px; animation-duration: 9.2s; animation-delay: 2.5s; }
.b-7 { width: 20px; height: 20px; animation-duration: 6.2s; animation-delay: 0.5s; }
.b-8 { width: 30px; height: 30px; animation-duration: 7.8s; animation-delay: 3.8s; }

@keyframes bubbleFloatWobble {
  0% { transform: translateY(0) translateX(0) scale(0.7); opacity: 0; }
  15% { opacity: 0.9; }
  50% { transform: translateY(-45vh) translateX(18px) scale(0.95); opacity: 0.85; }
  85% { opacity: 0.75; }
  100% { transform: translateY(-110vh) translateX(-18px) scale(1.1); opacity: 0; }
}

/* ======================================================== */
/* 5. PERAHU & NELAYAN KARTUN (DI ATAS PERMUKAAN AIR)      */
/* ======================================================== */
.fisherman-boat-wrapper {
  position: absolute;
  top: 75px;
  left: 4%;
  z-index: 45;
  width: 220px;
  height: 110px;
  animation: boatBobbing 3.5s ease-in-out infinite alternate;
  pointer-events: none;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.25));
}

@keyframes boatBobbing {
  0% { transform: translateY(0) rotate(-1.5deg); }
  100% { transform: translateY(6px) rotate(1.5deg); }
}

.fisherman-svg-scene {
  width: 100%;
  height: 100%;
}

/* Riak & buih air di bawah lunas perahu (perahu berada tepat di atas air) */
.vs-boat-waterline, .boat-water-ripple {
  width: 175px;
  height: 12px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95) 0%, rgba(186, 230, 253, 0.75) 45%, rgba(56, 189, 248, 0.25) 75%, transparent 100%);
  border-radius: 50%;
  margin: -10px auto 0;
  filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.9));
  animation: boatWakePulse 2.4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes boatWakePulse {
  0% { transform: scaleX(0.85); opacity: 0.35; }
  100% { transform: scaleX(1.25); opacity: 0.75; }
}

/* Joran lentur saat memancing */
.rod-bending {
  transform-origin: 150px 75px;
  animation: rodBendAnim 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes rodBendAnim {
  0% { transform: rotate(0); }
  50% { transform: rotate(22deg); }
  100% { transform: rotate(0); }
}

/* SVG Line & Hook Canvas */
.fishing-line-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.fishing-line-path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.vs-line-p1 {
  stroke: #38bdf8;
  stroke-width: 3.5;
}

.vs-line-p2 {
  stroke: #f87171;
  stroke-width: 3.5;
}

.fishing-line-path.line-strained {
  stroke: #ef4444 !important;
  stroke-width: 3.5;
  stroke-dasharray: 4;
  animation: lineStrainFlash 0.15s infinite;
}

@keyframes lineStrainFlash {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* ======================================================== */
/* 5B. KAIL PANCING INTERAKTIF (BISA DITARIK / DRAGGABLE)   */
/* ======================================================== */
.fishing-hook-point {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 75px;
  margin-left: -30px;
  margin-top: -15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  z-index: 65;
  transition: transform 0.05s linear;
}

.fishing-hook-point:active,
.fishing-hook-point.is-dragging {
  cursor: grabbing !important;
  z-index: 70;
}

.fishing-hook-point.is-dragging .hook-drag-ring {
  border-color: #ffd166;
  box-shadow: 0 0 22px #ffd166, inset 0 0 10px rgba(255, 209, 102, 0.5);
  transform: scale(1.2);
}

.fishing-hook-point.is-dragging .hook-instruction-tag {
  opacity: 0.85;
  background: #ffb703;
  color: #0f172a;
}

/* Pelampung Pancing Kartun (Bobber) */
.hook-bobber-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.hook-bobber {
  width: 20px;
  height: 24px;
  border-radius: 50% 50% 45% 45%;
  border: 2.5px solid #0f172a;
  background: linear-gradient(180deg, #ef4444 50%, #ffffff 50%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  animation: bobberFloat 2s ease-in-out infinite alternate;
}

.p1-bobber {
  background: linear-gradient(180deg, #0284c7 50%, #ffffff 50%);
}

.p2-bobber {
  background: linear-gradient(180deg, #ef4444 50%, #ffffff 50%);
}

@keyframes bobberFloat {
  0% { transform: translateY(0) rotate(-4deg); }
  100% { transform: translateY(3px) rotate(4deg); }
}

.hook-stem {
  width: 3px;
  height: 10px;
  background: #334155;
  margin-top: -2px;
}

.hook-metal-svg {
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
  margin-top: -3px;
  pointer-events: none;
}

/* Cincin Target / Halo Drag Hook */
.hook-drag-ring {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
  pointer-events: none;
  animation: hookPulseRing 2.4s ease-in-out infinite;
}

.ring-p1 {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.65);
}

.ring-p2 {
  border-color: #f87171;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.65);
}

@keyframes hookPulseRing {
  0% { transform: translateX(-50%) scale(0.92); opacity: 0.6; }
  50% { transform: translateX(-50%) scale(1.14); opacity: 1; }
  100% { transform: translateX(-50%) scale(0.92); opacity: 0.6; }
}

/* Tag Instruksi Lucu "Tarik Kail! 🎣" */
.hook-instruction-tag {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffd166;
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1.5px solid #ffffff;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: tagBounce 1.6s ease-in-out infinite;
}

.tag-p1 {
  background: #0284c7;
  color: #ffffff;
}

.tag-p2 {
  background: #ef4444;
  color: #ffffff;
}

@keyframes tagBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes hookNudgeShake {
  0%, 100% { transform: scale(1); }
  20%, 60% { transform: scale(1.22) rotate(-8deg); }
  40%, 80% { transform: scale(1.22) rotate(8deg); }
}

.hook-nudge-shake {
  animation: hookNudgeShake 0.5s ease-in-out !important;
}

/* ======================================================== */
/* 6. IKAN BERENANG & JAWABAN KARTUN                       */
/* ======================================================== */
.underwater-fish {
  position: absolute;
  z-index: 35;
  cursor: default; /* Ikan tidak bisa diklik langsung! */
  transition: transform 0.2s ease, opacity 0.3s ease, filter 0.2s ease;
  user-select: none;
  pointer-events: auto;
}

/* --- IKAN BERENANG BERGERAK KE KANAN --- */
.underwater-fish.swim-dir-right {
  animation: fishSwimCycleRight 9s ease-in-out infinite;
}

.underwater-fish.swim-dir-right .fish-svg {
  animation: fishBodyFacingRight 9s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes fishSwimCycleRight {
  /* Bergerak ke KANAN dengan riak ombak naik-turun alami */
  0% {
    transform: translateX(0) translateY(0);
  }
  15% {
    transform: translateX(65px) translateY(-14px);
  }
  30% {
    transform: translateX(145px) translateY(10px);
  }
  45% {
    transform: translateX(230px) translateY(-8px);
  }
  48% {
    transform: translateX(250px) translateY(0);
  }

  /* Berenang kembali ke KIRI */
  52% {
    transform: translateX(250px) translateY(0);
  }
  65% {
    transform: translateX(185px) translateY(-12px);
  }
  80% {
    transform: translateX(105px) translateY(10px);
  }
  95% {
    transform: translateX(20px) translateY(-6px);
  }
  100% {
    transform: translateX(0) translateY(0);
  }
}

@keyframes fishBodyFacingRight {
  /* Menghadap Kanan (0% - 46%) */
  0%, 46% {
    transform: scaleX(1);
  }
  /* Berputar halus menghadap Kiri (47% - 51%) */
  48% {
    transform: scaleX(0.15);
  }
  49% {
    transform: scaleX(-0.15);
  }
  51%, 95% {
    transform: scaleX(-1);
  }
  /* Berputar halus menghadap Kanan kembali (96% - 100%) */
  97% {
    transform: scaleX(-0.15);
  }
  98% {
    transform: scaleX(0.15);
  }
  100% {
    transform: scaleX(1);
  }
}

/* --- IKAN BERENANG BERGERAK KE KIRI --- */
.underwater-fish.swim-dir-left {
  animation: fishSwimCycleLeft 9s ease-in-out infinite;
}

.underwater-fish.swim-dir-left .fish-svg {
  animation: fishBodyFacingLeft 9s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes fishSwimCycleLeft {
  /* Bergerak ke KIRI dengan riak ombak naik-turun alami */
  0% {
    transform: translateX(0) translateY(0);
  }
  15% {
    transform: translateX(-65px) translateY(-14px);
  }
  30% {
    transform: translateX(-145px) translateY(10px);
  }
  45% {
    transform: translateX(-230px) translateY(-8px);
  }
  48% {
    transform: translateX(-250px) translateY(0);
  }

  /* Berenang kembali ke KANAN */
  52% {
    transform: translateX(-250px) translateY(0);
  }
  65% {
    transform: translateX(-185px) translateY(-12px);
  }
  80% {
    transform: translateX(-105px) translateY(10px);
  }
  95% {
    transform: translateX(-20px) translateY(-6px);
  }
  100% {
    transform: translateX(0) translateY(0);
  }
}

@keyframes fishBodyFacingLeft {
  /* Menghadap Kiri (0% - 46%) */
  0%, 46% {
    transform: scaleX(-1);
  }
  /* Berputar halus menghadap Kanan (47% - 51%) */
  48% {
    transform: scaleX(-0.15);
  }
  49% {
    transform: scaleX(0.15);
  }
  51%, 95% {
    transform: scaleX(1);
  }
  /* Berputar halus menghadap Kiri kembali (96% - 100%) */
  97% {
    transform: scaleX(0.15);
  }
  98% {
    transform: scaleX(-0.15);
  }
  100% {
    transform: scaleX(-1);
  }
}

/* Hentikan animasi berenang saat ikan terkait, berontak, atau lepas */
.underwater-fish.fish-hooked,
.underwater-fish.fish-struggling,
.underwater-fish.fish-escaped {
  animation: none !important;
}

.underwater-fish.fish-hooked .fish-svg,
.underwater-fish.fish-struggling .fish-svg,
.underwater-fish.fish-escaped .fish-svg {
  animation: none !important;
}

/* Efek Sorotan Saat Kail Didekatkan ke Ikan */
.underwater-fish.fish-drag-hover {
  transform: scale(1.18) !important;
  filter: drop-shadow(0 0 25px #ffd166) drop-shadow(0 0 40px #ff9f1c) !important;
  z-index: 48;
}

.underwater-fish.fish-drag-hover .fish-answer-badge {
  border-color: #ffd166 !important;
  box-shadow: 0 0 22px rgba(255, 209, 102, 0.95), 0 6px 0 #b45309 !important;
  transform: translateX(-50%) scale(1.08);
}

.underwater-fish.fish-drag-hover-p1 {
  transform: scale(1.18) !important;
  filter: drop-shadow(0 0 25px #38bdf8) drop-shadow(0 0 40px #0284c7) !important;
  z-index: 48;
}

.underwater-fish.fish-drag-hover-p1 .fish-answer-badge {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.95), 0 6px 0 #0369a1 !important;
  transform: translateX(-50%) scale(1.08);
}

.underwater-fish.fish-drag-hover-p2 {
  transform: scale(1.18) !important;
  filter: drop-shadow(0 0 25px #f87171) drop-shadow(0 0 40px #ef4444) !important;
  z-index: 48;
}

.underwater-fish.fish-drag-hover-p2 .fish-answer-badge {
  border-color: #f87171 !important;
  box-shadow: 0 0 22px rgba(248, 113, 113, 0.95), 0 6px 0 #b91c1c !important;
  transform: translateX(-50%) scale(1.08);
}

.fish-body-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.fish-tail {
  transform-origin: 25px 50px;
  animation: tailWag 0.6s infinite ease-in-out alternate;
}

@keyframes tailWag {
  0% { transform: rotate(-10deg); }
  100% { transform: rotate(10deg); }
}

/* Papan Jawaban Mengambang di Dekat Ikan */
.fish-answer-badge {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 3px solid #0f172a;
  border-radius: var(--radius-md);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  pointer-events: none; /* Clicks will not trigger directly on the badge */
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fish-key-letter {
  background: linear-gradient(135deg, #ff9f1c 0%, #fb8500 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fish-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

/* Status Animasi Ikan */
.fish-hooked {
  filter: drop-shadow(0 0 20px #2ec4b6);
}

.fish-struggling {
  animation: fishStruggle 0.12s infinite alternate !important;
}

@keyframes fishStruggle {
  0% { transform: rotate(-12deg) scale(1.05); }
  100% { transform: rotate(12deg) scale(1.05); }
}

.fish-escaped {
  animation: fishDashAway 0.8s cubic-bezier(0.1, 0.9, 0.2, 1) forwards !important;
}

@keyframes fishDashAway {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(350px) translateY(120px) scale(0.6); opacity: 0; }
}

/* Splash Particle System */
.splash-drop {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 60;
  animation: splashFly 0.65s ease-out forwards;
}

@keyframes splashFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

/* FEEDBACK PILL (✓ BENAR! / ✗ SALAH!) */
#mancing-feedback-container {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  pointer-events: none;
}

.mancing-feedback-pill {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  padding: 16px 38px;
  border-radius: var(--radius-pill);
  border: 5px solid;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  animation: popFeedback 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popFeedback {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ======================================================== */
/* 7. MODE VERSUS STYLING PERSIS SEPERTI GAMBAR REFERENSI   */
/* ======================================================== */
.vs-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(circle at 50% 12%, #48cae4 0%, #0096c7 22%, #0077b6 46%, #023e8a 74%, #03045e 100%);
}

.vs-sea-arena {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.vs-question-panel {
  position: absolute !important;
  top: 78px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 52% !important;
  max-width: 640px !important;
  z-index: 85 !important;
  background: rgba(255, 255, 255, 0.98) !important;
  border: 4px solid #38bdf8 !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3) !important;
  padding: 10px 22px !important;
  text-align: center !important;
}

.vs-question-panel .mancing-q-text {
  font-size: 1.3rem !important;
  line-height: 1.35 !important;
}

.vs-question-panel .mancing-q-image-box {
  margin-top: 6px;
  max-height: 90px;
}
.vs-question-panel .mancing-q-image-box img {
  max-height: 90px;
  border-radius: 8px;
  object-fit: contain;
}

/* DUA PERAHU NELAYAN DI ATAS AIR MODE VERSUS */
.vs-fisherman-boat {
  position: absolute;
  top: 75px;
  z-index: 45;
  width: 210px;
  height: 110px;
  animation: boatBobbing 3.5s ease-in-out infinite alternate;
  pointer-events: none;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.3));
}

.boat-p1-pos {
  left: 2%;
}

.boat-p2-pos {
  right: 2%;
}

.boat-player-label {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  border: 1.5px solid #ffffff;
  white-space: nowrap;
}

.label-p1 {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.label-p2 {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

/* Header Skor Bersaing */
.vs-header-score {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  padding: 6px 20px;
  min-height: 66px;
  height: 66px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  border-bottom: 3px solid #ffd166;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

/* Tombol Kembali di dalam Game (Ramah Layar Sentuh & IFP) */
.btn-game-back {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.95) !important;
  border-radius: var(--radius-pill) !important;
  padding: 7px 18px !important;
  font-family: var(--font-heading) !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.45) !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  z-index: 105 !important;
}

.btn-game-back:hover {
  background: linear-gradient(135deg, #f87171 0%, #b91c1c 100%) !important;
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.6) !important;
}

.btn-game-back:active {
  transform: translateY(0) scale(0.98) !important;
}

.vs-p1-box, .vs-p2-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vs-score-tag {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  padding: 4px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.p1-color { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); color: #ffffff; }
.p2-color { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); color: #ffffff; }

/* Timer Hitung Mundur Mode Versus */
.vs-timer-pill {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  padding: 4px 18px;
  border-radius: var(--radius-pill);
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.vs-timer-pill.timer-warning {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 0 22px #ef4444;
  animation: vsTimerWarningPulse 0.5s infinite alternate;
}

@keyframes vsTimerWarningPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); }
}

.vs-question-counter-tag {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.5px;
}

/* Wadah Ikan Berenang Mode Versus */
.vs-underwater-fishes-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* Papan Jawaban Bersaing di Dekat Ikan */
.vs-duel-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 3px solid #0f172a;
  border-radius: var(--radius-md);
  padding: 6px 16px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
  pointer-events: none;
  white-space: nowrap;
}

.vs-fish-btn {
  border: none;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.vs-fish-btn:active {
  transform: scale(0.92);
}

.btn-p1-tag {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #ffffff;
}

.btn-p1-tag:hover {
  background: #38bdf8;
  transform: scale(1.08);
}

.btn-p2-tag {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: 1px solid #ffffff;
}

.btn-p2-tag:hover {
  background: #f87171;
  transform: scale(1.08);
}

.vs-fish-label-center {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vs-banner-notification {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 210;
  animation: popFeedback 0.3s ease;
  border: 3px solid rgba(255, 255, 255, 0.5);
}

/* PODIUM PERTANDINGAN */
.podium-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 24px 0;
}

.podium-box {
  border-radius: var(--radius-lg);
  padding: 26px;
  text-align: center;
}

.podium-p1 { background: #e0f2fe; border: 3px solid #0284c7; }
.podium-p2 { background: #fee2e2; border: 3px solid #ef4444; }

.podium-score-huge {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  margin: 8px 0;
}
