/* 称号ボード - 「阿智村の星空」スタイル */

/* ===== モーダル全体の星空デザイン ===== */
.title-modal-starry-night {
  position: relative;
  background: linear-gradient(180deg, #050810 0%, #0a0e27 30%, #1a1f3a 60%, #0a0e27 80%, #050810 100%) !important;
  border: 2px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 
    0 0 60px rgba(138, 43, 226, 0.4),
    0 0 100px rgba(75, 0, 130, 0.3),
    inset 0 0 50px rgba(138, 43, 226, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.5) !important;
  overflow: visible !important;
  animation: titleModalAppear 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

@keyframes titleModalAppear {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(-30px);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

/* モーダル背景の星空グラデーション */
.title-modal-starry-night::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(75, 0, 130, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
  background-size: 200% 200%;
  animation: titleModalGradientShift 20s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes titleModalGradientShift {
  0%, 100% {
    background-position: 0% 0%, 100% 100%, 50% 50%;
  }
  33% {
    background-position: 50% 50%, 0% 0%, 100% 100%;
  }
  66% {
    background-position: 100% 100%, 50% 50%, 0% 0%;
  }
}

/* 月の装飾 */
.title-modal-moon {
  position: absolute;
  top: 20px;
  right: 30px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, 
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.7) 30%,
    rgba(200, 220, 255, 0.5) 60%,
    transparent 100%);
  border-radius: 50%;
  box-shadow: 
    0 0 30px rgba(255, 255, 255, 0.6),
    0 0 60px rgba(200, 220, 255, 0.4),
    0 0 90px rgba(138, 43, 226, 0.2),
    inset -20px -20px 0 rgba(0, 0, 0, 0.2);
  animation: moonGlow 4s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes moonGlow {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
    filter: brightness(1.3);
  }
}

/* 流れ星 */
.shooting-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 1) 0%,
    rgba(200, 220, 255, 0.8) 50%,
    transparent 100%);
  border-radius: 50%;
  box-shadow: 
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 20px rgba(200, 220, 255, 0.7),
    0 0 30px rgba(138, 43, 226, 0.5);
  animation: shootingStarFall var(--duration, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  left: var(--start-x, 0%);
  top: var(--start-y, 0%);
  z-index: 2;
  pointer-events: none;
}

.shooting-star::before {
  content: '';
  position: absolute;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.8) 0%,
    rgba(200, 220, 255, 0.6) 30%,
    transparent 100%);
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes shootingStarFall {
  0% {
    transform: translate(0, 0) rotate(45deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(300px, 300px) rotate(45deg);
    opacity: 0;
  }
}

/* 瞬く星の装飾 */
.title-modal-star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 
    0 0 8px rgba(255, 255, 255, 0.8),
    0 0 16px rgba(200, 220, 255, 0.6),
    0 0 24px rgba(138, 43, 226, 0.4);
  animation: starTwinkle var(--duration, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  z-index: 1;
  pointer-events: none;
}

.title-modal-star:nth-child(odd) {
  width: 3px;
  height: 3px;
  background: rgba(200, 220, 255, 0.8);
}

.title-modal-star:nth-child(3n) {
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 1);
  box-shadow: 
    0 0 12px rgba(255, 255, 255, 1),
    0 0 24px rgba(200, 220, 255, 0.8),
    0 0 36px rgba(138, 43, 226, 0.6);
}

@keyframes starTwinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
    filter: brightness(0.8);
  }
  25% {
    opacity: 0.7;
    transform: scale(1.1);
    filter: brightness(1.2);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
    filter: brightness(1.5);
  }
  75% {
    opacity: 0.6;
    transform: scale(1);
    filter: brightness(1);
  }
}

/* モーダルコンテンツのz-index調整 */
.title-modal-starry-night > div {
  position: relative;
  z-index: 10;
}

