/* base.css 파일 import */
@import url('base.css');

/* ----------------------------------------------
✅ 수다방 전용 스타일
----------------------------------------------- */

/* ----------------------------------------------
✅ 2. 햄버거 사이드 메뉴 (왼쪽 슬라이드)
----------------------------------------------- */
.side-menu {
  position: absolute;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background: white;
  z-index: 99;
  transition: left 0.3s ease;
  box-shadow: 4px 0 12px rgba(0,0,0,0.1);
  padding: 20px;
}
.side-menu.active {
  left: 0;
}

.side-menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 90;
}
.side-menu-overlay.active {
  display: block;
}

.side-menu-header {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  cursor: pointer;
}
.side-menu-list {
  list-style: none;
  padding: 0;
}
.side-menu-list li {
  margin-bottom: 12px;
}
.side-menu-list a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

/* ----------------------------------------------
✅ 3. 상단 헤더
----------------------------------------------- */
header {
  height: 88px; /* ✅ 여백 더 확보 */
  padding: 0 20px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  position: relative;
}

/* ✅ 로고를 중앙에 고정 + 크기 확대 */
.logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* ✅ 정확한 수직·수평 중앙 */
  z-index: 2;
}
.logo img {
  height: 72px;
  max-height: 80px;
  display: block;
}
@media (min-width: 768px) {
  .logo img {
    height: 80px;
  }
}

.menu-icon, .search-icon, .mypage-icon {
  font-size: 28px;
  color: #5757ff;
  cursor: pointer;
}

/* ----------------------------------------------
✅ 4. 메인 배너 슬라이더
----------------------------------------------- */
.main-slider {
  margin-top: 0;
}
.main-slider img {
  width: 100%;
  border-radius: 0;
  display: block;
}

/* ----------------------------------------------
✅ 5. 최신 테스트 제목
----------------------------------------------- */
.section-title {
  padding: 16px 16px 8px;
  font-size: 18px;
  font-weight: bold;
}

/* ----------------------------------------------
✅ 6. 테스트 카드 슬라이더
----------------------------------------------- */
.test-slider {
  padding: 0 12px;
}
.slick-slide {
  display: flex;
  justify-content: center;
}
.test-card {
  width: 120px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  text-align: center;
  margin-right: 12px;
}
.test-card img {
  width: 100%;
  aspect-ratio: 210 / 297;
  object-fit: cover;
}
.test-title {
  font-size: 13px;
  padding: 6px 4px 2px;
}
.test-views {
  font-size: 12px;
  color: #888;
  padding-bottom: 6px;
}

