/* 전체 리셋 및 기본 설정 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ivory: #f7f5f0;
  --warm-gray: #8a8578;
  --dark-gray: #4a4540;
  --ink-black: #2d2a26;
  --soft-beige: #e8e4db;
  --accent-brown: #6b5d4f;
  --paper-white: #fefdfb;
  --border-color: #d4cec3;
  --cute-pink: #ffb8b8;
  --cute-blue: #b8d4ff;
  --cute-yellow: #fff4b8;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--ivory);
  color: var(--ink-black);
  line-height: 1.7;
  font-size: 16px;
}

/* 컨테이너 */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* 헤더 */
header {
  background: linear-gradient(135deg, #fefdfb 0%, #f7f5f0 100%);
  border-bottom: 3px solid var(--border-color);
  padding: 25px 0;
  margin-bottom: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.site-title h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-black);
  letter-spacing: -0.5px;
  position: relative;
}

.site-title h1::after {
  content: '✨';
  margin-left: 8px;
  font-size: 20px;
}

.site-title p {
  font-size: 14px;
  color: var(--warm-gray);
  font-weight: 400;
}

nav {
  display: flex;
  gap: 15px;
  align-items: center;
}

nav a {
  color: var(--dark-gray);
  text-decoration: none;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.2s;
  background-color: rgba(232, 228, 219, 0.5);
}