.title-modal-starry-night h3 {
  color: #fff !important;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(138, 43, 226, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.title-modal-starry-night button[data-modal-close="true"] {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  transition: all 0.3s;
}

.title-modal-starry-night button[data-modal-close="true"]:hover {
  color: #fff !important;
  text-shadow: 0 0 12px rgba(255, 255, 255, 1);
  transform: scale(1.2);
}

/* モーダル内のボーダーも星空テーマに */
.title-modal-starry-night > div:first-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%);
}

/* 称号カードの基本スタイル */
.title-card {
  position: relative;
  padding: 28px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 30%, #2d1b4e 60%, #1a1f3a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 40px rgba(138, 43, 226, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(10px);
}

/* 目指してる称号のスタイル */
.title-card.upcoming {
  border: 2px dashed rgba(255, 255, 255, 0.3);
  opacity: 0.9;
  background: linear-gradient(135deg, rgba(10, 14, 39, 0.6) 0%, rgba(26, 31, 58, 0.5) 30%, rgba(45, 27, 78, 0.4) 60%, rgba(26, 31, 58, 0.5) 100%);
  animation: upcomingPulse 2s ease-in-out infinite;
}

@keyframes upcomingPulse {
  0%, 100% {
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 0 40px rgba(138, 43, 226, 0.2);
  }
  50% {
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 0 60px rgba(138, 43, 226, 0.4),
      0 0 80px rgba(200, 220, 255, 0.2);
  }
}