/* ----------------------------------------------
✅ 7. 푸터
----------------------------------------------- */
.site-footer {
  text-align: center;
  font-size: 12px;
  color: #888;
  padding: 24px 12px;
  background: #f9f9f9;
}
.footer-links {
  margin-bottom: 8px;
}
.footer-links a {
  color: #666;
  text-decoration: none;
  margin: 0 6px;
  font-weight: 500;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-copy {
  color: #aaa;
}

/* ----------------------------------------------
✅ 8. 검색창 클릭 시 애니메이션 효과 (세련된 스타일)
---------------------------------------------- */
.search-box {
  display: flex;
  align-items: center;
  background: #f2f4f8;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  padding: 12px 16px;
  transform: scale(1);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none;
  margin-bottom: 200px; /* ✅ 하단 여백 넉넉히 */
  will-change: transform;
}

.search-box.focused {
  background: #ffffff !important;
  border-color: #a0a0ff !important;
  box-shadow: 0 4px 12px rgba(90, 90, 255, 0.15) !important;
  transform: scale(1.01) !important;
}

.search-box .search-icon {
  font-size: 18px;
  margin-right: 10px;
  color: #aaa;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.search-box.focused .search-icon {
  color: #5757ff;
}

.search-box .search-input {
  all: unset;
  box-sizing: border-box !important;
  width: 100% !important;
  font-size: 15px !important;
  font-family: 'Pretendard', sans-serif !important;
  color: #333 !important;
  background: transparent !important;
  outline: none !important;
  transition: all 0.3s ease !important;
  line-height: 1.4;
  padding: 0 !important;
}

/* ----------------------------------------------
✅ 상단 헤더 돋보기 아이콘 (사이즈 복구)
---------------------------------------------- */
.search-header-icon {
  font-size: 24px;
  color: #333;
  cursor: pointer;
}

/* ----------------------------------------------
✅ 추천 검색어 간격 보정 (선택 사항)
---------------------------------------------- */
.recommend-keywords {
  padding-top: 200px;  /* 필요 시 늘려도 됨 */
}


/* ----------------------------------------------
✅ 로그인 버튼 부분
---------------------------------------------- */

/* 비주얼 영역 */
.login-visual {
  width: 100%;
  height: 200px;
  background-image: url('/wp-content/themes/jani-child/assets/images/jani-login-visual.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  animation: float 3s ease-in-out infinite;
  margin-bottom: 24px;
}

/* 카피라이팅 */
.login-copy {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 500;
  color: #222;
  margin-bottom: 32px;
}
.login-copy span {
  font-weight: 700;
  font-family: 'Pretendard', sans-serif;
  color: #0070f3;
}

/* 카카오 로그인 버튼 */
.login-kakao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffe812;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}
.login-kakao:hover {
  transform: translateY(-2px);
}
.kakao-icon {
  width: 20px;
  height: 20px;
}
.login-kakao:hover {
  transform: translateY(-2px); /* 이건 유지해도 자연스러움 */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  background-color: #ffe812; /* ✅ 원래 배경색 강제 유지 */
  color: #000;               /* ✅ 글씨색도 유지 */
}
/* 소셜 원형 버튼 */
.login-social-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}
.login-social {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background-size: 24px 24px;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.2s ease;
  background-color: #fff;
}
.login-social:hover {
  transform: scale(1.1);
  background-color: #ffffff; /* ✅ 원래 배경색 강제 유지 */
}

.login-social.google {
  background-image: url('/wp-content/themes/jani-child/assets/images/google.png');
}
.login-social.apple {
  background-image: url('/wp-content/themes/jani-child/assets/images/apple.png');
}
.login-social.facebook {
  background-image: url('/wp-content/themes/jani-child/assets/images/facebook.png');
}

/* ----------------------------------------------
✅ 수다방 하단 UI
---------------------------------------------- */
.community-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  background: #fff;
}
.community-tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 12px;
  border-bottom: 1px solid #ddd;
}
.community-tabs a {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  color: #999;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.community-tabs a.active {
  color: #4e63ff;
  border-color: #4e63ff;
}
.community-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.community-item {
  border-bottom: 1px solid #eee;
  padding: 12px 0;
}
.community-item a {
  display: block;
  text-decoration: none;
  color: #222;
}
.title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  word-break: break-word;
}

.title.is-thumb {
  font-size: 16px;
  font-weight: 700;
}

.title-row .icon {
  font-size: 13px;
  color: #666;
}
.meta-row {
  margin-top: 4px;
  font-size: 13px;
  color: #999;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.left-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.comment-count {
  color: #4e63ff;
  font-size: 13px;
  font-weight: 500;
}
.no-post {
  text-align: center;
  padding: 40px 0;
  color: #bbb;
}
.write-button-frame {
  position: relative;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 24px 0;
}
.pagination a {
  padding: 6px 12px;
  border-radius: 4px;
  background: #f3f3f3;
  color: #333;
  text-decoration: none;
}
.pagination a.active {
  background: #4e63ff;
  color: white;
}
.pagination-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.pagination-nav .page-number {
  padding: 6px 12px;
  background: #eee;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  color: #333;
}

.pagination-nav .page-number:hover {
  background: #ccc;
}

.pagination-nav .page-number.current {
  background: #4e63ff;
  color: white;
  font-weight: 700;
}

.loading-indicator {
  text-align: center;
  padding: 10px;
  color: #666;
  font-size: 14px;
  display: none;
}

/* 로딩 스피너 */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(87, 87, 255, 0.3);
  border-radius: 50%;
  border-top-color: #5757ff;
  animation: spin 1s ease-in-out infinite;
}

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

