@charset "utf-8";

/* ============================================================
   홍챠피디아 (HongChaPedia) — library.css
   Tea/book community media tracking & rating
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --hcp-bg: #faf8f5;
  --hcp-surface: #ffffff;
  --hcp-surface-hover: #f5f1ec;
  --hcp-border: #e8e2da;
  --hcp-border-light: #f0ebe4;
  --hcp-text: #2c2420;
  --hcp-text-secondary: #7a6e63;
  --hcp-text-muted: #a99e93;
  --hcp-accent: #c0583a;
  --hcp-accent-hover: #a84a2f;
  --hcp-accent-light: #fdf0ec;
  --hcp-star: #e8a838;
  --hcp-star-empty: #d9d2ca;
  --hcp-watched: #c0583a;
  --hcp-interested: #d4894e;
  --hcp-badge-movie: #5a7abf;
  --hcp-badge-tv: #7a5abf;
  --hcp-badge-book: #5abf7a;
  --hcp-badge-anime: #bf5a8a;
  --hcp-badge-music: #c05a9e;
  --hcp-badge-game: #5a9ec0;
  --hcp-badge-boardgame: #8a6d3b;
  --hcp-toast-bg: #2c2420;
  --hcp-toast-text: #faf8f5;
  --hcp-shadow-sm: 0 1px 3px rgba(44, 36, 32, 0.08);
  --hcp-shadow-md: 0 4px 12px rgba(44, 36, 32, 0.1);
  --hcp-shadow-lg: 0 8px 24px rgba(44, 36, 32, 0.12);
  --hcp-radius: 8px;
  --hcp-radius-sm: 4px;
  --hcp-radius-lg: 12px;
  --hcp-max-width: 720px;
  --hcp-transition: 0.2s ease;
}

/* --- Reset / Base --- */
.hcp-wrap {
  max-width: var(--hcp-max-width);
  margin: 0 auto;
  padding: 0 16px 40px;
  min-height: 60vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
  color: var(--hcp-text);
  line-height: 1.6;
}
.hcp-wrap *,
.hcp-wrap *::before,
.hcp-wrap *::after {
  box-sizing: border-box;
}
.hcp-wrap a {
  color: var(--hcp-accent);
  text-decoration: none;
}
.hcp-wrap a:hover {
  color: var(--hcp-accent-hover);
}

/* --- Page Title --- */
.hcp-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 24px 0 20px;
}
.hcp-title h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--hcp-text);
  letter-spacing: -0.5px;
}
.hcp-title .hcp-subtitle {
  font-size: 13px;
  color: var(--hcp-text-muted);
}

/* --- Category Tabs --- */
.hcp-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.hcp-tabs::-webkit-scrollbar {
  display: none;
}
.hcp-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border: 1px solid var(--hcp-border);
  border-radius: 20px;
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--hcp-transition);
  user-select: none;
}
.hcp-tab:hover {
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
  background: var(--hcp-accent-light);
}
.hcp-tab.is-active {
  background: var(--hcp-accent);
  color: #fff;
  border-color: var(--hcp-accent);
}
.hcp-tab small {
  font-size: 12px;
  opacity: 0.7;
  font-weight: 400;
}

/* --- Search Bar --- */
.hcp-search {
  position: relative;
  margin-bottom: 20px;
}
.hcp-search-input {
  width: 100%;
  padding: 10px 14px 10px 40px !important;
  box-sizing: border-box;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  font-size: 15px;
  color: var(--hcp-text);
  outline: none;
  transition: border-color var(--hcp-transition), box-shadow var(--hcp-transition);
}
.hcp-search-input::placeholder {
  color: var(--hcp-text-muted);
}
.hcp-search-input:focus {
  border-color: var(--hcp-accent);
  box-shadow: 0 0 0 3px rgba(192, 88, 58, 0.12);
}
.hcp-search-icon {
  position: absolute;
  left: 12px;
  top: 12px;
  pointer-events: none;
  width: 18px;
  height: 18px;
  color: var(--hcp-text-muted);
  pointer-events: none;
}

