.comments-section,
/* ================================
   댓글 섹션 - 프로덕션 레벨 디자인
   ================================ */
/* 댓글 섹션 - 간결한 스타일 (네이버/디씨) */
.reviews-section {
  background: #fff;
  border-top: 2px solid #e5e5e5;
  padding: 30px 0;
  margin-top: 40px;
}

[data-theme="dark"] .reviews-section {
  background: #1a1a1a;
  border-top-color: #333;
}

.comments-title,
.reviews-title {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.25rem;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e5e5;
}

[data-theme="dark"] .comments-title,
[data-theme="dark"] .reviews-title {
  color: #e5e5e5;
  border-bottom-color: #333;
}

/* 댓글 폼 - 간결한 스타일 */
.comment-form-container {
  margin-bottom: 24px;
  padding: 16px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
}

[data-theme="dark"] .comment-form-container {
  background: #2a2a2a;
  border-color: #444;
}

/* 폼 헤더 */
.form-header {
  margin-bottom: 12px;
}

.form-header i {
  display: none;
}

.form-header h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

[data-theme="dark"] .form-header h4 {
  color: #e5e5e5;
}

.form-description {
  font-size: 0.8rem;
  color: #888;
  margin: 0;
}

/* 폼 입력 - 간결한 스타일 */
.form-row {
  display: none;
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
  display: block;
}

[data-theme="dark"] .form-group label {
  color: #aaa;
}

.form-group label i {
  display: none;
}

/* 입력 필드 */
.comment-form-container .form-control {
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #fff;
  color: #333;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

[data-theme="dark"] .comment-form-container .form-control {
  background: #1a1a1a;
  border-color: #444;
  color: #e5e5e5;
}

.comment-form-container .form-control:focus {
  border-color: #4a90e2;
  outline: none;
}

.comment-form-container textarea.form-control {
  min-height: 80px;
  max-height: 200px;
  height: 100px;
  resize: none;
  line-height: 1.5;
  overflow-y: auto;
}

/* 힌트 텍스트 */
.form-hint {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
  display: block;
}

/* 글자 수 카운터 */
.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}

.char-count i {
  display: none;
}

/* 제출 버튼 */
.form-actions {
  margin-top: 10px;
  text-align: right;
}

.btn-submit {
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  background: #4a90e2;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.btn-submit:hover {
  background: #357abd;
}

.btn-submit i {
  display: none;
}

/* ================================
   댓글 카드 - 프로덕션 레벨 디자인
   ================================ */