/* 🧱 전체 하단 블록 */
.community-footer-ui {
  max-width: 520px;
  margin: 32px auto 0;
  padding: 20px 0;
  border-top: 1px solid #e0e0e0;
  background-color: #fff;
}

/* 버튼 라인 */
.utility-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.utility-buttons button,
.utility-buttons a {
  width: 48%;
  height: 46px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* 개념글 */
.thumb-posts-btn {
  background-color: transparent;
  border: 1px solid #bbb;
  color: #333;
  transition: all 0.2s ease;
}
.thumb-posts-btn:hover {
  border-color: #4e63ff;
  color: #4e63ff;
}

/* 글쓰기 */
.write-post-btn {
  background-color: #4e63ff;
  border: none;
  color: white;
  font-weight: 600;
}
.write-post-btn:hover {
  background-color: #3a4bd1;
}

/* 검색 라인 */
.search-bar {
  display: flex;
  gap: 10px;
}

/* 필터 드롭다운 */
.search-bar select {
  width: 100px;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  color: #333;
}

/* 검색 입력칸 */
.search-bar input {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* 돋보기 버튼 */
.search-bar .search-button {
  background-color: #4e63ff;
  color: white;
  border: none;
  padding: 0 16px;
  border-radius: 4px;
  font-size: 18px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-bar .search-button:hover {
  background-color: #3a4bd1;
}

/* ----------------------------------------------
✅ 엘리멘탈 자식 테마 호환성 스타일
----------------------------------------------- */

/* 엘리멘탈 환경에서 site-container 스타일 재정의 */
.elementor-widget-container .site-container {
  max-width: none !important;
  margin: 0 !important;
  background: transparent !important;
  min-height: auto !important;
  overflow: visible !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.elementor-widget-container .jani-community-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  background: #fff;
}

.elementor-widget-container .jani-community-tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 12px;
  border-bottom: 1px solid #ddd;
}

.elementor-widget-container .jani-community-tabs a {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  color: #999;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.elementor-widget-container .jani-community-tabs a.active {
  color: #4e63ff;
  border-color: #4e63ff;
}

.elementor-widget-container .jani-community-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.elementor-widget-container .community-item {
  border-bottom: 1px solid #eee;
  padding: 12px 0;
}

.elementor-widget-container .community-item a {
  display: block;
  text-decoration: none;
  color: #222;
}

.elementor-widget-container .jani-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.elementor-widget-container .jani-loading {
  text-align: center;
  padding: 10px;
  color: #666;
  font-size: 14px;
}

.elementor-widget-container .jani-footer-ui {
  max-width: 520px;
  margin: 32px auto 0;
  padding: 20px 0;
  border-top: 1px solid #e0e0e0;
  background-color: #fff;
}

.elementor-widget-container .jani-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.elementor-widget-container .jani-search-bar {
  display: flex;
  gap: 10px;
}

/* 디버깅용 스타일 */
.jani-debug {
  margin-top: 20px;
  padding: 10px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
}

/* ----------------------------------------------
✅ 게시글 상세 페이지 스타일 (디시인사이드 스타일)
----------------------------------------------- */
.jani-community-single-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  background: #fff;
}

/* 제목 영역 */
.post-title {
  margin-bottom: 10px;
}

.post-title h2 {
  font-size: 18px;
  font-weight: bold;
  line-height: 1.4;
  word-break: break-word;
  color: #333;
}

/* 메타 영역 */
.post-meta {
  margin-bottom: 16px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

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

.meta-info > span:not(:last-child)::after {
  content: "·";
  margin: 0 4px;
  color: #ccc;
}

.user-level {
  color: #5757ff;
  font-weight: 600;
}

.nickname {
  font-weight: 500;
}

.profile-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  vertical-align: middle;
}

.post-date, .post-views, .post-likes {
  color: #888;
}

/* 본문 영역 */
.post-content {
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 15px;
  color: #333;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 10px 0;
}

/* 추천/비추천 영역 */
.vote-area {
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

/* 추천/비추천 버튼 */
.vote-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.vote-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.recommend-btn {
  background-color: #f0f4ff;
  color: #5757ff;
}

.recommend-btn:hover {
  background-color: #5757ff;
  color: white;
}

.reject-btn {
  background-color: #fff0f0;
  color: #666;
}

.reject-btn:hover {
  background-color: #f0f0f0;
  color: #333;
}

.vote-btn .icon {
  font-size: 18px;
  margin-bottom: 4px;
}

.vote-btn .count {
  font-weight: bold;
  font-size: 14px;
}

/* 공유/신고 버튼 */
.post-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  border-top: 1px solid #f5f5f5;
  padding-top: 10px;
  justify-content: center;
  align-items: center;
}

.action-btn {
  flex: 1;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
}

.action-btn:hover {
  background: #f0f0f0;
  border-color: #5757ff;
  color: #5757ff;
}

.action-btn .icon {
  font-size: 14px;
}

/* 글 수정/삭제 버튼 */
.post-controls {
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.control-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  width: 100%;
}

.control-row:last-child {
  margin-bottom: 0;
}

.control-btn {
  flex: 1;
  padding: 8px; /* 세로 크기 축소를 위해 padding 값 감소 */
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: #f0f0f0;
  border-color: #5757ff;
  color: #5757ff;
}

.list-btn {
  background: #f5f5f5;
  color: #333;
}

.write-btn {
  background: #5757ff;
  color: white;
  border-color: #5757ff;
}

.write-btn:hover {
  background: #4646cc;
  border-color: #4646cc;
  color: white;
}

.edit-btn {
  background: #f5f5f5;
  color: #333;
}

.delete-btn {
  background: #f9f9f9;
  color: #666;
}

.delete-btn:hover {
  background: #fff0f0;
  color: #d73333;
  border-color: #ffcccc;
}

/* 모달 공통 스타일 */
.modal-password, .modal-delete-password {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-align: center;
  border-top: 4px solid #4e63ff;
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 1;
}

/* 모달 제목 스타일 */
.modal-content h3 {
  margin-bottom: 15px;
  font-size: 20px;
  color: #4e63ff;
  font-weight: 600;
}

/* 모달 설명 텍스트 스타일 */
.modal-content p {
  margin-bottom: 20px;
  color: #555;
  font-size: 15px;
  line-height: 1.5;
}

/* 모달 입력 필드 스타일 */
.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s ease;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  border-color: #4e63ff;
  box-shadow: 0 0 0 2px rgba(78, 99, 255, 0.1);
  outline: none;
}