/* --- Autocomplete Dropdown --- */
.hcp-autocomplete {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 4px;
  background: var(--hcp-surface);
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  box-shadow: var(--hcp-shadow-lg);
  max-height: 360px;
  overflow-y: auto;
}
.hcp-autocomplete.is-visible {
  display: block;
}
.hcp-ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--hcp-transition);
}
.hcp-ac-item:hover,
.hcp-ac-item.is-focused {
  background: var(--hcp-surface-hover);
}
.hcp-ac-item + .hcp-ac-item {
  border-top: 1px solid var(--hcp-border-light);
}
.hcp-ac-poster {
  width: 36px;
  height: 52px;
  border-radius: var(--hcp-radius-sm);
  object-fit: cover;
  background: var(--hcp-border-light);
  flex-shrink: 0;
}
.hcp-ac-info {
  flex: 1;
  min-width: 0;
}
.hcp-ac-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hcp-ac-meta {
  font-size: 12px;
  color: var(--hcp-text-muted);
}
.hcp-ac-empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--hcp-text-muted);
  font-size: 14px;
}

/* --- Sort Controls --- */
.hcp-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.hcp-sort {
  display: flex;
  gap: 4px;
}
.hcp-sort-btn {
  padding: 5px 12px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius-sm);
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--hcp-transition);
}
.hcp-sort-btn:hover {
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
}
.hcp-sort-btn.is-active {
  background: var(--hcp-accent);
  color: #fff;
  border-color: var(--hcp-accent);
}
.hcp-view-count {
  font-size: 13px;
  color: var(--hcp-text-muted);
}

/* --- Feed / Timeline --- */
.hcp-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Feed Card */
.hcp-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--hcp-surface);
  border: 1px solid var(--hcp-border-light);
  border-radius: var(--hcp-radius-lg);
  transition: box-shadow var(--hcp-transition), border-color var(--hcp-transition);
}
.hcp-card:hover {
  box-shadow: var(--hcp-shadow-md);
  border-color: var(--hcp-border);
}

/* Poster thumbnail */
.hcp-card-poster {
  width: 60px;
  height: 88px;
  border-radius: var(--hcp-radius);
  object-fit: cover;
  background: var(--hcp-border-light);
  flex-shrink: 0;
}
.hcp-card-poster-placeholder {
  width: 60px;
  height: 88px;
  border-radius: var(--hcp-radius);
  background: var(--hcp-border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hcp-text-muted);
  font-size: 11px;
}

/* Card body */
.hcp-card-body {
  flex: 1;
  min-width: 0;
}
.hcp-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.hcp-card-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--hcp-text);
}
.hcp-card-title a {
  color: inherit;
}
.hcp-card-title a:hover {
  color: var(--hcp-accent);
}

/* Category badge */
.hcp-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.hcp-badge-movie { background: rgba(90,122,191,0.12); color: var(--hcp-badge-movie); }
.hcp-badge-tv    { background: rgba(122,90,191,0.12); color: var(--hcp-badge-tv); }
.hcp-badge-book  { background: rgba(90,191,122,0.12); color: var(--hcp-badge-book); }
.hcp-badge-anime { background: rgba(191,90,138,0.12); color: var(--hcp-badge-anime); }

/* Card meta line */
.hcp-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--hcp-text-secondary);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.hcp-card-user {
  font-weight: 500;
}

