/* ===================================================
   Neo Fishing Odyssey - Modern Oceanic & Cosmic Styles
   =================================================== */

:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-color: rgba(56, 189, 248, 0.2);
  --border-glow: rgba(56, 189, 248, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-gold: #f59e0b;
  --accent-purple: #c084fc;
  --accent-crimson: #f43f5e;
  --accent-green: #22c55e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', 'Noto Sans KR', 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* App Container */
#app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Background 3D Canvas Container */
#game-canvas-3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
}

#game-canvas-3d canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* 3D Fish Viewport in Modal */
#fish-3d-viewport canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  cursor: grab;
}

#fish-3d-viewport:active canvas {
  cursor: grabbing;
}

/* HUD Overlay */
#hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.2rem;
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: auto;
}

.zone-badge-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.8rem 1.4rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.zone-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
}

.zone-info h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.zone-depth {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Weather Status Card in Top Bar */
.weather-badge-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 0.6rem 1.2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.weather-badge-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.2);
}

.weather-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.5));
}

.weather-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.weather-header strong {
  font-size: 1.05rem;
  color: var(--text-main);
}

.weather-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.weather-timer {
  font-size: 0.76rem;
  font-family: monospace;
  font-weight: 700;
  color: #facc15;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.weather-effect {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.hud-stats-group {
  display: flex;
  gap: 0.8rem;
}

.stat-chip {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stat-chip.money {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.3);
}

.stat-chip.dex-stat {
  color: var(--accent-purple);
  border-color: rgba(192, 132, 252, 0.3);
}

/* Central Fishing Interactive HUD */
.center-hud-action {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

.bite-prompt {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.9) 0%, rgba(185, 28, 28, 0.7) 100%);
  color: #fff;
  padding: 1rem 2.5rem;
  border-radius: 40px;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 1px;
  box-shadow: 0 0 35px #ef4444, inset 0 0 15px rgba(255, 255, 255, 0.4);
  animation: pulse-bite 0.5s infinite alternate;
  cursor: pointer;
  border: 2px solid #fecaca;
}

@keyframes pulse-bite {
  0% { transform: scale(1); box-shadow: 0 0 20px #ef4444; }
  100% { transform: scale(1.1); box-shadow: 0 0 45px #f87171, 0 0 80px rgba(239, 68, 68, 0.6); }
}

.cast-gauge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.cast-meter-bg {
  width: 260px;
  height: 24px;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid var(--accent-cyan);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.cast-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #22c55e 80%, #facc15 90%, #ef4444 100%);
  width: 0%;
  transition: width 0.05s linear;
}

.cast-perfect-marker {
  position: absolute;
  top: 0;
  left: 80%;
  width: 15%;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  border-left: 1px dashed #fff;
  border-right: 1px dashed #fff;
  pointer-events: none;
}

.cast-hint-text {
  font-size: 0.9rem;
  color: #bae6fd;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-weight: 600;
}

/* Reeling Minigame HUD */
.reeling-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(14px);
  border: 2px solid var(--accent-cyan);
  border-radius: 24px;
  padding: 1.5rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.3);
  min-width: 380px;
}

.reeling-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reeling-track {
  position: relative;
  width: 320px;
  height: 48px;
  background: #020617;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.player-bar {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(34, 197, 94, 0.45);
  border: 2px solid #4ade80;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.6);
  pointer-events: none;
}

.fish-target-icon {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px #facc15);
  transition: transform 0.05s ease;
  pointer-events: none;
}

.meters-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.meter-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.meter-group span {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.sub-meter-bg {
  width: 100%;
  height: 10px;
  background: #1e293b;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  transition: width 0.05s linear;
}

.tension-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #facc15 60%, #ef4444 85%);
  transition: width 0.05s linear;
}

.reeling-instruction {
  font-size: 0.85rem;
  color: #93c5fd;
  text-align: center;
}

/* Bottom Controls & Action Bar */
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
  pointer-events: none;
}

.hud-gear-dock {
  display: flex;
  gap: 0.6rem;
  pointer-events: auto;
  flex-shrink: 0;
}

.gear-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.gear-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
  background: rgba(30, 41, 59, 0.9);
}

.gear-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.gear-text {
  display: flex;
  flex-direction: column;
}

