/* ── 스트리머 페이지 ── */
.streamer-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* 프로필 카드 */
.profile-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.profile-banner {
  height: 110px;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #0ea5e9 100%);
  position: relative;
}

.profile-top {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0 20px 18px;
  margin-top: -48px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid var(--bg2);
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}

.profile-info { padding-bottom: 4px; }
.profile-name { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.2; margin-bottom: 2px; }
.profile-slug { font-size: 12px; color: var(--text3); font-weight: 500; }

/* 별점 테이블 */
.rating-table {
  margin: 0 16px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.rating-table-grid { display: grid; grid-template-columns: 1fr 1fr; }

.rating-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg2);
}
.rating-cell:nth-child(even) { border-right: none; }
.rating-cell:nth-last-child(-n+2) { border-bottom: none; }

.rating-cell-label { font-size: 12px; color: var(--text2); font-weight: 500; min-width: 44px; }
.rating-cell-stars { font-size: 12px; color: var(--yellow); letter-spacing: -1px; flex: 1; text-align: center; }
.rating-cell-val { font-size: 13px; font-weight: 700; min-width: 28px; text-align: right; color: var(--text); }

.rating-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg3);
  border-top: 1px solid var(--border);
}
.rating-total-label { font-size: 11px; color: var(--text3); font-weight: 700; letter-spacing: 0.08em; }
.rating-total-val { font-size: 20px; font-weight: 800; color: var(--pink); }

/* 메타 */
.profile-meta-row {
  display: flex;
  gap: 28px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.meta-label { font-size: 10px; color: var(--text3); letter-spacing: 0.08em; font-weight: 700; margin-bottom: 2px; }
.meta-value { font-size: 13px; font-weight: 600; color: var(--text); }

/* 스탯 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item {
  padding: 14px 12px;
  text-align: center;
  border-right: 1px solid var(--border);
  background: var(--bg2);
}
.stat-item:last-child { border-right: none; }
.stat-label { font-size: 10px; color: var(--text3); margin-bottom: 4px; font-weight: 600; letter-spacing: 0.04em; }
.stat-value { font-size: 17px; font-weight: 800; color: var(--text); }

/* 차트 */
.history-charts { border-top: 1px solid var(--border); }

.chart-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.chart-section:last-child { border-bottom: none; }

.chart-title {
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}

.chart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
}
.chart-row:last-child { margin-bottom: 0; }

.chart-label { font-size: 11px; color: var(--text3); width: 36px; flex-shrink: 0; text-align: right; font-weight: 500; }

.chart-bars { flex: 1; }

.bar-wrap { display: flex; align-items: center; gap: 8px; height: 16px; }
.bar-fill { height: 100%; border-radius: 3px; min-width: 3px; }
.bar-val { font-size: 11px; color: var(--text3); white-space: nowrap; font-weight: 500; }

/* 커스텀 공지 */
.custom-notice {
  background: var(--accent-light);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  font-weight: 500;
  box-shadow: var(--shadow);
}

/* 노트 섹션 */
.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title { font-size: 14px; font-weight: 700; color: var(--text2); }

.notes-list { display: flex; flex-direction: column; gap: 12px; }

.note-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s;
}
.note-card:hover { box-shadow: var(--shadow-md); }

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

.note-author {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.note-date { font-size: 11px; color: var(--text3); }

.note-rating {
  font-size: 12px;
  color: var(--yellow);
  margin-bottom: 10px;
  line-height: 1.6;
  font-weight: 500;
}

.note-content {
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text);
}

.note-images {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.note-images img {
  height: 120px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: opacity 0.15s;
}
.note-images img:hover { opacity: 0.9; }

.empty-notes {
  text-align: center;
  color: var(--text3);
  padding: 48px;
  font-size: 13px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 수정/삭제 버튼 */
.note-edit-btn, .note-delete-btn {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text3);
  cursor: pointer;
  transition: all 0.12s;
  font-weight: 500;
}
.note-edit-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.note-delete-btn:hover { border-color: var(--red); color: var(--red); background: rgba(220,38,38,0.06); }

.own-badge { color: var(--accent); font-weight: 600; }

/* back 링크 */
.back-link { font-size: 13px; color: var(--text3); text-decoration: none; font-weight: 500; }
.back-link:hover { color: var(--accent); }

/* edit 페이지 */
.edit-page { max-width: 600px; margin: 0 auto; padding: 40px 20px; }
.login-section h1, .edit-section h1 { font-size: 22px; font-weight: 800; margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.edit-group { margin-bottom: 22px; }
.edit-group label { display: block; font-size: 11px; color: var(--text3); margin-bottom: 7px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
#save-status { margin-top: 10px; font-size: 13px; font-weight: 500; }
.profile-upload-wrap { display: flex; flex-direction: column; gap: 10px; }
.edit-profile-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); box-shadow: var(--shadow); }

/* 모바일 */
@media (max-width: 540px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-right: 1px solid var(--border); border-top: 1px solid var(--border); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--border); }
  .rating-table-grid { grid-template-columns: 1fr; }
  .rating-cell { border-right: none !important; }
  .rating-cell:nth-child(odd):not(:last-child) { border-bottom: 1px solid var(--border) !important; }
  .profile-meta-row { gap: 16px; }
}

/* ── 댓글 섹션 ── */
.comments-section {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.comments-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-count {
  background: var(--bg3);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  color: var(--text3);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.comment-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-bubble {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text3);
  overflow: hidden;
}

.comment-body {
  flex: 1;
  background: var(--bg3);
  border-radius: 0 10px 10px 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
}

.comment-author {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.streamer-tag {
  font-size: 10px;
  background: rgba(124,58,237,0.1);
  color: var(--accent);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 999px;
  padding: 1px 6px;
  font-weight: 600;
}

.my-tag {
  font-size: 10px;
  background: var(--bg4);
  color: var(--text3);
  border-radius: 999px;
  padding: 1px 6px;
}

.comment-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-all;
}

.comment-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-left: 36px;
}

.comment-date {
  font-size: 11px;
  color: var(--text3);
}

.comment-reply-btn, .comment-delete-btn {
  font-size: 11px;
  color: var(--text3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
  transition: color 0.12s;
}
.comment-reply-btn:hover { color: var(--accent); }
.comment-delete-btn:hover { color: var(--red); }

/* 대댓글 */
.replies-list {
  margin-left: 36px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reply-item .comment-body {
  background: var(--bg2);
  border-color: var(--border);
}

/* 댓글 입력 */
.comment-input-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.comment-input {
  flex: 1;
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  resize: none !important;
  margin-bottom: 0 !important;
  min-height: 38px;
  line-height: 1.5;
}
.comment-input:focus { border-color: var(--accent) !important; }

.comment-submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.comment-submit-btn:hover { background: var(--accent2); }
.comment-submit-btn:disabled { background: var(--bg4); color: var(--text3); cursor: not-allowed; }

.reply-input-wrap {
  margin-top: 6px;
  margin-left: 36px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.streamer-comment-toggle {
  font-size: 11px;
  color: var(--accent);
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-xs);
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s;
  margin-bottom: 8px;
  display: inline-block;
}
.streamer-comment-toggle:hover { background: rgba(124,58,237,0.15); }
