/* ============================================================
   voice.css
   voice.html 専用スタイル
============================================================ */

/* ----------------------------------------------------------
   背景グラデーション / 幾何学背景
---------------------------------------------------------- */

/* ほんわか動くオーロラ背景 */
.hero-gradient {
  background: linear-gradient(125deg, #ffffff 0%, #f5f3ff 40%, #fdf2f8 70%, #ffffff 100%);
  background-size: 400% 400%;
  animation: gradient-flow 15s ease infinite;
}

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* 浮遊オブジェクトラッパー */
.bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 浮遊オブジェクト本体 */
.shape {
  position: absolute;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  opacity: 0.08;
  filter: blur(10px);
  animation: floatShape 18s ease-in-out infinite;
  will-change: transform;
}

/* 背景アニメーション */
@keyframes floatShape {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  25% {
    transform: translate3d(20px, -30px, 0) rotate(90deg);
  }

  50% {
    transform: translate3d(0, -55px, 0) rotate(180deg);
  }

  75% {
    transform: translate3d(-20px, -25px, 0) rotate(270deg);
  }

  100% {
    transform: translate3d(0, 0, 0) rotate(360deg);
  }
}

/* ----------------------------------------------------------
   ボイスボタン
---------------------------------------------------------- */

.v-btn {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

/* 左ライン */
.v-btn::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #6366f1, #ec4899);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.25s ease;
  border-radius: 0 2px 2px 0;
}

.v-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.2);
  border-color: #c7d2fe !important;
}

.v-btn:hover::after {
  transform: scaleY(1);
}

.v-btn:active {
  transform: translateY(0);
}

/* 再生中 */
.v-btn.is-playing {
  background: #f5f3ff !important;
  border-color: #a5b4fc !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.v-btn.is-playing::after {
  transform: scaleY(1);
}

/* フィルター非表示 */
.v-btn.is-hidden {
  display: none;
}

/* ----------------------------------------------------------
   波形アニメーション
---------------------------------------------------------- */

.wave-wrap {
  transition: opacity 0.2s ease;
}

.wave-bar {
  display: inline-block;
  width: 3px;
  background: #6366f1;
  border-radius: 2px;
  animation: waveAnim 0.7s ease-in-out infinite alternate;
}

.wave-bar:nth-child(1) {
  height: 4px;
  animation-delay: 0s;
}

.wave-bar:nth-child(2) {
  height: 14px;
  animation-delay: 0.1s;
}

.wave-bar:nth-child(3) {
  height: 8px;
  animation-delay: 0.05s;
}

.wave-bar:nth-child(4) {
  height: 12px;
  animation-delay: 0.15s;
}

.wave-bar:nth-child(5) {
  height: 5px;
  animation-delay: 0.08s;
}

@keyframes waveAnim {
  from {
    transform: scaleY(0.3);
  }

  to {
    transform: scaleY(1);
  }
}

/* ----------------------------------------------------------
   カテゴリセクション
---------------------------------------------------------- */

.cat-section {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.cat-section.is-hidden {
  display: none;
}

/* ----------------------------------------------------------
   コントロールバー
---------------------------------------------------------- */

.controls-sticky {
  position: sticky;
  top: 80px;
  z-index: 40;
}

/* ----------------------------------------------------------
   フィルタータブ横スクロール
---------------------------------------------------------- */

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* アクティブタブはホバーしても見た目を変えない */
.filter-tab.active-tab {
  background-color: #0f172a !important; /* slate-900 */
  border-color: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  cursor: default;
}

/* ----------------------------------------------------------
   検索空状態
---------------------------------------------------------- */

#voice-empty-state {
  animation: fadeEmpty 0.25s ease;
}

@keyframes fadeEmpty {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----------------------------------------------------------
   スマホ最適化
---------------------------------------------------------- */

@media (max-width: 768px) {
  .shape {
    opacity: 0.06;
    filter: blur(14px);
  }

  .controls-sticky {
    top: 72px;
  }

  .v-btn:hover {
    transform: none;
    box-shadow: none;
  }
}