/* 캐릭터 프로필 — 플랫 다크 */

.profile-main-content {
  margin-top: var(--nav-h);
  padding-bottom: 110px;
  min-height: 100vh;
}

/* 캐러셀 */
.profile-carousel-section {
  position: relative;
  width: 100%;
  background: var(--surface);
  padding-bottom: 26px;
}

.profile-carousel {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  overflow: hidden;
  background: var(--surface-2);
  cursor: grab;
}

.profile-carousel-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.4s ease;
}

.profile-carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.profile-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.slide-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--text);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.profile-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: #fff;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-carousel-btn:hover { background: rgba(0, 0, 0, 0.8); }
.profile-carousel-btn-prev { left: 12px; }
.profile-carousel-btn-next { right: 12px; }
.profile-carousel-btn.hidden { display: none; }

.profile-carousel-indicators {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}

.profile-carousel-indicator {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
}

.profile-carousel-indicator.active {
  background: var(--accent);
  width: 22px;
}

/* 좋아요 버튼 */
.profile-like-btn {
  position: absolute;
  bottom: 42px;
  right: 16px;
  z-index: 15;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.profile-like-btn.liked {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.profile-like-btn.liked svg { fill: var(--on-accent); stroke: var(--on-accent); }

.profile-like-btn svg {
  width: 20px;
  height: 20px;
  transition: fill 0.2s;
}

.like-count { min-width: 20px; text-align: center; }

/* 감정별 썸네일 갤러리 */
.profile-emotion-gallery {
  display: flex;
  gap: 8px;
  padding: 12px 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.profile-emotion-gallery::-webkit-scrollbar { display: none; }

.emotion-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
}

.emotion-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.emotion-thumb.active { border-color: var(--accent); }

.emotion-thumb-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 4px;
  font-size: 9px;
  line-height: 1.3;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* 정보 섹션 */
.profile-info-section { padding: 22px 16px; }

/* 통계 뱃지 + 등록 시간 메타 */
.profile-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.profile-stat-badges { display: flex; gap: 8px; }

.profile-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
}

.profile-stat-badge svg { color: var(--accent); }
.profile-stat-num { color: var(--text); }

.profile-created-at {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
}

/* 클립보드 복사 폴백 토스트 */
.profile-copy-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.profile-copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

.profile-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  flex: 1;
}

.profile-creator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 20px;
}

.profile-creator:hover { color: var(--accent); }
.profile-creator:visited { color: var(--text-faint); }
.profile-creator svg { stroke: currentColor; }

/* 기본 정보 */
.profile-basic-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.profile-info-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}

.profile-info-label {
  display: block;
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.profile-info-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 소개 / 상세 */
.profile-section,
.profile-detail-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}

.profile-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
}

.profile-section-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-details {
  display: grid;
  gap: 0;
  margin-bottom: 20px;
}

.profile-detail-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
  margin: 0 0 6px;
}

.profile-detail-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-tags { margin-bottom: 28px; }

/* 채팅 버튼 */
.profile-chat-btn {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: calc(37.5rem - 32px);
  background: var(--accent);
  color: var(--on-accent);
  padding: 15px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  z-index: 100;
}

.profile-chat-btn:hover { background: var(--accent-strong); }
.profile-chat-btn:visited { color: var(--on-accent); }
.profile-chat-btn svg { stroke: currentColor; }

@media (max-width: 480px) {
  .profile-name { font-size: 22px; }
  .profile-basic-info { grid-template-columns: repeat(2, 1fr); }
}