/* 모달 버튼 스타일 */
.modal-content .submit-btn,
.modal-content button[type="submit"],
.modal-content .share-btn {
  background: #4e63ff;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.modal-content .submit-btn:hover,
.modal-content button[type="submit"]:hover,
.modal-content .share-btn:hover {
  background: #3a4bd1;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(78, 99, 255, 0.2);
}

/* 모달 닫기 버튼 스타일 */
.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: #4e63ff;
}

/* 공유 모달 스타일 */
#share-modal .share-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

#share-modal .share-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 16px;
  text-align: left;
  background: #f0f4ff;
  color: #4e63ff;
  border: 1px solid #e0e4ff;
}

#share-modal .share-btn:hover {
  background: #e0e8ff;
  border-color: #4e63ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(78, 99, 255, 0.2);
}

#share-modal #copy-url-btn {
  background: #f0f4ff;
  color: #4e63ff;
  border: 1px solid #e0e4ff;
}

#share-modal #copy-url-btn:hover {
  background: #e0e8ff;
  border-color: #4e63ff;
}

#share-modal #kakao-share-btn {
  background: #f0f4ff;
  color: #4e63ff;
  border: 1px solid #e0e4ff;
}

#share-modal #kakao-share-btn:hover {
  background: #e0e8ff;
  border-color: #4e63ff;
}

/* 신고 모달 스타일 */
#post-report-modal .submit-btn,
#comment-report-modal .submit-btn {
  background: #4e63ff;
  color: white;
}

#post-report-modal .submit-btn:hover,
#comment-report-modal .submit-btn:hover {
  background: #3a4bd1;
}