nav a:hover {
  background-color: var(--soft-beige);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

nav a.active {
  color: var(--ink-black);
  font-weight: 600;
  background-color: var(--soft-beige);
}

/* 메인 페이지 */
.main-welcome {
  text-align: center;
  padding: 60px 20px;
}

.main-visual {
  margin: 40px 0;
}

.main-visual img {
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.main-description {
  max-width: 600px;
  margin: 40px auto;
  padding: 30px;
  background-color: var(--paper-white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-align: left;
  line-height: 1.9;
}

.main-description p {
  margin-bottom: 15px;
  color: var(--dark-gray);
}

.board-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  max-width: 900px;
  margin: 40px auto;
}

.board-item {
  background: linear-gradient(135deg, #ffffff 0%, #fefdfb 100%);
  border: 2px solid var(--border-color);
  padding: 25px 20px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--ink-black);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 220px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.board-item::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 244, 184, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.board-item:hover {
  border-color: var(--accent-brown);
  background: linear-gradient(135deg, #fefdfb 0%, #f7f5f0 100%);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.board-item:hover::before {
  top: -30%;
  right: -30%;
}

.board-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.board-item:hover .board-icon {
  transform: scale(1.1) rotate(5deg);
}

.board-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink-black);
  position: relative;
  z-index: 1;
}

.board-item p {
  font-size: 13px;
  color: var(--warm-gray);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* 설문조사 보드 카드 특별 스타일 */
.survey-board-card {
  cursor: default;
  min-height: 260px;
}

.survey-board-card:hover {
  transform: none;
}

.survey-board-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  z-index: 1;
  position: relative;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 게시판 페이지 */
.board-header {
  background-color: var(--paper-white);
  padding: 25px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  margin-bottom: 30px;
}

.board-header h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}

.board-header p {
  font-size: 14px;
  color: var(--warm-gray);
}

.board-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent-brown) 0%, #5a4d3f 100%);
  color: var(--paper-white);
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(107, 93, 79, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(107, 93, 79, 0.4);
}

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

.btn-secondary {
  background: linear-gradient(135deg, var(--warm-gray) 0%, #7a7568 100%);
  box-shadow: 0 4px 12px rgba(138, 133, 120, 0.3);
}

.btn-secondary:hover {
  box-shadow: 0 6px 16px rgba(138, 133, 120, 0.4);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 20px;
}

/* 게시글 목록 (노트 스타일) */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-item {
  background: linear-gradient(to right, var(--paper-white) 0%, #fefdfb 100%);
  border-left: 4px solid var(--border-color);
  padding: 20px;
  text-decoration: none;
  color: var(--ink-black);
  transition: all 0.3s ease;
  position: relative;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.post-item-content {
  flex: 1;
  min-width: 0;
}

.post-item-thumbnail {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-item-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.post-item::before {
  content: '📝';
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 20px;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.post-item:hover {
  border-left-color: var(--accent-brown);
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-item:hover::before {
  opacity: 0.6;
  transform: rotate(10deg);
}

.post-item h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.5;
  color: var(--ink-black);
}

.post-meta {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: var(--warm-gray);
  margin-bottom: 12px;
}

.post-preview {
  font-size: 14px;
  color: var(--dark-gray);
  line-height: 1.6;
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.post-stats {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: var(--warm-gray);
}

/* 게시글 상세 */
.post-detail {
  background-color: var(--paper-white);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 3px;
  margin-bottom: 30px;
}

.post-detail h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.4;
}

.post-detail .post-meta {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 25px;
}

.post-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-black);
  margin-bottom: 25px;
  white-space: pre-wrap;
}

/* 게시글/댓글 첨부 이미지 */
.post-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
}

.post-attachment-item {
  position: relative;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.post-attachment-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.post-attachment-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.post-attachment-filename {
  padding: 10px;
  font-size: 13px;
  color: #4b5563;
  background: white;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid #e5e7eb;
}

.post-actions {
  display: flex;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* 공감 버튼 */
.reactions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.reaction-btn {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--soft-beige) 0%, #e0dcd3 100%);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--dark-gray);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.reaction-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
  border-radius: 25px;
  transition: transform 0.3s ease;
}

.reaction-btn:hover {
  background: linear-gradient(135deg, #e8e4db 0%, #d4cec3 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.reaction-btn:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

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

/* 답글 영역 */
.replies-section {
  background-color: var(--paper-white);
  border: 1px solid var(--border-color);
  padding: 25px;
  border-radius: 3px;
}

.replies-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--dark-gray);
}

.reply-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--soft-beige);
}

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

.reply-item.ai-reply {
  background: linear-gradient(135deg, #f0f8ff 0%, #e6f2ff 100%);
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #b8d4ff;
  margin: 15px 0;
  box-shadow: 0 4px 12px rgba(184, 212, 255, 0.3);
}

.reply-item.ai-reply .reply-author {
  color: #2563eb;
  font-weight: 700;
  font-size: 15px;
}

.reply-item.ai-reply .reply-content {
  color: #1e40af;
  line-height: 1.9;
  font-size: 15px;
}

/* AI 공지 박스 */
.ai-notice {
  background: linear-gradient(135deg, #e6f2ff 0%, #f0f8ff 100%);
  border: 2px solid #b8d4ff;
  border-radius: 15px;
  padding: 25px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  box-shadow: 0 4px 12px rgba(184, 212, 255, 0.3);
  animation: fadeInDown 0.5s ease;
}

.ai-notice-research {
  background: linear-gradient(135deg, #e6f2ff 0%, #f0f8ff 100%);
  border-color: #4a90e2;
}

.ai-notice-admin {
  background: linear-gradient(135deg, #fff4e6 0%, #fef9f3 100%);
  border-color: #f59e0b;
}

.ai-notice-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.ai-notice-content {
  flex: 1;
}

.ai-notice-content strong {
  display: block;
  font-size: 18px;
  color: #1e40af;
  margin-bottom: 12px;
}

.ai-notice-admin strong {
  color: #b45309;
}

.ai-role-desc {
  font-size: 14px;
  color: #374151;
  margin: 10px 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  font-weight: 500;
}

.ai-features {
  display: grid;
  gap: 8px;
  margin: 15px 0;
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
}

.ai-feature-item {
  font-size: 13px;
  color: #1f2937;
  padding: 6px 0;
  display: flex;
  align-items: center;
  line-height: 1.6;
}

.ai-usage-tip {
  font-size: 13px;
  color: #059669;
  margin: 12px 0 8px 0;
  padding: 10px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  font-weight: 500;
}

.ai-limit-info {
  font-size: 13px;
  color: #dc2626;
  margin: 8px 0 0 0;
  padding: 10px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  font-weight: 500;
}

/* AI 대화 섹션 */
.ai-conversation-section {
  background: linear-gradient(135deg, #f0f8ff 0%, #fef9f3 100%);
  border: 3px solid #b8d4ff;
  border-radius: 15px;
  padding: 30px;
  margin: 30px 0;
  box-shadow: 0 6px 20px rgba(184, 212, 255, 0.4);
}

.ai-section-header {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #b8d4ff;
}

.ai-section-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-section-description {
  color: #1e40af;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.ai-question-item {
  background: white;
  border: 2px solid #e0e7ff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
  transition: all 0.3s ease;
}

.ai-question-item:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.question-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.question-number {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
}

.question-author {
  color: #4f46e5;
  font-weight: 600;
  font-size: 14px;
}

.question-date {
  color: var(--warm-gray);
  font-size: 13px;
  margin-left: auto;
}

.question-content {
  background: #fef3c7;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
  margin-bottom: 15px;
  line-height: 1.7;
}

.question-content strong {
  color: #d97706;
  font-weight: 700;
}

.answer-content {
  background: #e0f2fe;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #0ea5e9;
  line-height: 1.8;
}

.answer-content strong {
  color: #0369a1;
  font-weight: 700;
}

.answer-loading {
  color: var(--warm-gray);
  font-style: italic;
  padding: 10px;
  text-align: center;
}

.no-questions {
  text-align: center;
  color: var(--warm-gray);
  padding: 30px;
  font-size: 15px;
}

.ai-question-form {
  background: white;
  border: 2px dashed #b8d4ff;
  border-radius: 12px;
  padding: 25px;
  margin-top: 25px;
}

.ai-question-form h4 {
  font-size: 17px;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 20px;
}

.ai-question-limit {
  background: #fef3c7;
  border: 2px solid #fbbf24;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
}

.ai-question-limit p {
  color: #92400e;
  font-size: 13px;
  margin: 5px 0;
  line-height: 1.6;
}

.ai-question-limit p:first-child {
  font-weight: 600;
}

.ai-limit-reached {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 25px;
  margin-top: 25px;
  text-align: center;
}

.ai-limit-reached h4 {
  font-size: 18px;
  font-weight: 700;
  color: #047857;
  margin-bottom: 12px;
}

.ai-limit-reached p {
  color: #065f46;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.ai-notice-icon {
  font-size: 32px;
  flex-shrink: 0;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

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

.ai-notice-content {
  flex: 1;
}

.ai-notice-content strong {
  display: block;
  color: #2563eb;
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 700;
}

.ai-notice-content p {
  color: #1e40af;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

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

.reply-author {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-black);
}

.reply-date {
  font-size: 13px;
  color: var(--warm-gray);
}

.reply-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--dark-gray);
  white-space: pre-wrap;
  margin-bottom: 8px;
}

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

/* 폼 */
.form {
  background: linear-gradient(135deg, #ffffff 0%, var(--paper-white) 100%);
  border: 2px solid var(--border-color);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--dark-gray);
  font-weight: 600;
}

.form-group label::before {
  content: '✏️ ';
  margin-right: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background-color: var(--ivory);
  color: var(--ink-black);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-brown);
  background-color: var(--paper-white);
  box-shadow: 0 0 0 3px rgba(107, 93, 79, 0.1);
}

.form-group textarea {
  min-height: 200px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--warm-gray);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
}

/* 로딩 및 메시지 */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--warm-gray);
}

.error-message {
  background-color: #f8e8e8;
  color: #a04040;
  padding: 15px;
  border-radius: 3px;
  margin-bottom: 20px;
  border-left: 3px solid #a04040;
}

.success-message {
  background-color: #e8f4e8;
  color: #4a7a4a;
  padding: 15px;
  border-radius: 3px;
  margin-bottom: 20px;
  border-left: 3px solid #4a7a4a;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  background-color: var(--paper-white);
  color: var(--dark-gray);
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.pagination button:hover {
  background-color: var(--soft-beige);
}

.pagination button.active {
  background-color: var(--accent-brown);
  color: var(--paper-white);
  border-color: var(--accent-brown);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* AI 대화 섹션 (상하 배치 - 가독성 개선) */
.ai-conversation-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #bae6fd;
  border-radius: 12px;
  padding: 35px;
  margin: 30px 0;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
}

.ai-section-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid #3b82f6;
}

.ai-section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-progress {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
}

.progress-count {
  font-size: 18px;
  font-weight: 600;
  color: #3b82f6;
  background: white;
  padding: 6px 16px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.progress-remaining {
  font-size: 15px;
  color: #64748b;
  font-weight: 500;
}

.ai-section-description {
  color: #475569;
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}

/* AI 질문 카드 */
.ai-questions-container {
  margin: 25px 0;
}

.ai-question-card {
  background: white;
  border: 2px solid #e0f2fe;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.ai-question-card:hover {
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
}

.ai-question-card .question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.question-number {
  font-size: 14px;
  font-weight: 700;
  color: #3b82f6;
  background: #eff6ff;
  padding: 4px 12px;
  border-radius: 12px;
}

.question-meta {
  display: flex;
  gap: 15px;
  align-items: center;
}

.question-author {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.author-badge {
  background: #fbbf24;
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 5px;
}

.question-date {
  font-size: 13px;
  color: #94a3b8;
}

.question-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.question-text,
.answer-text {
  padding: 18px;
  border-radius: 8px;
}

.question-text {
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
}

.answer-text {
  background: #ecfdf5;
  border-left: 4px solid #10b981;
}

.question-label,
.answer-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.question-label {
  color: #3b82f6;
}

.answer-label {
  color: #10b981;
}

.question-text p,
.answer-text p {
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
  margin: 0;
  white-space: pre-wrap;
}

.answer-loading {
  background: #fef3c7;
  border: 2px dashed #fbbf24;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: #92400e;
  font-weight: 500;
  font-size: 14px;
}

.no-questions {
  text-align: center;
  padding: 50px 20px;
  color: #64748b;
}

.no-questions p:first-child {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #475569;
}

.no-questions p:last-child {
  font-size: 15px;
  line-height: 1.7;
}

/* AI 질문 폼 */
.ai-question-form-wrapper {
  margin-top: 30px;
}

.ai-question-form {
  background: white;
  border: 2px solid #bae6fd;
  border-radius: 10px;
  padding: 30px;
}

.ai-question-form h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 25px;
}

.ai-question-limit {
  background: #fef3c7;
  border: 2px solid #fbbf24;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #92400e;
}

.limit-icon {
  font-size: 18px;
}

.remaining-badge {
  background: #fbbf24;
  color: white;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  margin-left: auto;
}

/* 연구자 토론 섹션 */
.researcher-discussion-section {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #bbf7d0;
  border-radius: 12px;
  padding: 35px;
  margin: 30px 0;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
}

.researcher-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 3px solid #10b981;
}

.researcher-section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reply-count {
  font-size: 16px;
  font-weight: 600;
  color: #10b981;
  background: white;
  padding: 6px 16px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* 답글 카드 */
.replies-container {
  margin: 25px 0;
}

.reply-card {
  background: white;
  border: 2px solid #d1fae5;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 15px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.reply-card:hover {
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.reply-card.ai-initial-reply {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
  border-width: 3px;
}

.reply-card .reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.reply-author {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.reply-date {
  font-size: 13px;
  color: #94a3b8;
}

.reply-content {
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
  white-space: pre-wrap;
  margin-bottom: 15px;
}

.reply-actions {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.no-replies {
  text-align: center;
  padding: 50px 20px;
  color: #64748b;
}

.no-replies p:first-child {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #475569;
}

.no-replies p:last-child {
  font-size: 15px;
  line-height: 1.7;
}

/* 답글 작성 폼 */
.reply-form-wrapper {
  margin-top: 30px;
}

.reply-form-wrapper h3 {
  font-size: 20px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 20px;
}

.reply-form {
  background: white;
  border: 2px solid #bbf7d0;
  border-radius: 10px;
  padding: 30px;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-large {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
}

/* AI 제한 도달 메시지 */
.ai-limit-reached {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 3px solid #10b981;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  margin-top: 30px;
}

.ai-limit-reached .limit-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.ai-limit-reached h3 {
  font-size: 22px;
  font-weight: 700;
  color: #047857;
  margin-bottom: 15px;
}

.ai-limit-reached p {
  color: #065f46;
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
}

/* 반응형 */
@media (max-width: 768px) {
  .ai-conversation-section,
  .researcher-discussion-section {
    padding: 20px;
  }
  
  .ai-section-header h2,
  .researcher-section-header h2 {
    font-size: 20px;
  }
  
  .ai-progress {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .ai-question-card,
  .reply-card {
    padding: 18px;
  }
  
  .ai-question-form,
  .reply-form {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  header .container {
    flex-direction: column;
    gap: 20px;
  }
  
  nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .board-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .board-list {
    grid-template-columns: 1fr;
  }
  
  .split-container {
    gap: 15px;
  }
  
  .left-panel,
  .right-panel {
    padding: 15px;
    max-height: 500px;
  }
  
  .scrollable-content {
    min-height: 200px;
    max-height: 300px;
  }
}

/* 숨김 */
.hidden {
  display: none;
}

/* 파일 업로드 */
.file-upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
}

.file-upload-area:hover {
  border-color: #7fb3d5;
  background: #f0f8ff;
}

.file-upload-area.dragover {
  border-color: #7fb3d5;
  background: #e6f3ff;
}

.file-upload-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.file-upload-text {
  font-size: 16px;
  color: #333;
  margin-bottom: 5px;
  font-weight: 500;
}

.file-upload-hint {
  font-size: 13px;
  color: #888;
}

.file-preview {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-preview-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  min-width: 200px;
  gap: 10px;
}

.file-preview-item.uploading {
  opacity: 0.6;
}

.file-preview-item.uploaded {
  opacity: 1;
}

.file-thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.file-icon {
  font-size: 32px;
  width: 50px;
  text-align: center;
}

.file-info {
  flex: 1;
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  word-break: break-all;
}

.file-size {
  font-size: 12px;
  color: #888;
  margin-top: 3px;
}

.file-remove {
  background: none;
  border: none;
  color: #ff6b6b;
  font-size: 20px;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
}

.file-remove:hover {
  color: #ff5252;
}

/* 게시글 상세 - 첨부파일 표시 */
.post-attachments {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.post-attachments-title {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 10px;
}

.post-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.post-attachment-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  max-width: 200px;
}

.post-attachment-item img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.2s;
}

.post-attachment-item img:hover {
  transform: scale(1.05);
}

.post-attachment-pdf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
}

.post-attachment-pdf:hover {
  background: #f0f0f0;
}

.post-attachment-pdf-icon {
  font-size: 32px;
}

.post-attachment-pdf-name {
  font-size: 14px;
  font-weight: 500;
}

/* ==================== 설문조사 스타일 ==================== */
.survey-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.survey-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
  background: linear-gradient(135deg, #6b9999 0%, #8ab4b4 100%);
  border-radius: 12px;
  color: white;
}

.survey-header h1 {
  margin: 0 0 12px 0;
  font-size: 32px;
  font-weight: 700;
}

.survey-desc {
  margin: 8px 0;
  font-size: 16px;
  opacity: 0.95;
}

.survey-info {
  margin: 12px 0 0 0;
  font-size: 14px;
  opacity: 0.9;
}

.survey-form {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.survey-question {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e5e7eb;
}

.survey-question:last-of-type {
  border-bottom: none;
}

.survey-question-number {
  display: inline-block;
  background: #6b9999;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.survey-question-text {
  font-size: 18px;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 20px;
  line-height: 1.6;
}

.survey-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.survey-radio {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
}

.survey-radio:hover {
  border-color: #6b9999;
  background: #f0f9f9;
}

.survey-radio input[type="radio"] {
  display: none;
}

.survey-radio input[type="radio"]:checked + .survey-score {
  background: #6b9999;
  color: white;
  transform: scale(1.1);
}

.survey-radio:has(input:checked) {
  border-color: #6b9999;
  background: #f0f9f9;
}

.survey-score {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 600;
  background: #f3f4f6;
  color: #4b5563;
  transition: all 0.2s;
}

.survey-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
  padding: 0 8px;
}

.survey-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e5e7eb;
}

.survey-already-submitted {
  text-align: center;
  padding: 60px 30px;
  background: white;
  border-radius: 12px;
}

.survey-check-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.survey-already-submitted h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #1f2937;
}

.survey-already-submitted p {
  color: #6b7280;
  margin: 8px 0;
  font-size: 16px;
}

.survey-already-submitted button {
  margin-top: 24px;
}

/* 설문 결과 스타일 */
.survey-password-form {
  background: white;
  border-radius: 12px;
  padding: 40px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.survey-stats-summary {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-top: 20px;
}

.survey-stat-item {
  text-align: center;
}

.survey-stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.survey-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: white;
}

.survey-results-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 40px;
}

.survey-result-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.survey-result-question {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.survey-result-number {
  background: #6b9999;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.survey-result-text {
  font-size: 16px;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.6;
}

.survey-result-avg {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 20px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  text-align: center;
}

.survey-result-avg strong {
  color: #6b9999;
  font-size: 24px;
  font-weight: 700;
  margin: 0 4px;
}

.survey-result-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.survey-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.survey-bar-label {
  width: 40px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  text-align: right;
}

.survey-bar-container {
  flex: 1;
  height: 32px;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.survey-bar {
  height: 100%;
  background: linear-gradient(90deg, #6b9999 0%, #8ab4b4 100%);
  border-radius: 6px;
  transition: width 0.6s ease;
}

.survey-bar-value {
  min-width: 100px;
  font-size: 13px;
  color: #6b7280;
  text-align: right;
}

.survey-no-data {
  text-align: center;
  padding: 60px 30px;
  background: white;
  border-radius: 12px;
}

.survey-no-data p {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 24px;
}

/* 날짜별 추이 섹션 */
.survey-trend-section {
  margin: 40px 0 60px 0;
}

.survey-section-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 40px 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid #6b9999;
}

.survey-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.survey-chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.survey-chart-card.full-width {
  grid-column: 1 / -1;
}

.survey-chart-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 20px 0;
  text-align: center;
}

.survey-chart-card canvas {
  max-height: 300px;
}

/* 반응형 */
@media (max-width: 768px) {
  .survey-chart-grid {
    grid-template-columns: 1fr;
  }
  
  .survey-chart-card.full-width {
    grid-column: 1;
  }
  
  .survey-scale {
    gap: 6px;
  }
  
  .survey-radio {
    padding: 8px 4px;
  }
  
  .survey-score {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .survey-scale-labels {
    font-size: 11px;
  }
  
  .survey-bar-value {
    min-width: 80px;
    font-size: 12px;
  }
  
  /* 게시글 목록 썸네일 반응형 */
  .post-item {
    flex-direction: column;
  }
  
  .post-item-thumbnail {
    width: 100%;
    height: 180px;
  }
  
  .post-attachments {
    grid-template-columns: 1fr;
  }
}

