/* 釣果投稿ページのボディスタイル */
body.fishing_reports {
  background-color: #f0f2f5;
}

/* 釣果登録フォームのコンテナサイズ調整 */
body.fishing_reports .login-container {
  max-height: 100%;
  overflow-y: auto;
  margin: 10px auto;
  padding: 20px 40px;
}

body.fishing_reports .login-container .map-container #map {
  height: 150px;
}

@media (max-width: 768px) {
  body.fishing_reports .login-container {
    padding: 15px;
    margin: 5px;
  }
}

/* フォームフィールドの横並び */
.form-fields-inline {
  display: flex;
  gap: 16px; /* フィールド間の余白 */
  margin-bottom: 16px; /* 下部の余白 */
}

.form-fields-inline .form-field {
  flex: 1; /* 利用可能なスペースを均等に配分 */
  margin-bottom: 0; /* ラッパーで余白を持つため、個別の余白は0に */
}

/* 成功状態のボタン（緑色） */
.login-form button.is-success {
  background-color: #42b72a; /* 黄緑色 */
}

.login-form button.is-success:hover {
  background-color: #36a420; /* 黄緑色のホバー効果 */
}

/* オプションフィールド展開ボタン */
.optional-fields-toggle {
  width: 100%;
  padding: 12px 16px;
  background-color: transparent;
  border: 1px dashed #dddfe2;
  border-radius: 6px;
  color: #606770;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.optional-fields-toggle:hover {
  background-color: #f5f6f7;
  border-color: #bec3c9;
  color: #1c1e21;
}

.optional-fields-toggle-icon {
  font-size: 18px;
  font-weight: bold;
  transition: transform 0.2s;
}

.optional-fields-toggle.is-open .optional-fields-toggle-icon {
  transform: rotate(45deg);
}

.optional-badge {
  font-size: 11px;
  padding: 2px 6px;
  background-color: #e4e6eb;
  border-radius: 4px;
  color: #65676b;
}

/* 隠されたファイル入力 */
.hidden-file-input {
  display: none;
}

/* カスタムファイルアップロードボタン */
label#custom-image-upload-button {
  width: 100%;
  padding: 12px;
  background-color: #ffffff; /* 他の入力フォームに合わせる */
  border: 1px solid #dddfe2; /* 枠線を追加 */
  border-radius: 6px;
  color: #6c757d; /* プレースホルダーのような色合いに調整 */
  font-size: 16px; /* フォントサイズを他の入力フォームと合わせる */
  font-weight: normal; /* フォントの太さを調整 */
  cursor: pointer;
  transition: background-color 0.3s;
  display: block;
  text-align: left; /* テキストを左寄せにする */
  height: 48px; /* 他の入力フィールドの高さに合わせる */
  box-sizing: border-box; /* ボックスモデルの指定 */
}

label#custom-image-upload-button:hover {
  background-color: #f0f2f5; /* ホバー時の背景色を調整 */
}

/* 位置情報エラーメッセージのスタイル */
.location-error-message-style {
  color: #fa383e; /* 文字色 */
  background-color: #ffebe6; /* 背景色 */
  padding: 10px; /* 内側の余白 */
  border-radius: 6px; /* 角の丸み */
  margin-bottom: 16px; /* 下部の余白 */
  text-align: left; /* 左揃え */
}

/* スマホ対応 */
@media (max-width: 600px) {


  .form-fields-inline {
    flex-direction: column; /* スマホでは縦並びに戻す */
    gap: 0;
  }
}

/* ===========================================
   ローディングオーバーレイ
   =========================================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-overlay.hidden {
  display: none;
}

.loading-content {
  text-align: center;
  padding: 40px;
}

/* ===========================================
   幻想的な水中シーン（線画アニメーション）
   =========================================== */
.loading-ocean-fantasy {
  position: relative;
  width: 300px;
  height: 200px;
  margin: 0 auto 24px;
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.95) 0%,
    rgba(51, 65, 85, 0.9) 50%,
    rgba(30, 41, 59, 0.95) 100%
  );
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 40px rgba(96, 165, 250, 0.2),
    inset 0 0 60px rgba(96, 165, 250, 0.1);
}

/* 背景の幻想的な波紋 */
.fantasy-ripple {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: fantasyRipple 4s ease-out infinite;
}

.fantasy-ripple.ripple-1 {
  width: 100px;
  height: 100px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-color: rgba(167, 139, 250, 0.3);
}

.fantasy-ripple.ripple-2 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-color: rgba(244, 114, 182, 0.2);
  animation-delay: 1.3s;
}

.fantasy-ripple.ripple-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-color: rgba(96, 165, 250, 0.15);
  animation-delay: 2.6s;
}

@keyframes fantasyRipple {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* 浮遊するパーティクル */
.particle {
  position: absolute;
  border-radius: 50%;
  animation: particleFloat 6s ease-in-out infinite;
}

.particle-1 {
  width: 4px;
  height: 4px;
  background: rgba(96, 165, 250, 0.6);
  top: 20%;
  left: 15%;
  animation-delay: 0s;
}

.particle-2 {
  width: 3px;
  height: 3px;
  background: rgba(167, 139, 250, 0.6);
  top: 70%;
  left: 25%;
  animation-delay: 1s;
}

.particle-3 {
  width: 5px;
  height: 5px;
  background: rgba(244, 114, 182, 0.5);
  top: 40%;
  left: 80%;
  animation-delay: 2s;
}

.particle-4 {
  width: 3px;
  height: 3px;
  background: rgba(52, 211, 153, 0.6);
  top: 80%;
  left: 70%;
  animation-delay: 0.5s;
}

.particle-5 {
  width: 4px;
  height: 4px;
  background: rgba(251, 191, 36, 0.5);
  top: 30%;
  left: 60%;
  animation-delay: 1.5s;
}

.particle-6 {
  width: 3px;
  height: 3px;
  background: rgba(96, 165, 250, 0.5);
  top: 60%;
  left: 10%;
  animation-delay: 2.5s;
}

@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-10px) translateX(-5px);
    opacity: 0.5;
  }
  75% {
    transform: translateY(-25px) translateX(5px);
    opacity: 0.9;
  }
}

