/* =========================================
   뇌과학 상식 아코디언 & 맨 위로 버튼
   ========================================= */

/* ===== 아코디언 스타일 ===== */
.brain-accordion-item {
  margin-bottom: 12px;
}

.brain-accordion-header {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  min-height: 60px;
}

.brain-accordion-header:hover,
.brain-accordion-header.active {
  background: #f9fafb;
  border-color: #2196F3;
  box-shadow: 0 4px 8px rgba(33, 150, 243, 0.15);
}

.brain-accordion-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  flex: 1;
}

.brain-accordion-icon {
  font-size: 16px;
  color: #6b7280;
  transition: transform 0.3s ease;
  width: 20px;
  text-align: center;
}

.brain-accordion-content {
  overflow: hidden;
  transition: all 0.3s ease;
}

/* ===== 카테고리 아이템 호버 효과 ===== */
.brain-category-item:hover {
  background: #f0f9ff !important;
  box-shadow: 0 2px 6px rgba(33, 150, 243, 0.2);
  transform: translateX(4px);
}

/* ===== 맨 위로 버튼 ===== */
.brain-scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  background: #2196F3;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  display: none; /* JavaScript로 토글 */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
  z-index: 999;
  transition: all 0.3s ease;
  animation: fadeIn 0.3s ease;
}

.brain-scroll-top-btn:hover {
  background: #1976D2;
  box-shadow: 0 6px 16px rgba(33, 150, 243, 0.6);
  transform: translateY(-4px);
}

.brain-scroll-top-btn:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(33, 150, 243, 0.5);
}

/* ===== 애니메이션 ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 반응형 (모바일 최적화) ===== */
@media (max-width: 480px) {
  .brain-accordion-header {
    padding: 14px 16px;
    min-height: 56px;
  }
  
  .brain-accordion-title {
    font-size: 15px;
  }
  
  .brain-scroll-top-btn {
    width: 48px;
    height: 48px;
    right: 16px;
    bottom: 16px;
    font-size: 20px;
  }
}