/* 星空の背景エフェクト - 複数層の星 */
.title-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    /* 大きな星 */
    radial-gradient(3px 3px at 15% 25%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(2px 2px at 45% 15%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(3px 3px at 75% 35%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(2px 2px at 25% 65%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(3px 3px at 85% 75%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(2px 2px at 55% 85%, rgba(255, 255, 255, 0.8), transparent),
    /* 中サイズの星 */
    radial-gradient(2px 2px at 30% 40%, rgba(200, 220, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 60% 50%, rgba(255, 220, 200, 0.7), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(220, 200, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(200, 255, 220, 0.7), transparent),
    /* 小さな星 */
    radial-gradient(1px 1px at 20% 10%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 50% 30%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 80% 60%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 35% 80%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 65% 90%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 10% 50%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 90% 10%, rgba(255, 255, 255, 0.5), transparent);
  background-size: 200% 200%, 180% 180%, 160% 160%, 140% 140%, 120% 120%;
  background-position: 0% 0%, 20% 20%, 40% 40%, 60% 60%, 80% 80%;
  opacity: 0.8;
  animation: starField 20s ease-in-out infinite, starTwinkle 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

/* 天の川のような光の帯 */
.title-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, 
    rgba(138, 43, 226, 0.15) 0%,
    rgba(75, 0, 130, 0.1) 30%,
    transparent 70%);
  animation: milkyWay 15s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes starField {
  0%, 100% { 
    background-position: 0% 0%, 20% 20%, 40% 40%, 60% 60%, 80% 80%;
    opacity: 0.8;
  }
  50% { 
    background-position: 10% 10%, 30% 30%, 50% 50%, 70% 70%, 90% 90%;
    opacity: 1;
  }
}

@keyframes starTwinkle {
  0%, 100% { 
    opacity: 0.6;
    filter: brightness(1);
  }
  25% { 
    opacity: 0.9;
    filter: brightness(1.2);
  }
  50% { 
    opacity: 1;
    filter: brightness(1.5);
  }
  75% { 
    opacity: 0.8;
    filter: brightness(1.1);
  }
}

@keyframes milkyWay {
  0%, 100% {
    transform: rotate(0deg) translate(0, 0);
    opacity: 0.3;
  }
  50% {
    transform: rotate(180deg) translate(10px, -10px);
    opacity: 0.6;
  }
}

/* レアリティ別の背景色と光の色 */
.title-card.common {
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 30%, #2d1b4e 60%, #1a1f3a 100%);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 40px rgba(138, 43, 226, 0.2);
}

.title-card.rare {
  background: linear-gradient(135deg, #0a1a2e 0%, #1a2f4a 30%, #2d3a5e 60%, #1a2f4a 100%);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 50px rgba(59, 130, 246, 0.3),
    0 0 80px rgba(59, 130, 246, 0.1);
}

.title-card.epic {
  background: linear-gradient(135deg, #1a0a2e 0%, #2a1f4a 30%, #4d2a6e 60%, #2a1f4a 100%);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 60px rgba(139, 92, 246, 0.4),
    0 0 100px rgba(139, 92, 246, 0.2);
}

.title-card.legendary {
  background: linear-gradient(135deg, #2a1a0e 0%, #4a2f1a 30%, #6e4a2a 60%, #4a2f1a 100%);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 70px rgba(251, 191, 36, 0.5),
    0 0 120px rgba(251, 191, 36, 0.3),
    0 0 160px rgba(251, 191, 36, 0.1);
  animation: legendaryGlow 3s ease-in-out infinite;
}

.title-card.mythic {
  background: linear-gradient(135deg, 
    #2a0a1e 0%, 
    #4a1f3a 20%, 
    #6e2a5e 40%, 
    #8a3a7e 50%, 
    #6e2a5e 60%, 
    #4a1f3a 80%, 
    #2a0a1e 100%);
  background-size: 200% 200%;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 80px rgba(251, 191, 36, 0.6),
    0 0 120px rgba(139, 92, 246, 0.5),
    0 0 160px rgba(59, 130, 246, 0.4),
    0 0 200px rgba(16, 185, 129, 0.3);
  animation: mythicRainbow 4s ease-in-out infinite, mythicPulse 2s ease-in-out infinite;
}

@keyframes legendaryGlow {
  0%, 100% {
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 0 70px rgba(251, 191, 36, 0.5),
      0 0 120px rgba(251, 191, 36, 0.3),
      0 0 160px rgba(251, 191, 36, 0.1);
  }
  50% {
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 90px rgba(251, 191, 36, 0.7),
      0 0 150px rgba(251, 191, 36, 0.5),
      0 0 200px rgba(251, 191, 36, 0.3);
  }
}

@keyframes mythicRainbow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes mythicPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.02);
    filter: brightness(1.2);
  }
}

/* 星のアイコン - より幻想的に */
.title-card-icon {
  font-size: 72px;
  text-align: center;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9)) 
          drop-shadow(0 0 24px rgba(255, 255, 255, 0.6))
          drop-shadow(0 0 36px rgba(255, 255, 255, 0.3));
  animation: starIconPulse 3s ease-in-out infinite, starIconRotate 20s linear infinite;
  position: relative;
  z-index: 2;
}

@keyframes starIconPulse {
  0%, 100% { 
    transform: scale(1);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9)) 
            drop-shadow(0 0 24px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 36px rgba(255, 255, 255, 0.3));
  }
  50% { 
    transform: scale(1.15);
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 1)) 
            drop-shadow(0 0 32px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 48px rgba(255, 255, 255, 0.5));
  }
}

@keyframes starIconRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* タイトル */
.title-card-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(255, 255, 255, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
  position: relative;
  z-index: 2;
  animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow: 
      0 0 10px rgba(255, 255, 255, 0.8),
      0 0 20px rgba(255, 255, 255, 0.4),
      0 2px 4px rgba(0, 0, 0, 0.5);
  }
  50% {
    text-shadow: 
      0 0 15px rgba(255, 255, 255, 1),
      0 0 30px rgba(255, 255, 255, 0.6),
      0 0 45px rgba(255, 255, 255, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.5);
  }
}

/* メッセージ */
.title-card-message {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 14px;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 0 8px rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 2;
}

/* 獲得日 */
.title-card-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