/* 비밀번호 모달 스타일 */
#password-modal .submit-btn,
#comment-delete-modal .submit-btn {
  background: #4e63ff;
}

/* 댓글 삭제 모달 스타일 */
#comment-delete-modal .submit-btn {
  background: #4e63ff;
}

#comment-delete-modal .submit-btn:hover {
  background: #3a4bd1;
}

.modal-content h3 {
  margin-bottom: 10px;
  font-size: 18px;
  color: #4e63ff;
}

.modal-content p {
  margin-bottom: 15px;
  color: #555;
  font-size: 14px;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 15px;
}

.submit-btn {
  background: #4e63ff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.submit-btn:hover {
  background: #3a4bd1;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(78, 99, 255, 0.2);
}

/* 댓글 상단 제어 */
.comment-header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 25px 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.comment-count-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-total {
  font-weight: bold;
  color: #333;
  font-size: 14px;
}

.refresh-btn {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: #666;
  padding: 0;
}

.comment-navigation {
  display: flex;
  gap: 6px;
}

.nav-btn {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
  font-size: 12px;
  cursor: pointer;
  color: #333;
}

.nav-btn:hover {
  background: #f0f0f0;
  border-color: #5757ff;
  color: #5757ff;
}

/* 댓글 카드 */
.comment-card {
  padding: 12px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
  margin-bottom: 8px;
  border-radius: 4px;
}

.comment-card.deleted {
  opacity: 0.7;
}

.comment-card.deleted .comment-content {
  font-style: italic;
  color: #999;
}

.comment-card.reply {
  margin-left: 40px;
  border-left: 2px solid #4e63ff;
  background: #f5f7ff;
  position: relative;
  box-shadow: 0 1px 3px rgba(78, 99, 255, 0.1);
  margin-top: 5px;
  margin-bottom: 12px;
  padding-left: 15px;
}

.comment-card.reply::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background-color: #4e63ff;
}

/* 답글 아이콘 추가 */
.comment-card.reply .comment-meta::before {
  content: "↪";
  color: #4e63ff;
  font-size: 16px;
  margin-right: 5px;
}

/* 답글 내용 스타일 개선 */
.comment-card.reply .comment-content {
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

/* 답글 메타 정보 스타일 개선 */
.comment-card.reply .comment-meta {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.comment-card.reply .comment-meta .level,
.comment-card.reply .comment-meta .nickname {
  color: #4e63ff;
}

/* 답글 푸터 스타일 개선 */
.comment-card.reply .comment-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #999;
}

.comment-card.reply .time {
  color: #4e63ff;
  opacity: 0.8;
}

/* 답글 버튼 스타일 개선 */
.btn-reply {
  background: none;
  border: none;
  cursor: pointer;
  color: #4e63ff;
  font-size: 12px;
  padding: 0;
  transition: all 0.2s ease;
}

.btn-reply:hover {
  color: #3a4bd1;
  text-decoration: underline;
}

/* 답글 폼 스타일 개선 */
.reply-form {
  background: #f0f4ff;
  padding: 12px;
  border-radius: 8px;
  margin-top: 10px;
  margin-left: 40px;
  border: 1px solid #d0e0ff;
  box-shadow: 0 2px 4px rgba(78, 99, 255, 0.1);
  position: relative;
}

.reply-form::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 15px;
  width: 18px;
  height: 2px;
  background-color: #4e63ff;
}

.reply-form textarea {
  width: 100%;
  height: 60px;
  padding: 10px;
  border: 1px solid #c0d0ff;
  border-radius: 6px;
  resize: none;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.reply-form textarea:focus {
  border-color: #4e63ff;
  box-shadow: 0 0 0 2px rgba(78, 99, 255, 0.1);
  outline: none;
}

.reply-form .btn-cancel {
  background: #f0f0f0;
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: all 0.2s ease;
}

.reply-form .btn-submit {
  background: #4e63ff;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-left: 6px;
  transition: all 0.2s ease;
}

.reply-form .btn-cancel:hover {
  background: #e5e5e5;
  border-color: #ccc;
}

.reply-form .btn-submit:hover {
  background: #3a4bd1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(78, 99, 255, 0.2);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.comment-meta .level {
  font-weight: bold;
  color: #5757ff;
  font-size: 13px;
}

.comment-meta .nickname {
  font-weight: bold;
  font-size: 13px;
}

.comment-meta .profile {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: 4px;
}

.comment-meta .honorific {
  color: #999;
  font-size: 12px;
}

.comment-content {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
  word-break: break-word;
  color: #333;
}

.comment-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #999;
}