/* Review snippet */
.hcp-card-review {
  font-size: 14px;
  color: var(--hcp-text-secondary);
  line-height: 1.5;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hcp-card-review.is-expanded {
  -webkit-line-clamp: unset;
  display: block;
}
.hcp-review-toggle {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--hcp-accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.hcp-review-toggle:hover {
  text-decoration: underline;
}

/* Timestamp */
.hcp-card-time {
  font-size: 12px;
  color: var(--hcp-text-muted);
}

/* --- Star Rating --- */
.hcp-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  vertical-align: middle;
}
.hcp-star-svg {
  width: 16px;
  height: 16px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.hcp-star-svg:hover {
  transform: scale(1.15);
}
.hcp-star-svg .star-bg {
  fill: var(--hcp-star-empty);
}
.hcp-star-svg .star-fill {
  fill: var(--hcp-star);
}
.hcp-stars-static .hcp-star-svg {
  cursor: default;
}
.hcp-stars-static .hcp-star-svg:hover {
  transform: none;
}
.hcp-stars .hcp-score {
  margin-left: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hcp-star);
}
.hcp-stars-lg .hcp-star-svg {
  width: 28px;
  height: 28px;
}
.hcp-stars-lg .hcp-score {
  font-size: 18px;
  margin-left: 8px;
}

/* 작품 상세 인터랙티브 별점 */
.hcp-stars[data-interactive="true"] {
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
}
.hcp-stars[data-interactive="true"] .hcp-star-svg {
  width: 40px;
  height: 40px;
}
.hcp-stars[data-interactive="true"] .hcp-score {
  font-size: 24px;
  margin-left: 12px;
}
.hcp-rating-section {
  text-align: center;
}

/* --- Status Buttons --- */
.hcp-status-btns {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.hcp-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--hcp-transition);
  user-select: none;
}
.hcp-status-btn:hover {
  border-color: var(--hcp-text-secondary);
}
.hcp-status-btn .hcp-status-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.hcp-status-btn.is-active[data-status="watched"] {
  background: var(--hcp-watched);
  border-color: var(--hcp-watched);
  color: #fff;
}
.hcp-status-btn.is-active[data-status="interested"] {
  background: var(--hcp-interested);
  border-color: var(--hcp-interested);
  color: #fff;
}

/* --- Review Textarea --- */
.hcp-review-form {
  margin: 16px 0;
}
.hcp-review-area {
  width: 100%;
  box-sizing: border-box;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  font-size: 14px;
  font-family: inherit;
  color: var(--hcp-text);
  resize: vertical;
  outline: none;
  transition: border-color var(--hcp-transition);
  line-height: 1.6;
}
.hcp-review-area::placeholder {
  color: var(--hcp-text-muted);
}
.hcp-review-area:focus {
  border-color: var(--hcp-accent);
}
.hcp-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.hcp-char-count {
  font-size: 12px;
  color: var(--hcp-text-muted);
}
.hcp-review-submit {
  padding: 8px 20px;
  border: none;
  border-radius: var(--hcp-radius);
  background: var(--hcp-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--hcp-transition);
}
.hcp-review-submit:hover {
  background: var(--hcp-accent-hover);
}
.hcp-review-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Grid View (Browse) --- */
.hcp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}
.hcp-grid-item {
  position: relative;
  border-radius: var(--hcp-radius);
  overflow: hidden;
  background: var(--hcp-border-light);
  transition: transform var(--hcp-transition), box-shadow var(--hcp-transition);
}
.hcp-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--hcp-shadow-md);
}
.hcp-grid-item a {
  display: block;
  color: inherit;
}
.hcp-grid-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}
.hcp-grid-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
}
.hcp-grid-overlay-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hcp-grid-overlay-score {
  font-size: 12px;
  color: var(--hcp-star);
  margin-top: 2px;
}

/* --- Profile Stats --- */
.hcp-profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin: 20px 0;
}
.hcp-stat-box {
  text-align: center;
  padding: 14px 8px;
  background: var(--hcp-surface);
  border: 1px solid var(--hcp-border-light);
  border-radius: var(--hcp-radius);
}
.hcp-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--hcp-accent);
}
.hcp-stat-label {
  font-size: 12px;
  color: var(--hcp-text-muted);
  margin-top: 2px;
}