.gear-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.gear-text strong {
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

.hud-action-dock {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  pointer-events: auto;
  flex-shrink: 0;
}

.btn-cast-main {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border: 1px solid #38bdf8;
  color: #fff;
  padding: 1.0rem 2.0rem;
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-cast-main:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 10px 35px rgba(56, 189, 248, 0.7);
}

.btn-cast-main:active {
  transform: scale(0.97);
}

.btn-chum-main {
  background: linear-gradient(135deg, #d97706, #b45309);
  border: 1px solid #facc15;
  color: #fff;
  padding: 1.0rem 1.4rem;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.btn-chum-main:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 8px 30px rgba(250, 204, 21, 0.6);
}

.btn-chum-main:active {
  transform: scale(0.97);
}

.hud-nav-dock {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  pointer-events: auto;
  max-width: 550px;
}

.btn-nav {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.btn-nav:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--accent-cyan);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.25);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-window {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  width: 90%;
  max-width: 960px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.2);
  animation: modal-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-enter {
  0% { transform: scale(0.92) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  padding: 1.2rem 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
}

.modal-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #cbd5e1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close:hover {
  background: rgba(239, 68, 68, 0.8);
  color: #fff;
  transform: rotate(90deg);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* Grid Lists (Rods, Zones, Dex, Inventory) */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.card-item {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.card-item.equipped {
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.card-top {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.card-icon {
  font-size: 2.4rem;
  background: rgba(15, 23, 42, 0.6);
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-title-group h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.card-tier-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.card-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
}

.card-perk {
  font-size: 0.82rem;
  color: #bae6fd;
  line-height: 1.35;
}

.card-btn {
  background: #0284c7;
  border: none;
  color: #fff;
  padding: 0.65rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
}

.card-btn:hover:not(:disabled) {
  background: #0369a1;
  transform: translateY(-1px);
}

.card-btn:disabled {
  background: #334155;
  color: #94a3b8;
  cursor: not-allowed;
}

/* Dex Tabs and Filter */
.dex-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.dex-filter-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.dex-filter-btn.active, .dex-filter-btn:hover {
  background: var(--accent-cyan);
  color: #04101e;
  border-color: var(--accent-cyan);
}

.dex-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.dex-card.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.dex-card-icon {
  font-size: 2.2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dex-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.dex-rarity-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

/* Celebration Catch Modal */
.celebration-window {
  max-width: 550px;
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: 28px;
  background: radial-gradient(circle at 50% 20%, #1e293b 0%, #090d16 100%);
  position: relative;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 80px rgba(56, 189, 248, 0.5), inset 0 0 40px rgba(56, 189, 248, 0.2);
}

.celebration-title {
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 0.5rem;
}

.celebration-icon-wrap {
  width: 140px;
  height: 140px;
  margin: 1.5rem auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 40px currentColor;
  animation: float-catch 3s infinite ease-in-out;
}

@keyframes float-catch {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.04); }
}

.celebration-name {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.celebration-mutation-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 0 15px currentColor;
}

.celebration-stats-table {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 14px;
  padding: 1rem;
  margin: 1rem 0 1.5rem;
  display: flex;
  justify-content: space-around;
}

.stat-cell h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.stat-cell p {
  font-size: 1.2rem;
  font-weight: 800;
}

.celebration-actions {
  display: flex;
  gap: 1rem;
}

.celebration-actions button {
  flex: 1;
  padding: 0.9rem;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-keep {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-keep:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-sell-now {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #000;
}

.btn-sell-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.4);
}

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-cyan);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.3s ease;
}

@keyframes toast-in {
  0% { transform: translateX(50px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* -------------------------------------------------------------
   NEW SYSTEMS: AUTO-FISHING, BOAT CONTROLS, HAZARDS & ENCHANTS
   ------------------------------------------------------------- */

/* Auto-Fishing Button */
.btn-auto-main {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid #64748b;
  color: #94a3b8;
  padding: 0.9rem 1.4rem;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-auto-main:hover {
  border-color: #38bdf8;
  color: #f8fafc;
  transform: translateY(-2px);
}

.btn-auto-main.active {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
  animation: pulse-auto 1.5s infinite alternate;
}

@keyframes pulse-auto {
  0% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
  100% { box-shadow: 0 0 25px rgba(52, 211, 153, 0.8); }
}

/* Virtual Boat Controls (Left Dock) */
.hud-boat-controls {
  position: absolute;
  left: 1.5rem;
  bottom: 6rem;
  pointer-events: auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 0.6rem 0.8rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.boat-ctrl-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

.boat-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.dpad-row {
  display: flex;
  gap: 0.25rem;
}

.btn-dpad {
  width: 40px;
  height: 40px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  color: #38bdf8;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.btn-dpad:hover {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}

.btn-dpad:active, .btn-dpad.active {
  transform: scale(0.92);
  background: #0369a1;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

/* Sea Monster Dodge Alert */
.boss-boat-alert {
  width: 100%;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(185, 28, 28, 0.95));
  border: 2px solid #f87171;
  color: #ffffff;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.7);
  animation: shake-alert 0.4s infinite alternate;
}

@keyframes shake-alert {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

/* Trident Obstacle in Reeling Track */
.trident-obstacle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px #ef4444);
  pointer-events: none;
  z-index: 5;
  transition: transform 0.04s linear;
}

/* Rhythm Prompt Container */
.rhythm-prompt-container {
  width: 100%;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid #c084fc;
  border-radius: 14px;
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.4);
}

.rhythm-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e9d5ff;
}

.rhythm-keys-display {
  display: flex;
  gap: 0.6rem;
}

.rhythm-key-box {
  background: #0f172a;
  border: 2px solid #64748b;
  color: #cbd5e1;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 900;
  min-width: 44px;
  text-align: center;
  transition: all 0.2s ease;
}

.rhythm-key-box.active {
  border-color: #facc15;
  color: #facc15;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.6);
  transform: scale(1.1);
}

.rhythm-key-box.done {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.rhythm-meter-bg {
  width: 100%;
  height: 6px;
  background: #0f172a;
  border-radius: 4px;
  overflow: hidden;
}

.rhythm-timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  width: 100%;
  transition: width 0.05s linear;
}

/* Screen Ink Overlay */
.screen-ink-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}

.ink-blot {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.3s ease;
  animation: ink-splat 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.ink-blot:hover {
  transform: scale(1.08);
}

.ink-blot-wipe-hint {
  font-size: 0.72rem;
  color: #f8fafc;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 4px;
  pointer-events: none;
}

@keyframes ink-splat {
  0% { transform: scale(0.2); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Enchant Rune Cards */
.enchant-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(192, 132, 252, 0.25);
  border-radius: 16px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8rem;
  transition: all 0.2s ease;
}

.enchant-card:hover {
  border-color: #c084fc;
  box-shadow: 0 8px 24px rgba(192, 132, 252, 0.25);
  transform: translateY(-2px);
}

.enchant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.enchant-rune-icon {
  font-size: 2rem;
  line-height: 1;
}

.enchant-level-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  background: rgba(192, 132, 252, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(192, 132, 252, 0.4);
}

.enchant-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
}

.enchant-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.35;
}

.enchant-stat-preview {
  font-size: 0.85rem;
  color: #38bdf8;
  font-weight: 700;
  background: rgba(2, 6, 23, 0.5);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}

.btn-enchant-upgrade {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: 1px solid #c084fc;
  color: #fff;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-enchant-upgrade:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.4);
}

.btn-enchant-upgrade:disabled {
  background: #334155;
  border-color: #475569;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* -------------------------------------------------------------
   ENCHANT ALTAR SLOTS, ROLLING & 1/1,000,000 COSMIC EFFECTS
   ------------------------------------------------------------- */
.enchant-slot-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.6rem;
  position: relative;
  transition: all 0.2s ease;
  min-height: 140px;
}

.enchant-slot-card.locked {
  background: rgba(15, 23, 42, 0.4);
  border: 2px dashed rgba(148, 163, 184, 0.2);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.enchant-slot-card.empty {
  border: 2px dashed rgba(56, 189, 248, 0.35);
  background: rgba(2, 6, 23, 0.5);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cosmic-shimmer {
  border: 2px solid #ec4899 !important;
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.6), inset 0 0 15px rgba(168, 85, 247, 0.4) !important;
  animation: cosmic-pulse 2s infinite alternate;
}

@keyframes cosmic-pulse {
  0% { box-shadow: 0 0 15px rgba(236, 72, 153, 0.5), inset 0 0 10px rgba(168, 85, 247, 0.3); }
  100% { box-shadow: 0 0 35px rgba(236, 72, 153, 0.9), inset 0 0 20px rgba(56, 189, 248, 0.6); }
}

.roll-card-item {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 14px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.6rem;
  border: 1px solid var(--border-color);
  animation: roll-pop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes roll-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.codex-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s;
}

.codex-card:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}