/* レアリティ表示（星の数） */
.title-card-rarity {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 
    0 0 8px rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
  animation: rarityTwinkle 2s ease-in-out infinite;
  z-index: 3;
}

@keyframes rarityTwinkle {
  0%, 100% { 
    opacity: 0.9;
    transform: scale(1);
  }
  50% { 
    opacity: 1;
    transform: scale(1.1);
  }
}

/* ホバーエフェクト - より幻想的に */
.title-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 60px rgba(138, 43, 226, 0.4),
    0 0 100px rgba(138, 43, 226, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.title-card:hover::before {
  animation: starField 10s ease-in-out infinite, starTwinkle 2s ease-in-out infinite;
  opacity: 1;
}

.title-card:hover .title-card-icon {
  animation: starIconPulse 1.5s ease-in-out infinite, starIconRotate 10s linear infinite;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 1)) 
          drop-shadow(0 0 40px rgba(255, 255, 255, 0.8))
          drop-shadow(0 0 60px rgba(255, 255, 255, 0.5));
}

.title-card:hover .title-card-name {
  animation: titleGlow 2s ease-in-out infinite;
}

/* グリッドレイアウト */
.title-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 24px;
  background: linear-gradient(180deg, #050810 0%, #0a0e27 50%, #050810 100%);
  min-height: 100vh;
  position: relative;
}

/* グリッド背景にも星空エフェクト */
.title-grid::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 30% 40%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(2px 2px at 50% 60%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(2px 2px at 90% 10%, rgba(255, 255, 255, 0.3), transparent);
  background-size: 100% 100%;
  animation: backgroundStars 30s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes backgroundStars {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100px); }
}

@media (max-width: 768px) {
  .title-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
  }
  
  .title-card {
    min-height: 180px;
    padding: 20px 16px;
  }
  
  .title-card-icon {
    font-size: 56px;
  }
  
  .title-card-name {
    font-size: 18px;
  }
}

/* 獲得時のアニメーション - 星が降ってくる */
.title-card.newly-acquired {
  animation: titleAcquired 2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes titleAcquired {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
    filter: blur(10px);
  }
  30% {
    transform: scale(1.3) rotate(0deg);
    opacity: 0.8;
    filter: blur(5px);
  }
  60% {
    transform: scale(0.95) rotate(5deg);
    opacity: 1;
    filter: blur(2px);
  }
  80% {
    transform: scale(1.05) rotate(-2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: blur(0);
  }
}

/* 紙吹雪エフェクト（獲得時） */
@keyframes confetti {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0);
    opacity: 0;
  }
}

.title-confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.3) 100%);
  border-radius: 50%;
  animation: confetti 4s ease-out forwards;
  pointer-events: none;
  z-index: 10000;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* モーダル内のスタイル */
.title-modal-content {
  max-height: 80vh;
  overflow-y: auto;
  background: transparent;
  position: relative;
  z-index: 10;
  padding-bottom: 40px;
}

/* タブコンテンツのスタイル */
.title-tab-content {
  min-height: 400px;
  padding-bottom: 20px;
}

