/* ===========================================
   釣りゲーム — Fishing Game Styles
   =========================================== */

.fishing-page {
  min-height: 100vh;
  background: linear-gradient(180deg,
    #87CEEB 0%,
    #4FC3F7 15%,
    #0288D1 30%,
    #01579B 60%,
    #003D5C 100%
  );
  display: flex;
  flex-direction: column;
}

.fishing-header {
  text-align: center;
  padding: calc(80px + var(--space-xl)) var(--space-lg) var(--space-lg);
}

.fishing-title {
  font-size: var(--font-size-2xl);
  font-weight: 900;
  color: var(--color-text-light);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.fishing-subtitle {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--space-xs);
}

/* --- Game Canvas Container --- */
.game-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--space-lg) var(--space-lg);
  position: relative;
}

.game-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.game-canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.game-zukan-topbtn {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: bold;
  font-size: var(--font-size-sm);
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s;
}

.game-zukan-topbtn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

/* --- Game HUD --- */
.game-hud {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  color: var(--color-text-light);
  font-weight: 700;
  font-size: var(--font-size-base);
}

.hud-icon {
  font-size: 1.4em;
}

.hud-btn {
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.hud-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.25);
}

.hud-value {
  font-size: var(--font-size-lg);
  min-width: 30px;
  text-align: center;
}

/* --- Catch Result Overlay --- */
.catch-result {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1500;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.catch-result.active {
  display: flex;
}

.catch-card {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 400px;
  width: 100%;
  overflow: hidden;
  text-align: center;
  animation: catchBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

@keyframes catchBounce {
  from {
    opacity: 0;
    transform: scale(0.3) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.catch-card-header {
  background: linear-gradient(135deg, var(--color-sun), #FFA000);
  padding: var(--space-lg);
  color: var(--color-text);
}

.catch-card-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: 900;
}

.catch-card-image {
  padding: var(--space-lg);
  background: linear-gradient(135deg, #E3F2FD, #B3E5FC);
}

.catch-card-image img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin: 0 auto;
}

.catch-card-info {
  padding: var(--space-lg);
}

.catch-card-name {
  font-size: var(--font-size-xl);
  font-weight: 900;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.catch-card-detail {
  font-size: var(--font-size-sm);
  color: #546E7A;
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.catch-card-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Start Screen --- */
.game-start-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 50, 100, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10;
  border-radius: var(--radius-md);
}

.game-start-screen.hidden {
  display: none;
}

.game-start-title {
  font-size: var(--font-size-2xl);
  font-weight: 900;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.game-start-desc {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-xl);
  text-align: center;
  max-width: 300px;
  line-height: 1.6;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .game-canvas-wrapper {
    border-radius: var(--radius-sm);
  }

  .fishing-title {
    font-size: var(--font-size-xl);
  }

  .game-hud {
    gap: var(--space-md);
  }

  .hud-item {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-sm);
  }
}

/* --- Game Zukan Modal --- */
.game-zukan-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(0, 50, 100, 0.8);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  transition: opacity 0.3s;
}

.game-zukan-modal.active {
  display: flex;
  opacity: 1;
}

.zukan-modal-content {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-zukan-modal.active .zukan-modal-content {
  transform: translateY(0);
}

.zukan-modal-header {
  padding: var(--space-lg);
  background: linear-gradient(135deg, #0288D1, #003D5C);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.zukan-modal-header h2 {
  font-size: var(--font-size-xl);
  font-weight: 900;
  margin: 0;
}

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

.zukan-close-btn:hover {
  background: rgba(255,255,255,0.3);
}

.zukan-modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  flex: 1;
  background: #F5F7FA;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.zukan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
}

.zukan-item {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.zukan-item-img-wrapper {
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.zukan-item-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Silhouette style for uncaught fish */
.zukan-item.uncaught .zukan-item-img {
  filter: brightness(0) opacity(0.3);
}

.zukan-item-name {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.zukan-item.uncaught .zukan-item-name {
  color: #90A4AE;
}

.zukan-item-count {
  font-size: 0.75rem;
  color: white;
  background: var(--color-coral);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: bold;
}

.zukan-item.uncaught .zukan-item-count {
  display: none;
}

/* --- New Catch Badge --- */
.new-catch-badge {
  display: inline-block;
  margin-left: 12px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #FF6B6B, #FF4757);
  color: #fff;
  border-radius: 8px;
  font-size: 0.65em;
  font-weight: 900;
  vertical-align: middle;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
  animation: pulse-new-badge 1s infinite alternate;
  letter-spacing: 1px;
}

@keyframes pulse-new-badge {
  0% { transform: scale(1); }
  100% { transform: scale(1.15) rotate(2deg); }
}