/* --- Load More Button --- */
.hcp-load-more {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 16px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--hcp-transition);
  text-align: center;
}
.hcp-load-more:hover {
  background: var(--hcp-surface-hover);
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
}
.hcp-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Loading Spinner --- */
.hcp-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--hcp-border);
  border-top-color: var(--hcp-accent);
  border-radius: 50%;
  animation: hcpSpin 0.6s linear infinite;
}
.hcp-spinner-center {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}
@keyframes hcpSpin {
  to { transform: rotate(360deg); }
}

/* --- Empty State --- */
.hcp-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--hcp-text-muted);
}
.hcp-empty-icon {
  font-size: 40px;
  margin-bottom: 8px;
  opacity: 0.4;
}
.hcp-empty-msg {
  font-size: 15px;
}
.hcp-empty-sub {
  font-size: 13px;
  margin-top: 4px;
}

/* --- Toast Notification --- */
.hcp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--hcp-toast-bg);
  color: var(--hcp-toast-text);
  padding: 12px 24px;
  border-radius: var(--hcp-radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--hcp-shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.hcp-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- Section Headings --- */
.hcp-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hcp-text);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--hcp-border-light);
}

/* --- Responsive --- */
@media (min-width: 768px) {
  .hcp-wrap {
    padding: 0 24px 60px;
  }
  .hcp-title h2 {
    font-size: 28px;
  }
  .hcp-card-poster,
  .hcp-card-poster-placeholder {
    width: 72px;
    height: 106px;
  }
  .hcp-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
  }
  .hcp-profile-stats {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1024px) {
  .hcp-wrap {
    padding: 0 0 60px;
  }
  .hcp-title h2 {
    font-size: 30px;
  }
  .hcp-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* Small mobile adjustments */
@media (max-width: 400px) {
  .hcp-card {
    padding: 12px;
    gap: 10px;
  }
  .hcp-card-poster,
  .hcp-card-poster-placeholder {
    width: 50px;
    height: 74px;
  }
  .hcp-status-btns {
    flex-direction: column;
  }
  .hcp-status-btn {
    justify-content: center;
  }
  .hcp-tabs {
    gap: 4px;
  }
  .hcp-tab {
    padding: 6px 12px;
    font-size: 13px;
  }
}


/* ============================================================
   작품 상세 페이지 (item.php)
   ============================================================ */

.hcp-container {
  max-width: var(--hcp-max-width);
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.hcp-item-detail {
  background: var(--hcp-surface);
  border-radius: var(--hcp-radius-lg);
  box-shadow: var(--hcp-shadow-sm);
  overflow: hidden;
}

.hcp-item-header {
  display: flex;
  gap: 24px;
  padding: 24px;
}

.hcp-item-poster {
  flex-shrink: 0;
  width: 200px;
}

.hcp-item-poster img {
  width: 100%;
  border-radius: var(--hcp-radius);
  box-shadow: var(--hcp-shadow-md);
}

.hcp-no-poster {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--hcp-border-light);
  border-radius: var(--hcp-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--hcp-text-muted);
}

.hcp-item-info {
  flex: 1;
  min-width: 0;
}

.hcp-category-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.hcp-cat-movie { background: var(--hcp-badge-movie); }
.hcp-cat-tv { background: var(--hcp-badge-tv); }
.hcp-cat-book { background: var(--hcp-badge-book); }
.hcp-cat-anime { background: var(--hcp-badge-anime); }
.hcp-cat-music { background: #c05a9e; }
.hcp-cat-game { background: #5a9ec0; }
.hcp-cat-boardgame { background: #8a6d3b; }

.hcp-item-title {
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 4px;
  color: var(--hcp-text);
  line-height: 1.3;
}

.hcp-item-original-title {
  font-size: 14px;
  color: var(--hcp-text-muted);
  margin: 0 0 8px;
}

.hcp-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hcp-meta-item {
  font-size: 14px;
  color: var(--hcp-text-secondary);
}

.hcp-meta-item + .hcp-meta-item::before {
  content: "·";
  margin-right: 8px;
}

.hcp-item-stats {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hcp-border-light);
}

.hcp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hcp-stat-label {
  font-size: 11px;
  color: var(--hcp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hcp-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--hcp-text);
}

.hcp-stat-count {
  font-size: 12px;
  color: var(--hcp-text-muted);
}

.hcp-star-color {
  color: var(--hcp-star) !important;
}

/* 작품 설명 */
.hcp-item-description {
  padding: 0 24px 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--hcp-text-secondary);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hcp-item-description p {
  margin: 0;
}

/* 사용자 액션 영역 */
.hcp-user-actions {
  padding: 20px 24px;
  border-top: 1px solid var(--hcp-border-light);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hcp-status-buttons {
  display: flex;
  gap: 8px;
}

.hcp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  color: var(--hcp-text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--hcp-transition);
}

.hcp-btn:hover {
  background: var(--hcp-surface-hover);
  border-color: var(--hcp-text-muted);
}

.hcp-btn-status.active {
  color: #fff;
  border-color: transparent;
}

.hcp-btn-status.active[data-status="watched"] {
  background: var(--hcp-watched);
}

.hcp-btn-status.active[data-status="interested"] {
  background: var(--hcp-interested);
}

.hcp-btn-primary {
  background: var(--hcp-accent);
  color: #fff;
  border-color: var(--hcp-accent);
}

.hcp-btn-primary:hover {
  background: var(--hcp-accent-hover);
  border-color: var(--hcp-accent-hover);
}

.hcp-btn-link {
  background: none;
  border: none;
  color: var(--hcp-accent);
  cursor: pointer;
  padding: 4px 0;
  font-size: 13px;
}

/* 평점 (별) */
.hcp-rating-section label,
.hcp-review-section label {
  font-size: 13px;
  font-weight: 600;
  color: var(--hcp-text-secondary);
  margin-bottom: 6px;
  display: block;
}

.hcp-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.hcp-star {
  cursor: pointer;
  display: inline-flex;
}

.hcp-star svg {
  transition: transform 0.15s;
}

.hcp-star:hover svg {
  transform: scale(1.15);
}

.hcp-star-left,
.hcp-star-right {
  fill: var(--hcp-star-empty);
  transition: fill var(--hcp-transition);
}

.hcp-star.filled-left .hcp-star-left,
.hcp-star.filled-full .hcp-star-left,
.hcp-star.filled-full .hcp-star-right {
  fill: var(--hcp-star);
}

.hcp-score-display {
  margin-left: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--hcp-star);
  min-width: 30px;
}

/* 리뷰 */
.hcp-review-input {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  background: var(--hcp-bg);
  color: var(--hcp-text);
  box-sizing: border-box;
}

.hcp-review-input:focus {
  outline: none;
  border-color: var(--hcp-accent);
  box-shadow: 0 0 0 3px var(--hcp-accent-light);
}

.hcp-review-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.hcp-char-count {
  font-size: 12px;
  color: var(--hcp-text-muted);
}

/* 로그인 프롬프트 */
.hcp-login-prompt {
  padding: 20px 24px;
  border-top: 1px solid var(--hcp-border-light);
  text-align: center;
  color: var(--hcp-text-secondary);
  font-size: 14px;
}

.hcp-login-prompt a {
  color: var(--hcp-accent);
  font-weight: 600;
}

/* 리뷰 목록 */
.hcp-reviews-section {
  padding: 20px 24px;
  border-top: 1px solid var(--hcp-border-light);
}

.hcp-reviews-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--hcp-text);
}