.comment-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.btn-reply, .btn-report {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 12px;
  padding: 0;
}

.btn-report {
  color: #5757ff;
}

.btn-reply:hover, .btn-report:hover {
  color: #5757ff;
  text-decoration: underline;
}

.btn-comment-up {
  background: none;
  border: none;
  cursor: pointer;
  color: #5757ff;
  font-size: 13px;
  padding: 0;
}

.vote-count {
  color: #5757ff;
  font-weight: bold;
  font-size: 12px;
}

.btn-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: #5757ff;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.no-comments {
  text-align: center;
  padding: 20px 0;
  color: #999;
  font-style: italic;
  font-size: 14px;
}

/* 댓글 페이징 */
.comment-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 15px 0;
}

.page-nav, .page-number {
  padding: 4px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
  color: #333;
  text-decoration: none;
  font-size: 13px;
}

.page-number.current {
  background: #5757ff;
  color: white;
  border-color: #5757ff;
}

.page-number:hover:not(.current) {
  background: #f0f0f0;
  border-color: #5757ff;
  color: #5757ff;
}

/* 댓글 작성 폼 */
.comment-form {
  margin-top: 20px;
  background: #f9f9f9;
  padding: 12px;
  border-radius: 6px;
  position: relative;
}

.comment-user-info {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-user-info input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.comment-textarea {
  position: relative;
  margin-bottom: 8px;
}

.comment-textarea textarea {
  width: 100%;
  height: 80px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: none;
  font-size: 14px;
  font-family: inherit;
}

.submit-area {
  text-align: right;
}

.btn-submit {
  background: #5757ff;
  color: white;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 6px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
}

/* 최근글 리스트 */
.recent-posts-section {
  margin-top: 30px;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.section-title {
  position: relative;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.section-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #333;
}

.recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
  min-height: 100px; /* 로딩 시 높이 유지 */
}

.recent-posts .loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  color: #888;
  font-size: 14px;
}