/* メインの線画魚 */
.line-fish.fish-main {
  position: absolute;
  width: 100px;
  height: 60px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: lineFishSwim 5s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.5));
}

@keyframes lineFishSwim {
  0% {
    transform: translate(-50%, -50%) translateX(-70px) translateY(10px) rotate(-3deg);
  }
  25% {
    transform: translate(-50%, -50%) translateX(-20px) translateY(-15px) rotate(3deg);
  }
  50% {
    transform: translate(-50%, -50%) translateX(70px) translateY(5px) rotate(-3deg);
  }
  75% {
    transform: translate(-50%, -50%) translateX(20px) translateY(-10px) rotate(3deg);
  }
  100% {
    transform: translate(-50%, -50%) translateX(-70px) translateY(10px) rotate(-3deg);
  }
}

/* 小さな線画魚 */
.line-fish.fish-small-1,
.line-fish.fish-small-2,
.line-fish.fish-small-3 {
  position: absolute;
  width: 40px;
  height: 24px;
}

.line-fish.fish-small-1 {
  top: 25%;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.5));
  animation: lineSmallFish1 4s ease-in-out infinite;
}

.line-fish.fish-small-2 {
  top: 70%;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
  animation: lineSmallFish2 4.5s ease-in-out infinite;
  animation-delay: -1.5s;
}

.line-fish.fish-small-3 {
  top: 45%;
  filter: drop-shadow(0 0 6px rgba(244, 114, 182, 0.5));
  animation: lineSmallFish3 3.8s ease-in-out infinite;
  animation-delay: -2.5s;
}

@keyframes lineSmallFish1 {
  0% {
    left: -50px;
    transform: scaleX(1) translateY(0);
  }
  25% {
    transform: scaleX(1) translateY(-10px);
  }
  48% {
    left: calc(100% + 10px);
    transform: scaleX(1) translateY(5px);
  }
  52% {
    left: calc(100% + 10px);
    transform: scaleX(-1) translateY(5px);
  }
  75% {
    transform: scaleX(-1) translateY(-8px);
  }
  98% {
    left: -50px;
    transform: scaleX(-1) translateY(0);
  }
  100% {
    left: -50px;
    transform: scaleX(1) translateY(0);
  }
}

@keyframes lineSmallFish2 {
  0% {
    right: -50px;
    left: auto;
    transform: scaleX(-1) translateY(0);
  }
  25% {
    transform: scaleX(-1) translateY(8px);
  }
  48% {
    right: calc(100% + 10px);
    transform: scaleX(-1) translateY(-5px);
  }
  52% {
    right: calc(100% + 10px);
    transform: scaleX(1) translateY(-5px);
  }
  75% {
    transform: scaleX(1) translateY(10px);
  }
  98% {
    right: -50px;
    transform: scaleX(1) translateY(0);
  }
  100% {
    right: -50px;
    transform: scaleX(-1) translateY(0);
  }
}

@keyframes lineSmallFish3 {
  0% {
    left: -50px;
    transform: scaleX(1) translateY(0) rotate(0deg);
  }
  20% {
    transform: scaleX(1) translateY(-20px) rotate(5deg);
  }
  40% {
    transform: scaleX(1) translateY(15px) rotate(-5deg);
  }
  48% {
    left: calc(100% + 10px);
    transform: scaleX(1) translateY(0) rotate(0deg);
  }
  52% {
    left: calc(100% + 10px);
    transform: scaleX(-1) translateY(0) rotate(0deg);
  }
  70% {
    transform: scaleX(-1) translateY(-15px) rotate(-5deg);
  }
  85% {
    transform: scaleX(-1) translateY(20px) rotate(5deg);
  }
  98% {
    left: -50px;
    transform: scaleX(-1) translateY(0) rotate(0deg);
  }
  100% {
    left: -50px;
    transform: scaleX(1) translateY(0) rotate(0deg);
  }
}

/* 線画の泡 */
.line-bubble {
  position: absolute;
  width: 20px;
  height: 20px;
  animation: lineBubbleRise 4s ease-in infinite;
}

.line-bubble.bubble-1 {
  left: 20%;
  bottom: -25px;
  animation-delay: 0s;
}

.line-bubble.bubble-2 {
  left: 50%;
  bottom: -25px;
  width: 16px;
  height: 16px;
  animation-delay: 1.3s;
}

.line-bubble.bubble-3 {
  left: 75%;
  bottom: -25px;
  width: 14px;
  height: 14px;
  animation-delay: 2.6s;
}

@keyframes lineBubbleRise {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    transform: translateY(-100px) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translateY(-220px) scale(1.2);
    opacity: 0;
  }
}

/* テキスト */
.loading-text {
  color: #1c1e21;
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 8px;
}

.loading-subtext {
  color: #606770;
  font-size: 0.9em;
}

/* プログレスドット */
.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: #1877f2;
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