.hcp-review-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--hcp-border-light);
}

.hcp-review-card:last-child {
  border-bottom: none;
}

.hcp-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.hcp-review-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hcp-review-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* pfpic 위치 오버라이드 (홍챠피디아 내에서는 상대 위치, 줌은 transform) */
.hcp-container .pfpic.a2,
.hcp-reviews-section .pfpic.a2,
.hcp-comments-section .pfpic.a2 {
  position: relative;
  top: 0;
  left: 0;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
  transform-origin: top left;
  z-index: 10;
}

.hcp-container .pfpic.a2.zoom,
.hcp-reviews-section .pfpic.a2.zoom,
.hcp-comments-section .pfpic.a2.zoom {
  transform: scale(3.5);
  z-index: 999;
}


.hcp-review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #d3e5f7;
  border: 1px solid var(--hcp-border);
}

.hcp-review-author {
  font-weight: 600;
  color: var(--hcp-text);
  text-decoration: none;
  font-size: 14px;
}

.hcp-review-author:hover {
  color: var(--hcp-accent);
}

.hcp-review-score {
  color: var(--hcp-star);
  font-size: 13px;
  font-weight: 600;
}

.hcp-review-date {
  color: var(--hcp-text-muted);
  font-size: 12px;
}

.hcp-review-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--hcp-text);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hcp-review-body p {
  margin: 0;
}