.recent-post-item {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.recent-post-item a {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  color: #333;
}

.post-title-area {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-title {
  font-size: 14px;
  margin-bottom: 0;
}

.post-meta-area {
  display: flex;
  gap: 6px;
  color: #999;
  font-size: 12px;
  white-space: nowrap;
}

.no-posts {
  text-align: center;
  padding: 20px 0;
  color: #999;
  font-style: italic;
  font-size: 14px;
}

.pagination-nav, .recent-posts-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 15px 0;
  position: relative;
  flex-wrap: wrap; /* 모바일에서 여러 줄로 표시될 수 있도록 */
}

/* 모바일 환경에서 페이징 컨테이너 스타일 */
@media (max-width: 480px) {
  .pagination-nav, .recent-posts-pagination {
    gap: 6px; /* 모바일에서 버튼 간격 늘림 */
    padding: 5px 0; /* 상하 여백 추가 */
  }
}

/* 페이지 번호 버튼 */
.recent-posts-pagination .page-number,
.pagination-nav .page-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
  color: #333;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* 모바일 환경에서 페이지 번호 버튼 스타일 */
@media (max-width: 480px) {
  .recent-posts-pagination .page-number,
  .pagination-nav .page-number {
    min-width: 40px; /* 버튼 너비 증가 */
    height: 40px; /* 버튼 높이 증가 */
    font-size: 15px; /* 글자 크기 증가 */
    margin: 2px; /* 버튼 간 여백 추가 */
    padding: 0 8px; /* 좌우 패딩 증가 */
  }
  
  /* 첫 페이지, 마지막 페이지 버튼 */
  .recent-posts-pagination .first-page,
  .recent-posts-pagination .last-page,
  .pagination-nav .first-page,
  .pagination-nav .last-page {
    font-size: 14px; /* 글자 크기 증가 */
  }
  
  /* 이전, 다음 페이지 버튼 */
  .recent-posts-pagination .prev-page,
  .recent-posts-pagination .next-page,
  .pagination-nav .prev-page,
  .pagination-nav .next-page {
    font-size: 16px; /* 글자 크기 증가 */
  }
}

/* 현재 페이지 */
.recent-posts-pagination .page-number.current,
.pagination-nav .page-number.current {
  background: #5757ff;
  color: white;
  border-color: #5757ff;
}

/* 모바일에서 현재 페이지 버튼 강조 */
@media (max-width: 480px) {
  .recent-posts-pagination .page-number.current,
  .pagination-nav .page-number.current {
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(87, 87, 255, 0.3);
    transform: scale(1.05);
  }
}

/* 호버 효과 */
.recent-posts-pagination .page-number:hover:not(.current),
.pagination-nav .page-number:hover:not(.current) {
  background: #f0f0f0;
  border-color: #5757ff;
  color: #5757ff;
}

/* 모바일에서 호버 효과 대신 active 효과 추가 */
@media (max-width: 480px) {
  .recent-posts-pagination .page-number:active:not(.current),
  .pagination-nav .page-number:active:not(.current) {
    background: #e0e0ff;
    border-color: #5757ff;
    color: #5757ff;
    transform: scale(0.95);
  }
}

/* 첫 페이지, 마지막 페이지 버튼 */
.recent-posts-pagination .first-page,
.recent-posts-pagination .last-page,
.pagination-nav .first-page,
.pagination-nav .last-page {
  font-size: 12px;
}

/* 이전, 다음 페이지 버튼 */
.recent-posts-pagination .prev-page,
.recent-posts-pagination .next-page,
.pagination-nav .prev-page,
.pagination-nav .next-page {
  font-size: 14px;
}

/* 로딩 인디케이터 */
.recent-posts-pagination .loading-indicator,
.pagination-nav .loading-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 4px;
}

.recent-posts-pagination .spinner,
.pagination-nav .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #5757ff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* 모바일 환경에서 로딩 인디케이터 크기 증가 */
@media (max-width: 480px) {
  .recent-posts-pagination .loading-indicator,
  .pagination-nav .loading-indicator {
    background: rgba(255, 255, 255, 0.8); /* 배경 더 불투명하게 */
    padding: 10px; /* 패딩 추가 */
  }
  
  .recent-posts-pagination .spinner,
  .pagination-nav .spinner {
    width: 28px; /* 스피너 크기 증가 */
    height: 28px;
    border-width: 3px; /* 테두리 두께 증가 */
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 검색 기능 */
.search-section {
  margin: 15px 0;
}

.search-form {
  display: flex;
  gap: 6px;
}

.search-type {
  width: 100px;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 13px;
}

.search-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.search-button {
  background: #5757ff;
  color: white;
  border: none;
  padding: 0 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

/* 엄지글 보기 버튼 */
.thumb-filter-section {
  margin: 15px 0 30px;
  text-align: center;
}

.thumb-filter-toggle {
  display: block;
  width: 100%;
  padding: 12px 0;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.thumb-filter-toggle:hover {
  background: #f0f0f0;
  border-color: #5757ff;
  color: #5757ff;
}

/* ----------------------------------------------
✅ 현재 글 및 읽은 글 스타일
----------------------------------------------- */
.community-item a.current-post {
  background-color: rgba(87, 87, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  margin: -8px -12px;
  position: relative;
  box-shadow: 0 1px 3px rgba(87, 87, 255, 0.1);
  transition: all 0.2s ease;
}

.community-item a.current-post:hover {
  background-color: rgba(87, 87, 255, 0.12);
}

.community-item a.current-post .title {
  color: #4e63ff;
  font-weight: bold;
  position: relative;
  display: inline-block;
}


.community-item a.read-post .title {
  color: #dbdbdb;  /* 더 밝은 회색으로 변경 */
}

.community-item a.read-post:hover .title {
  color: #5757ff;
}