.comment-card {
  background: #ffffff;
  border: 2px solid #f0f0f0;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.comment-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #8b63ca;
  border-radius: 16px 0 0 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.comment-card:hover::before {
  opacity: 1;
}

.comment-card:hover {
  border-color: #e0e0e0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.comment-author {
  font-size: 1.05rem;
  font-weight: 700;
  color: #212529;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}

[data-theme="dark"] .comment-author {
  color: #e5e5e5;
}

.comment-author::before {
  display: none;
}

.comment-meta {
  font-size: 0.75rem;
  color: #888;
  margin-top: 2px;
}

.comment-date {
  display: inline;
}

.comment-date i {
  display: none;
}

.comment-content {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #333;
  margin: 8px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

[data-theme="dark"] .comment-content {
  color: #ddd;
}

.comment-actions {
  margin-top: 6px;
  display: flex;
  gap: 6px;
}

.comment-edit-btn,
.comment-delete-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
  color: #666;
  cursor: pointer;
}

[data-theme="dark"] .comment-edit-btn,
[data-theme="dark"] .comment-delete-btn {
  background: #2a2a2a;
  border-color: #444;
  color: #aaa;
}

.comment-edit-btn:hover {
  background: #f0f0f0;
  border-color: #4a90e2;
  color: #4a90e2;
}

.comment-delete-btn:hover {
  background: #f0f0f0;
  border-color: #e74c3c;
  color: #e74c3c;
}

.reviews-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.reviews-loading i {
  font-size: 32px;
  margin-bottom: 12px;
}

.form-actions {
  margin-top: 15px;
  text-align: right;
}

.btn-primary {
  background: #8b63ca;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  color: #ffffff;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow-medium);
  color: var(--bg-primary);
}

/* 댓글 아이템 - 간결한 스타일 */
.comment-item {
  padding: 12px 0;
  border-bottom: 1px solid #e5e5e5;
}

[data-theme="dark"] .comment-item {
  border-bottom-color: #333;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.commenter-name {
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.comment-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.comment-content {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.comment-actions {
  display: flex;
  gap: 15px;
}

.reply-btn {
  background: none;
  border: none;
  color: var(--brand-primary);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.reply-btn:hover {
  color: var(--brand-secondary);
}

.replies {
  margin-top: 20px;
  margin-left: 30px;
  padding-left: 20px;
  border-left: 3px solid var(--border-color);
  transition: border-color 0.3s ease;
}

.reply-item {
  padding: 15px 0;
  border-bottom: 1px solid #f1f3f4;
}

.reply-item:last-child {
  border-bottom: none;
}

.empty-comments {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.error-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.error-icon {
  font-size: 4rem;
  color: var(--brand-primary);
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

.error-state h2 {
  color: var(--text-primary);
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.error-state p {
  color: var(--text-muted);
  margin-bottom: 30px;
  transition: color 0.3s ease;
}

/* 인라인 편집 스타일 */
.comment-card.editing {
  background: #f8f5fc;
  border: 2px solid #8b63ca;
  box-shadow: 0 8px 24px rgba(139, 99, 202, 0.2);
  transform: scale(1.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-content-wrapper {
  position: relative;
}

.comment-content {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  color: #2d3748;
  padding: 4px 0;
}

.comment-edit-form {
  display: none;
  animation: slideDown 0.3s ease;
}

.comment-card.editing .comment-content {
  display: none;
}

.comment-card.editing .comment-edit-form {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.edit-textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 2px solid #4a90e2;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Noto Sans KR', sans-serif;
  line-height: 1.6;
  resize: vertical;
  background: #fff;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

.edit-textarea:focus {
  outline: none;
  border-color: #357abd;
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.25);
}

.edit-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 12px;
}

.edit-char-count {
  font-size: 0.9rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.edit-char-count.warning {
  color: #f59e0b;
}

.edit-char-count.danger {
  color: #ef4444;
  font-weight: 600;
}

.edit-actions {
  display: flex;
  gap: 8px;
}

.edit-btn-cancel,
.edit-btn-save {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.edit-btn-cancel {
  background: #fff;
  color: #6c757d;
  border: 2px solid #e5e7eb;
}

.edit-btn-cancel:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #4b5563;
}

.edit-btn-save {
  background: #8b63ca;
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 99, 202, 0.3);
}

.edit-btn-save:hover {
  background: #7952b3;
  box-shadow: 0 6px 16px rgba(139, 99, 202, 0.4);
  transform: translateY(-2px);
}

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

.edit-btn-save:disabled,
.edit-btn-cancel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comment-actions {
  margin-top: 12px;
}

.comment-card.editing .comment-actions {
  display: none;
}

/* ==================== 리뷰 시스템 전문 디자인 ==================== */

/* 리뷰 섹션 컨테이너 */
#reviewsSection {
  max-width: 900px;
  margin: 60px auto;
  padding: 40px 20px;
}

/* 리뷰 카드 */
.review-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.review-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* 리뷰 헤더 (작성자, 날짜, 별점) */
.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.review-author-info {
  flex: 1;
}

.review-author {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #666;
}

.review-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.review-date i {
  font-size: 12px;
}

.edited-badge {
  background: #fff3cd;
  color: #856404;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

/* 별점 표시 */
.review-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.review-rating i {
  color: #8b63ca;
  font-size: 16px;
}

.review-rating i.fa-star-o {
  color: #ddd;
}

/* 리뷰 내용 */
.review-content {
  font-size: 15px;
  line-height: 1.7;
  color: #333;
  margin: 16px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ==================== 리뷰 액션 버튼 (핵심!) ==================== */
.review-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

/* 모든 버튼 공통 스타일 */
.review-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #d0d0d0;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.review-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.review-actions button:active {
  transform: translateY(0);
}

/* 좋아요 버튼 */
.like-btn {
  color: #e74c3c !important;
  border-color: #e74c3c !important;
}

.like-btn:hover {
  background: #fff5f5 !important;
  border-color: #c0392b !important;
}

.like-btn.liked {
  background: #e74c3c !important;
  color: #ffffff !important;
  border-color: #e74c3c !important;
}

.like-btn i {
  font-size: 15px;
}

/* 싫어요 버튼 */
.dislike-btn {
  color: #3498db !important;
  border-color: #3498db !important;
}

.dislike-btn:hover {
  background: #f0f8ff !important;
  border-color: #2980b9 !important;
}

.dislike-btn.disliked {
  background: #3498db !important;
  color: #ffffff !important;
  border-color: #3498db !important;
}

.dislike-btn i {
  font-size: 15px;
}

/* 수정 버튼 */
.edit-btn {
  color: #27ae60 !important;
  border-color: #27ae60 !important;
}

.edit-btn:hover {
  background: #f0fff4 !important;
  border-color: #229954 !important;
}

/* 삭제 버튼 */
.delete-btn {
  color: #e74c3c !important;
  border-color: #e74c3c !important;
}

.delete-btn:hover {
  background: #fff5f5 !important;
  border-color: #c0392b !important;
}

/* 로딩 스피너 */
.loading-spinner {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.loading-spinner i {
  font-size: 40px;
  color: #ddd;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 리뷰 없음 메시지 */
.no-reviews {
  text-align: center;
  padding: 80px 20px;
  color: #999;
  font-size: 16px;
  font-style: italic;
}
