/* ===========================================
   海の深度スクロール — Ocean Depth Styles
   =========================================== */

/* --- Hero Section (Water Surface) --- */
.ocean-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  background: linear-gradient(180deg,
    #87CEEB 0%,
    #4FC3F7 40%,
    #29B6F6 70%,
    #039BE5 100%
  );
  overflow: hidden;
}

.ocean-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-title {
  font-size: var(--font-size-hero);
  font-weight: 900;
  color: var(--color-text-light);
  text-shadow: 0 4px 16px rgba(0, 100, 180, 0.3);
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-bottom: var(--space-xl);
  position: relative;
  z-index: 2;
}

.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-light);
  font-size: var(--font-size-base);
  font-weight: 700;
  animation: bounce 2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.hero-scroll-hint .arrow {
  font-size: 2rem;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

/* --- Sun Rays --- */
.sun-rays {
  position: absolute;
  top: -5%;
  left: 50%;
  width: 150%;
  height: 80%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(255, 255, 200, 0.25) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
}

/* --- Light Shafts --- */
.light-shafts {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.light-shaft {
  position: absolute;
  top: -20%;
  width: 80px;
  height: 120%;
  background: linear-gradient(180deg,
    rgba(255, 255, 200, 0.15) 0%,
    transparent 100%
  );
  transform: rotate(15deg);
  animation: shaftSway 8s ease-in-out infinite;
}

.light-shaft:nth-child(1) { left: 10%; animation-delay: 0s; }
.light-shaft:nth-child(2) { left: 30%; animation-delay: 1.5s; width: 60px; }
.light-shaft:nth-child(3) { left: 55%; animation-delay: 3s; }
.light-shaft:nth-child(4) { left: 75%; animation-delay: 4.5s; width: 50px; }
.light-shaft:nth-child(5) { left: 90%; animation-delay: 2s; width: 70px; }

@keyframes shaftSway {
  0%, 100% { transform: rotate(15deg) translateX(0); opacity: 0.7; }
  50% { transform: rotate(18deg) translateX(20px); opacity: 1; }
}

/* --- Ocean Zones --- */
.ocean-zone {
  position: relative;
  min-height: 100vh;
  padding: var(--space-3xl) var(--space-lg);
  overflow: hidden;
  transition: background 0.5s ease;
}

/* Zone 1: Surface (0-10m) */
.zone-surface {
  background: linear-gradient(180deg,
    #039BE5 0%,
    #0288D1 50%,
    #0277BD 100%
  );
}

/* Zone 2: Shallow (10-200m) */
.zone-shallow {
  background: linear-gradient(180deg,
    #0277BD 0%,
    #01579B 30%,
    #004D73 60%,
    #003D5C 100%
  );
}

/* Zone 3: Mesopelagic (200-1000m) */
.zone-meso {
  background: linear-gradient(180deg,
    #003D5C 0%,
    #0A2647 30%,
    #0D1B3E 60%,
    #0D1530 100%
  );
}

/* Zone 4: Deep Sea (1000-4000m) */
.zone-deep {
  background: linear-gradient(180deg,
    #0D1530 0%,
    #0A0F20 40%,
    #070B18 70%,
    #050810 100%
  );
}

/* Zone 5: Abyss (4000m+) */
.zone-abyss {
  background: linear-gradient(180deg,
    #050810 0%,
    #030508 50%,
    #010203 100%
  );
}

/* --- Zone Headers --- */
.zone-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  position: relative;
  z-index: 5;
}

.zone-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.zone-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.3);
}

.zone-depth-range {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.5);
  margin-top: var(--space-xs);
}

/* --- Fish Grid --- */
.fish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-xl);
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

/* --- Fish Card --- */
.fish-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 32px var(--color-card-shadow);
  cursor: pointer;
  transition: all var(--transition-normal);
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  position: relative;
}

.fish-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.fish-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.fish-card-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #E3F2FD, #B3E5FC);
}

.fish-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-md);
  transition: transform var(--transition-normal);
}

.fish-card:hover .fish-card-image img {
  transform: scale(1.1);
}

.fish-card-badges {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  gap: var(--space-xs);
}

.badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: white;
}

.badge-ar {
  background: linear-gradient(135deg, #7C4DFF, #536DFE);
}

.badge-rare {
  background: linear-gradient(135deg, var(--color-sun), #FFA000);
  color: var(--color-text);
}

.fish-card-body {
  padding: var(--space-md);
}

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

.fish-card-name-kana {
  font-size: var(--font-size-sm);
  color: #78909C;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.fish-card-desc {
  font-size: var(--font-size-sm);
  color: #546E7A;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fish-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid #ECEFF1;
  font-size: var(--font-size-xs);
  color: #90A4AE;
}

.fish-card-depth {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* --- Bubbles Animation --- */
.bubbles-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: var(--color-bubble);
  opacity: 0;
  animation: bubbleRise linear infinite;
}

@keyframes bubbleRise {
  0% {
    opacity: 0;
    transform: translateX(0) scale(0.4);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateX(40px) translateY(-100vh) scale(1);
  }
}

/* --- Depth Meter --- */
.depth-meter {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.depth-meter-track {
  width: 6px;
  height: 200px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.depth-meter-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(180deg, var(--color-surface), var(--color-coral));
  border-radius: var(--radius-full);
  transition: height 0.3s ease;
}

.depth-meter-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-text-light);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* --- Seabed Decorations --- */
.seabed-decor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 2;
}

/* --- Deep Sea Glow Effects --- */
.zone-deep .fish-card,
.zone-abyss .fish-card {
  background: rgba(20, 30, 60, 0.85);
  border: 1px solid rgba(100, 200, 255, 0.15);
}

.zone-deep .fish-card-name,
.zone-abyss .fish-card-name {
  color: #B3E5FC;
}

.zone-deep .fish-card-desc,
.zone-abyss .fish-card-desc {
  color: rgba(200, 220, 255, 0.7);
}

.zone-deep .fish-card-meta,
.zone-abyss .fish-card-meta {
  border-top-color: rgba(100, 200, 255, 0.1);
  color: rgba(150, 200, 255, 0.5);
}

.zone-deep .fish-card-name-kana,
.zone-abyss .fish-card-name-kana {
  color: rgba(150, 200, 255, 0.5);
}

.zone-deep .fish-card-image,
.zone-abyss .fish-card-image {
  background: linear-gradient(135deg, #0D1530, #1A237E);
}

/* Deep sea bioluminescence glow */
.zone-deep .fish-card:hover,
.zone-abyss .fish-card:hover {
  box-shadow: 0 0 40px rgba(0, 200, 255, 0.2), 0 16px 48px rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 200, 255, 0.3);
}

/* Hydrothermal vent glow for abyss */
.zone-abyss::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 30%;
  width: 200px;
  height: 400px;
  background: radial-gradient(
    ellipse at 50% 100%,
    rgba(255, 100, 0, 0.08) 0%,
    rgba(255, 50, 0, 0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
}

/* --- Floating Particles (Plankton) --- */
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: particleDrift 12s linear infinite;
}

@keyframes particleDrift {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  20% { opacity: 0.6; }
  80% { opacity: 0.3; }
  100% {
    opacity: 0;
    transform: translate(50px, -200px);
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-title {
    font-size: var(--font-size-2xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-lg);
  }

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

  .depth-meter {
    right: 8px;
  }

  .depth-meter-track {
    height: 120px;
  }

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

@media (max-width: 480px) {
  .fish-grid {
    grid-template-columns: 1fr;
  }

  .fish-card-image {
    height: 160px;
  }
}
