/**
 * AgentGallery CSS
 * 87개 AI 에이전트 갤러리 스타일
 * 
 * @author MuseFlow Team
 * @version 1.0.0
 * @date 2025-12-11
 */

.agent-gallery-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  background: #f7fafc;
  min-height: 100vh;
}

/* ========== 헤더 ========== */
.agent-gallery-header {
  background: white;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.header-content {
  flex: 1;
  min-width: 300px;
}

.gallery-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gallery-title i {
  color: #4299e1;
}

.gallery-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #718096;
}

.stat-item i {
  color: #4299e1;
}

.stat-item strong {
  color: #2d3748;
  font-size: 18px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* ========== 버튼 ========== */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: #4299e1;
  color: white;
}

.btn-primary:hover {
  background: #3182ce;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.btn-secondary {
  background: #edf2f7;
  color: #4a5568;
}

.btn-secondary:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ========== 필터 ========== */
.agent-filters {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filter-search {
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 600px;
}

.search-box i {
  position: absolute;
  left: 16px;
  color: #a0aec0;
  font-size: 16px;
}

.search-box input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.search-box .clear-search {
  position: absolute;
  right: 12px;
  background: #e2e8f0;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-box .clear-search:hover {
  background: #cbd5e0;
}

/* ========== 카테고리 필터 ========== */
.filter-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-btn {
  padding: 10px 20px;
  background: #edf2f7;
  border: 2px solid transparent;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #4a5568;
}

.category-btn i {
  color: #718096;
}

.category-btn:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.category-btn.active {
  background: #4299e1;
  color: white;
  border-color: #3182ce;
}

.category-btn.active i {
  color: white;
}

.category-count {
  background: rgba(255,255,255,0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.category-btn.active .category-count {
  background: rgba(255,255,255,0.25);
}

/* ========== 에이전트 그리드 ========== */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .agent-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== 에이전트 카드 ========== */
.agent-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.agent-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.card-header {
  padding: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  backdrop-filter: blur(10px);
}

.favorite-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.favorite-btn i {
  color: white;
  font-size: 16px;
}

.favorite-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

.favorite-btn.active {
  background: rgba(255,215,0,0.9);
}

.favorite-btn.active i {
  color: #fff;
}

.card-body {
  padding: 24px;
  flex: 1;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.card-category {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #718096;
  margin-bottom: 12px;
}

.card-category i {
  color: #4299e1;
}

.card-description {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
}

.card-footer {
  padding: 16px 24px;
  background: #f7fafc;
  display: flex;
  gap: 12px;
  border-top: 1px solid #e2e8f0;
}

.card-footer .btn {
  flex: 1;
}

/* ========== 빈 상태 ========== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #a0aec0;
}

.empty-state i {
  margin-bottom: 20px;
  color: #cbd5e0;
}

.empty-state p {
  font-size: 18px;
  margin: 0;
}

/* ========== 피드백 모달 ========== */
.feedback-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeInOverlay 0.3s ease-out;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.feedback-modal {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.feedback-header {
  padding: 24px 32px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feedback-header h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1a202c;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.feedback-header i {
  color: #4299e1;
}

.modal-close-btn {
  background: #edf2f7;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

.feedback-body {
  padding: 32px;
}

.feedback-body p {
  font-size: 15px;
  color: #4a5568;
  margin-bottom: 12px;
  line-height: 1.6;
}

.feedback-options {
  margin: 24px 0;
}

.feedback-options h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 16px;
}

.feedback-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  margin-bottom: 12px;
  background: #f7fafc;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
  font-weight: 500;
  color: #4a5568;
}

.feedback-option-btn i {
  font-size: 20px;
  color: #718096;
}

.feedback-option-btn:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

.feedback-option-btn.active {
  background: #ebf8ff;
  border-color: #4299e1;
  color: #2c5282;
}

.feedback-option-btn.active i {
  color: #4299e1;
}

.feedback-textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.feedback-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

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

.agent-card {
  animation: fadeIn 0.4s ease-out;
}

/* ========== 반응형 ========== */
@media (max-width: 1200px) {
  .agent-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .agent-gallery-container {
    padding: 16px;
  }
  
  .agent-gallery-header {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .header-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .agent-filters {
    padding: 16px;
  }
  
  .filter-categories {
    gap: 8px;
  }
  
  .category-btn {
    font-size: 13px;
    padding: 8px 16px;
  }
}