.hcp-review-body.hcp-truncated {
  max-height: 72px;
  overflow: hidden;
  position: relative;
}

.hcp-review-body.hcp-truncated::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(transparent, var(--hcp-surface));
}

.hcp-expand-btn {
  font-size: 13px;
}

/* 리뷰 작성 폼 */
.hcp-review-write {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hcp-border-light);
  margin-bottom: 8px;
}

.hcp-review-write .hcp-review-avatar {
  margin-top: 4px;
}

.hcp-review-write-body {
  flex: 1;
  min-width: 0;
}

.hcp-review-delete {
  margin-left: auto;
  color: var(--hcp-text-muted) !important;
  font-size: 12px !important;
}

/* 댓글 */
.hcp-comments {
  margin-top: 8px;
  padding-left: 44px;
}

.hcp-comment {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hcp-border-light);
}

.hcp-comment:last-child {
  border-bottom: none;
}

.hcp-comment-body {
  flex: 1;
  min-width: 0;
}

.hcp-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.hcp-comment-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--hcp-text);
}

.hcp-comment-text {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--hcp-text);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hcp-comment-date {
  color: var(--hcp-text-muted);
  font-size: 12px;
}

.hcp-comment-delete {
  color: var(--hcp-text-muted) !important;
  font-size: 12px !important;
}

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

.hcp-comment-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--hcp-border);
  border-radius: var(--hcp-radius);
  font-size: 14px;
  background: var(--hcp-bg);
  color: var(--hcp-text);
  box-sizing: border-box;
}

.hcp-comment-input:focus {
  outline: none;
  border-color: var(--hcp-accent);
}

.hcp-comment-send {
  padding: 6px 12px;
  background: var(--hcp-accent);
  color: #fff;
  border: none;
  border-radius: var(--hcp-radius);
  font-size: 12px;
  cursor: pointer;
}

.hcp-comment-send:hover {
  background: var(--hcp-accent-hover);
}

/* 댓글 섹션 */
.hcp-comments-section {
  padding: 20px 24px;
  border-top: 1px solid var(--hcp-border-light);
}

.hcp-comments-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--hcp-text);
}

.hcp-comment-write-top {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hcp-border-light);
}

.hcp-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

/* 대댓글 들여쓰기 */
.hcp-comment-reply {
  margin-left: 36px;
}

/* 대댓글 입력 */
.hcp-reply-write {
  display: flex;
  gap: 6px;
  margin: 8px 0 4px;
  padding-left: 55px;
}

.hcp-reply-write .hcp-comment-input {
  flex: 1;
}

.hcp-reply-write .hcp-btn {
  flex-shrink: 0;
}

/* 빈 상태 */
.hcp-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--hcp-text-muted);
}

.hcp-empty-state p {
  margin: 0 0 16px;
  font-size: 15px;
}

/* 로딩 */
.hcp-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--hcp-text-muted);
  font-size: 14px;
}


/* ============================================================
   프로필 페이지 (profile.php)
   ============================================================ */

