/* ============================================
   COMMENTS + FEED + NICKNAME MODAL + RATE TOAST
   ============================================ */

/* ─── Comments section (inside detail page) ─── */
.comments {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.comments__count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 4px;
}

/* Comment form */
.comments__form {
  margin-top: 16px;
  margin-bottom: 20px;
}
.comments__input {
  width: 100%;
  min-height: 72px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.comments__input::placeholder { color: var(--text-secondary); opacity: 0.5; }
.comments__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 229,9,20), 0.15);
}
.comments__form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.comments__author-label {
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.7;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.comments__author-label::before {
  content: '👤';
  font-size: 12px;
}
.comments__author-label:hover { opacity: 1; }
.comments__chars {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.5;
  margin-left: auto;
}
.comments__submit {
  padding: 8px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  white-space: nowrap;
}
.comments__submit:hover { opacity: 0.85; transform: translateY(-1px); }
.comments__submit:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* Comment list */
.comments__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.comments__empty {
  text-align: center;
  padding: 32px 0;
  color: var(--text-secondary);
  opacity: 0.5;
  font-size: 14px;
}
.comments__error {
  text-align: center;
  padding: 24px 0;
  color: #e55;
  font-size: 14px;
}
.comments__loader {
  display: flex;
  justify-content: center;
  padding: 24px 0;
}

/* Single comment */
.comment {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  animation: commentIn 0.35s ease-out;
}
.comment:last-child { border-bottom: none; }
.comment--reply {
  padding: 10px 0 10px 0;
  border-bottom: none;
}

@keyframes commentIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment__avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), rgba(255,255,255,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.comment--reply .comment__avatar { width: 28px; height: 28px; font-size: 11px; }
.comment__body { flex: 1; min-width: 0; }
.comment__header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.comment__author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.comment__time {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.5;
}
.comment__text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-word;
}

/* Comment actions */
.comment__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.comment__like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  opacity: 0.5;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 12px;
  transition: all 0.2s;
}
.comment__like:hover { opacity: 0.8; background: rgba(255,255,255,0.04); }
.comment__like--active {
  opacity: 1 !important;
  color: #e50914 !important;
}
.comment__like--active svg { fill: #e50914; stroke: #e50914; }
.comment__reply-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  opacity: 0.5;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: all 0.2s;
}
.comment__reply-btn:hover { opacity: 0.8; background: rgba(255,255,255,0.04); }

/* Reply form */
.comment__reply-form {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.comment__reply-input {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}
.comment__reply-submit {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: all 0.2s;
}
.comment__reply-submit:hover { opacity: 0.85; }
.comment__reply-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* Nested replies */
.comment__replies {
  margin-top: 8px;
  padding-left: 4px;
  border-left: 2px solid rgba(255,255,255,0.06);
}

/* ─── Feed page — Twitter/X style ─── */
.page--feed {
  max-width: 620px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ─── Feed Hero header (like changelog) ─── */
.feed__hero {
  text-align: center;
  padding: 48px 20px 28px;
  position: relative;
  overflow: hidden;
}
.feed__hero-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(var(--accent-rgb, 229,9,20), 0.25) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(30px);
}
.feed__hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb, 229,9,20), 0.3));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  box-shadow: 0 8px 32px rgba(var(--accent-rgb, 229,9,20), 0.25);
}
.feed__hero-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.03em;
}
.feed__hero-sub {
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0.5;
  margin: 6px 0 0;
}
.feed__hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
}
.feed__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.6;
}
.feed__stat span {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  opacity: 1;
  line-height: 1.2;
}