.title-section-header {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.6),
    0 0 20px rgba(138, 43, 226, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 10;
  animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow {
  0%, 100% {
    text-shadow: 
      0 0 10px rgba(255, 255, 255, 0.6),
      0 0 20px rgba(138, 43, 226, 0.4),
      0 2px 4px rgba(0, 0, 0, 0.5);
  }
  50% {
    text-shadow: 
      0 0 15px rgba(255, 255, 255, 0.9),
      0 0 30px rgba(138, 43, 226, 0.6),
      0 0 45px rgba(200, 220, 255, 0.4),
      0 2px 4px rgba(0, 0, 0, 0.5);
  }
}

.title-section-message {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 20px;
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, 
    rgba(138, 43, 226, 0.25) 0%, 
    rgba(75, 0, 130, 0.15) 50%,
    rgba(138, 43, 226, 0.25) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 0 8px rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(138, 43, 226, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
  backdrop-filter: blur(5px);
  animation: messagePulse 4s ease-in-out infinite;
}

@keyframes messagePulse {
  0%, 100% {
    box-shadow: 
      0 4px 12px rgba(0, 0, 0, 0.4),
      0 0 20px rgba(138, 43, 226, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 
      0 4px 12px rgba(0, 0, 0, 0.4),
      0 0 30px rgba(138, 43, 226, 0.4),
      0 0 50px rgba(200, 220, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

/* 手動称号追加フォーム */
.title-add-form {
  padding: 20px;
  background: linear-gradient(135deg, 
    rgba(26, 31, 58, 0.85) 0%, 
    rgba(45, 27, 78, 0.7) 50%,
    rgba(26, 31, 58, 0.85) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 20px;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(138, 43, 226, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
  backdrop-filter: blur(5px);
  animation: formGlow 5s ease-in-out infinite;
}

@keyframes formGlow {
  0%, 100% {
    box-shadow: 
      0 4px 16px rgba(0, 0, 0, 0.4),
      0 0 20px rgba(138, 43, 226, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 
      0 4px 16px rgba(0, 0, 0, 0.4),
      0 0 30px rgba(138, 43, 226, 0.25),
      0 0 50px rgba(200, 220, 255, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

.title-add-input {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
  background: rgba(10, 14, 39, 0.7);
  color: #fff;
  transition: all 0.3s;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 8px rgba(138, 43, 226, 0.1);
}

.title-add-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 0 20px rgba(138, 43, 226, 0.6),
    0 0 40px rgba(200, 220, 255, 0.3),
    inset 0 2px 4px rgba(0, 0, 0, 0.3);
  background: rgba(10, 14, 39, 0.9);
  transform: scale(1.02);
}

.title-add-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.title-add-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, 
    rgba(138, 43, 226, 0.9) 0%, 
    rgba(75, 0, 130, 0.9) 50%,
    rgba(138, 43, 226, 0.9) 100%);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 0 8px rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4px 12px rgba(138, 43, 226, 0.4),
    0 0 20px rgba(138, 43, 226, 0.2);
  animation: buttonGradientShift 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.title-add-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%);
  animation: buttonShine 3s ease-in-out infinite;
}

@keyframes buttonGradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes buttonShine {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

.title-add-btn:hover {
  background: linear-gradient(135deg, 
    rgba(138, 43, 226, 1) 0%, 
    rgba(75, 0, 130, 1) 50%,
    rgba(138, 43, 226, 1) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 6px 20px rgba(138, 43, 226, 0.6),
    0 0 30px rgba(200, 220, 255, 0.4),
    0 0 50px rgba(138, 43, 226, 0.3);
}

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

/* 削除ボタン */
.title-delete-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.title-card:hover .title-delete-btn {
  opacity: 1;
}

.title-delete-btn:hover {
  background: rgba(239, 68, 68, 1);
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
}

.title-delete-btn:active {
  transform: scale(0.95);
}

/* タブボタンのスタイル */
.title-tab-btn {
  transition: all 0.3s;
  position: relative;
  z-index: 10;
}

.title-tab-btn.active {
  color: #fff !important;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(138, 43, 226, 0.6);
  animation: tabActiveGlow 2s ease-in-out infinite;
}

@keyframes tabActiveGlow {
  0%, 100% {
    text-shadow: 
      0 0 10px rgba(255, 255, 255, 0.8),
      0 0 20px rgba(138, 43, 226, 0.6);
  }
  50% {
    text-shadow: 
      0 0 15px rgba(255, 255, 255, 1),
      0 0 30px rgba(138, 43, 226, 0.8),
      0 0 45px rgba(200, 220, 255, 0.4);
  }
}

.title-tab-btn:hover {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.title-tab-content {
  position: relative;
  z-index: 10;
}