.hcp-profile-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--hcp-text);
  margin: 0 0 20px;
}

.hcp-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.hcp-stat-card {
  background: var(--hcp-surface);
  border-radius: var(--hcp-radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--hcp-shadow-sm);
}

.hcp-stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--hcp-accent);
}

.hcp-stat-card .hcp-stat-label {
  font-size: 12px;
  color: var(--hcp-text-muted);
  margin-top: 4px;
}

.hcp-category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hcp-cat-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--hcp-text-secondary);
}

/* 필터 */
.hcp-filters {
  margin-bottom: 20px;
}

.hcp-sub-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hcp-filter-btn {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 13px;
  color: var(--hcp-text-secondary);
  text-decoration: none;
  transition: all var(--hcp-transition);
}

.hcp-filter-btn:hover {
  background: var(--hcp-surface-hover);
}

.hcp-filter-btn.active {
  background: var(--hcp-accent);
  color: #fff;
}

.hcp-filter-divider {
  color: var(--hcp-border);
  margin: 0 4px;
}

/* 작품 그리드 */
.hcp-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.hcp-grid-card {
  text-decoration: none;
  color: var(--hcp-text);
  border-radius: var(--hcp-radius);
  overflow: hidden;
  transition: transform var(--hcp-transition), box-shadow var(--hcp-transition);
}

.hcp-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hcp-shadow-md);
}

.hcp-grid-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: var(--hcp-radius);
  background: var(--hcp-border-light);
}

.hcp-grid-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hcp-grid-poster .hcp-category-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  padding: 2px 6px;
}

.hcp-grid-score {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: var(--hcp-star);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.hcp-grid-info {
  padding: 8px 4px;
}

.hcp-grid-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hcp-grid-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--hcp-text-muted);
}

.hcp-status-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 100px;
  font-weight: 600;
}

.hcp-status-watched { background: var(--hcp-accent-light); color: var(--hcp-watched); }
.hcp-status-interested { background: #fdf5ec; color: var(--hcp-interested); }

/* 페이지네이션 */
.hcp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 0;
}

.hcp-page-btn {
  padding: 6px 16px;
  border-radius: var(--hcp-radius);
  background: var(--hcp-surface);
  border: 1px solid var(--hcp-border);
  color: var(--hcp-text);
  text-decoration: none;
  font-size: 13px;
  transition: all var(--hcp-transition);
}

.hcp-page-btn:hover {
  background: var(--hcp-accent) !important;
  color: #fff !important;
  border-color: var(--hcp-accent) !important;
}

.hcp-page-info {
  font-size: 13px;
  color: var(--hcp-text-muted);
}

/* ============================================================
   반응형 - 작품 상세 & 프로필
   ============================================================ */

@media (max-width: 640px) {
  .hcp-item-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hcp-item-poster {
    width: 160px;
  }
  .hcp-item-stats {
    justify-content: center;
  }
  .hcp-profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .hcp-item-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
  }
  .hcp-status-buttons {
    flex-direction: column;
  }
}

/* --- Like Button --- */
.hcp-like-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--hcp-border-light);
}
.hcp-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--hcp-border);
  border-radius: 16px;
  background: transparent;
  color: var(--hcp-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.hcp-like-btn:hover:not(:disabled) {
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
}
.hcp-like-btn.is-liked {
  border-color: var(--hcp-accent);
  color: var(--hcp-accent);
  background: var(--hcp-accent-light);
}
.hcp-like-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.hcp-like-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--hcp-text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 4px;
}
.hcp-like-btn-sm:hover:not(:disabled) {
  color: var(--hcp-accent);
}
.hcp-like-btn-sm.is-liked {
  color: var(--hcp-accent);
}
.hcp-like-btn-sm:disabled {
  opacity: 0.5;
  cursor: default;
}
.hcp-like-count {
  font-size: inherit;
}

/* --- Review Score Badge --- */
.hcp-review-score {
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}
