/* 趣味セクションのスタイル */
.hobbies-section {
  max-width: 1400px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.hobbies-container h2 {
  text-align: center;
  color: #ff4655;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.hobbies-container h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(45deg, #ff4655, #00d4ff);
  border-radius: 2px;
}

/* 趣味グリッド */
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2.5rem;
  justify-content: center;
}

/* 下段の趣味グリッド - 3つを均等に配置 */
.secondary-hobbies {
  margin-top: 2rem;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* レスポンシブ対応 - 下段グリッド */
@media (max-width: 1400px) {
  .secondary-hobbies {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

/* 趣味カード */
.hobby-card {
  background: linear-gradient(135deg, #1a1f25, #0f1923);
  border: 2px solid #333;
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  min-height: 450px;
}

.hobby-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 70, 85, 0.1), transparent);
  transition: left 0.6s ease;
}

.hobby-card:hover::before {
  left: 100%;
}

.hobby-card:hover {
  transform: translateY(-10px);
  border-color: #ff4655;
  box-shadow: 0 15px 35px rgba(255, 70, 85, 0.3);
}

/* 趣味アイコン */
.hobby-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(45deg, #ff4655, #ff6b77);
  border: 3px solid rgba(255, 70, 85, 0.3);
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 70, 85, 0.2);
}

.icon-symbol {
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.hobby-card:hover .hobby-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 35px rgba(255, 70, 85, 0.4);
}

/* 各趣味カテゴリの色分け */
.hobby-card[data-category="programming"] .hobby-icon {
  background: linear-gradient(45deg, #00d4ff, #42a5f5);
  border-color: rgba(0, 212, 255, 0.3);
}

.hobby-card[data-category="anime"] .hobby-icon {
  background: linear-gradient(45deg, #ff6b35, #ff8c42);
  border-color: rgba(255, 107, 53, 0.3);
}

.hobby-card[data-category="music"] .hobby-icon {
  background: linear-gradient(45deg, #f39c12, #e67e22);
  border-color: rgba(243, 156, 18, 0.3);
}

/* カードタイトル */
.hobby-card h3 {
  color: #ff4655;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* カード説明文 */
.hobby-card p {
  margin-bottom: 2rem;
  line-height: 1.7;
  color: #e0e0e0;
  font-size: 1rem;
  flex-grow: 1;
}

/* 趣味統計情報 */
.hobby-stats {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.stat {
  background: linear-gradient(45deg, rgba(255, 70, 85, 0.2), rgba(255, 70, 85, 0.1));
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #ff4655;
  border: 1px solid rgba(255, 70, 85, 0.3);
  transition: all 0.3s ease;
}

.stat:hover {
  background: rgba(255, 70, 85, 0.3);
  transform: translateX(5px);
}

/* 各カテゴリごとの統計情報色分け */
.hobby-card[data-category="programming"] .stat {
  background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
  color: #00d4ff;
  border-color: rgba(0, 212, 255, 0.3);
}

.hobby-card[data-category="anime"] .stat {
  background: linear-gradient(45deg, rgba(255, 107, 53, 0.2), rgba(255, 107, 53, 0.1));
  color: #ff6b35;
  border-color: rgba(255, 107, 53, 0.3);
}

.hobby-card[data-category="movies"] .stat {
  background: linear-gradient(45deg, rgba(231, 76, 60, 0.2), rgba(231, 76, 60, 0.1));
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.3);
}

.hobby-card[data-category="music"] .stat {
  background: linear-gradient(45deg, rgba(243, 156, 18, 0.2), rgba(243, 156, 18, 0.1));
  color: #f39c12;
  border-color: rgba(243, 156, 18, 0.3);
}

/* 展開ボタン */
.expand-button {
  color: #00d4ff;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
  padding: 0.8rem 1.2rem;
  border-radius: 20px;
  border: 1px solid #00d4ff;
  backdrop-filter: blur(10px);
  font-weight: 600;
  margin-top: auto;
  align-self: center;
}

.hobby-card:hover .expand-button {
  opacity: 1;
  transform: translateY(-5px);
}

/* モーダルスタイル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: linear-gradient(135deg, #1a1f25, #0f1923);
  border: 2px solid #ff4655;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(255, 70, 85, 0.3);
  transform: scale(0.7);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #333;
}

.modal-header h3 {
  color: #ff4655;
  margin: 0;
  font-size: 1.5rem;
}

.close-modal {
  background: none;
  border: none;
  color: #ff4655;
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.close-modal:hover {
  background-color: rgba(255, 70, 85, 0.2);
}

.modal-body {
  padding: 2rem;
  color: #e0e0e0;
  line-height: 1.7;
}

.modal-body h4 {
  color: #00d4ff;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.modal-body ul {
  margin-left: 1rem;
}

/* ホバーエフェクト強化 */
.hobby-card:hover h3 {
  color: #00d4ff;
  transform: translateY(-3px);
}

/* 3D効果 */
.hobby-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.hobby-card:hover {
  transform: translateY(-10px) rotateX(2deg) rotateY(2deg);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .hobbies-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hobby-card {
    min-height: 400px;
    padding: 2rem;
  }
  
  .hobbies-container h2 {
    font-size: 2rem;
  }
  
  .modal-content {
    width: 95%;
    margin: 1rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
}

/* 追加のレスポンシブ対応 */
@media (max-width: 1200px) {
  .secondary-hobbies {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 480px) {
  .hobbies-section {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }
  
  .hobbies-container h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  
  .hobby-card {
    padding: 1.5rem;
    min-height: 350px;
  }
  
  .hobby-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
  }
  
  .icon-symbol {
    font-size: 1.8rem;
  }
  
  .hobby-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
  }
  
  .hobby-card p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  .hobby-stats {
    gap: 0.6rem;
  }
  
  .stat {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .modal-content {
    width: 95%;
    margin: 0.5rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
}