.feed__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.feed__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 80px 20px;
  color: var(--text-secondary);
  text-align: center;
}
.feed__empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.feed__empty p { font-size: 18px; font-weight: 600; margin: 0; }
.feed__empty span { font-size: 14px; opacity: 0.5; line-height: 1.6; }
.feed__loader {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

/* ─── Feed card — tweet style ─── */
.feed__card {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  animation: feedCardIn 0.4s cubic-bezier(.4,0,.2,1) calc(var(--delay, 0s)) both;
  transition: background 0.6s ease;
}
.feed__card--highlight {
  background: rgba(var(--accent-rgb, 229,9,20), 0.08);
  border-radius: 16px;
  padding: 16px 12px;
  animation: highlightPulse 1.5s ease 2;
}
@keyframes highlightPulse {
  0%, 100% { background: rgba(var(--accent-rgb, 229,9,20), 0.05); }
  50% { background: rgba(var(--accent-rgb, 229,9,20), 0.12); }
}
@keyframes feedCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* User bar */
.feed__user-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.feed__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb, 229,9,20), 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.feed__user-col {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.feed__author {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.feed__time {
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.4;
}
.feed__dots {
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.feed__card:hover .feed__dots { opacity: 1; }

/* Comment text */
.feed__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 12px;
  word-break: break-word;
}

/* Film preview card (embedded link card like X) */
.feed__film-card {
  display: flex;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
  transition: all 0.25s ease;
  background: rgba(255,255,255,0.02);
}
.feed__film-card:hover {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}
.feed__film-poster {
  width: 120px;
  min-height: 140px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
}
.feed__film-body {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feed__film-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed__film-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.feed__meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.feed__meta-chip--rating { font-weight: 700; }
.feed__meta-chip--rating.badge--green { color: #4ade80; }
.feed__meta-chip--rating.badge--green svg { fill: #4ade80; }
.feed__meta-chip--rating.badge--orange { color: #fbbf24; }
.feed__meta-chip--rating.badge--orange svg { fill: #fbbf24; }
.feed__meta-chip--rating.badge--red { color: #f87171; }
.feed__meta-chip--rating.badge--red svg { fill: #f87171; }
.feed__meta-chip svg { flex-shrink: 0; }
.feed__film-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-top: auto;
}

/* Action row */
.feed__actions {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 -8px;
}
.feed__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  opacity: 0.4;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.feed__action:hover {
  opacity: 0.8;
  background: rgba(255,255,255,0.06);
}
.feed__action svg { flex-shrink: 0; }
.feed__action--liked {
  opacity: 1 !important;
  color: #e50914 !important;
}
.feed__action--liked svg {
  fill: #e50914;
  stroke: #e50914;
}
@keyframes likePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.feed__action-time {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.25;
  margin-left: auto;
}

/* ─── Feed expand replies ─── */
.feed__expand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  margin-top: 4px;
  transition: all 0.2s;
}
.feed__expand svg { transition: transform 0.25s ease; }
.feed__expand--open svg { transform: rotate(180deg); }
.feed__expand:hover { opacity: 0.7; }

/* ─── Feed replies ─── */
.feed__replies {
  padding-left: 16px;
  border-left: 2px solid rgba(255,255,255,0.06);
  margin-top: 8px;
}
.feed__reply {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  animation: commentIn 0.3s ease-out;
}
.feed__reply + .feed__reply { border-top: 1px solid rgba(255,255,255,0.03); }
.feed__reply-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), rgba(255,255,255,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.feed__reply-body { flex: 1; min-width: 0; }
.feed__reply-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.feed__reply-author { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.feed__reply-time { font-size: 11px; color: var(--text-secondary); opacity: 0.4; }
.feed__reply-text { font-size: 13px; color: var(--text-primary); line-height: 1.5; word-break: break-word; }
.feed__reply-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  opacity: 0.4;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 8px;
  font-size: 11px;
  margin-top: 4px;
  transition: all 0.2s;
}
.feed__reply-like:hover { opacity: 0.7; background: rgba(255,255,255,0.04); }
.feed__reply-like.feed__action--liked { opacity: 1 !important; color: #e50914 !important; }
.feed__no-replies {
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.4;
}

/* ─── Nickname modal ─── */
.nick-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}
.nick-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nick-modal__card {
  position: relative;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 36px 32px;
  width: 340px;
  max-width: 90vw;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: modalPop 0.3s ease;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.nick-modal__icon { color: var(--accent); opacity: 0.7; }
.nick-modal__card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.nick-modal__input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nick-modal__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 229,9,20), 0.15);
}
.nick-modal__input--error {
  border-color: #e55 !important;
  box-shadow: 0 0 0 3px rgba(255,85,85,0.2) !important;
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.nick-modal__btn {
  width: 100%;
  padding: 12px 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.nick-modal__btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ─── Rate limit toast ─── */
.rate-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  background: rgba(30,0,0,0.85);
  border: 1px solid rgba(255,85,85,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ff7777;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), opacity 0.4s ease;
  opacity: 0;
}
.rate-toast--show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.rate-toast--hide {
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
}
.rate-toast svg { stroke: #ff7777; flex-shrink: 0; }

/* ─── Share toast (green success) ─── */
.share-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  background: rgba(0,30,10,0.9);
  border: 1px solid rgba(74,222,128,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #4ade80;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), opacity 0.4s ease;
  opacity: 0;
}
.share-toast--show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.share-toast--hide {
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
}
.share-toast svg { stroke: #4ade80; flex-shrink: 0; }

/* ─── Spinner (reusable) ─── */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── Mobile adjustments ─── */
@media (max-width: 768px) {
  .comments__form-row { flex-wrap: wrap; }
  .comments__author-label { order: -1; width: 100%; }
  .comment__avatar { width: 30px; height: 30px; font-size: 12px; }
  .comment--reply .comment__avatar { width: 24px; height: 24px; font-size: 10px; }
  .comment { gap: 10px; padding: 12px 0; }

  .page--feed { padding-left: 12px; padding-right: 12px; }
  .feed__hero { padding: 36px 16px 20px; }
  .feed__hero-title { font-size: 24px; }
  .feed__hero-icon { width: 48px; height: 48px; }
  .feed__stat span { font-size: 18px; }
  .feed__film-poster { width: 90px; min-height: 110px; }
  .feed__film-body { padding: 10px 12px; }
  .feed__film-title { font-size: 14px; }
  .feed__meta-chip { font-size: 11px; }
  .feed__text { font-size: 14px; }
  .feed__avatar { width: 36px; height: 36px; font-size: 14px; }
  .feed__replies { padding-left: 12px; }
  .comment__reply-form { flex-direction: column; }
}
