/* ============================================================
   forum.css â€” Glassmorphism design cho trang Forum
   ============================================================ */

/* â”€â”€ Page wrapper â”€â”€ */
.fr-page {
  width: 100%;
  max-width: 100%;
  padding: 0 20px 48px;
  box-sizing: border-box;
}

/* â”€â”€ Breadcrumb â”€â”€ */
.fr-bc {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 0 16px;
  font-size: 12.5px; color: var(--ah-text-muted); flex-wrap: wrap;
}
.fr-bc a { color: var(--ah-text-muted); text-decoration: none; transition: color .14s; }
.fr-bc a:hover { color: var(--ah-accent); }
.fr-bc span { opacity: .4; }
.fr-bc__cur { opacity:1; color: var(--ah-text); font-weight: 600; }

/* â”€â”€ Header banner â”€â”€ */
.fr-header {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.fr-header__poster {
  width: 58px; height: 82px;
  object-fit: cover; border-radius: 8px;
  background: #1a1a2a; flex-shrink: 0;
}
.fr-header__icon {
  width: 54px; height: 54px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ah-accent) 0%, #7c3aed 100%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.fr-header__icon .material-icons-round { font-size: 28px; color: #fff; }
.fr-header__body { flex:1; min-width:0; }
.fr-header__title { font-size: 18px; font-weight: 700; color: var(--ah-text); margin-bottom: 3px; }
.fr-header__sub { font-size: 12.5px; color: var(--ah-text-muted); }
.fr-header__actions { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-shrink:0; }

/* â”€â”€ Filter chips (type badges) â”€â”€ */
.fr-filters {
  display: flex; gap: 7px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.fr-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 14px; border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: var(--ah-text-muted); font-size: 12.5px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: all .14s; white-space: nowrap;
}
.fr-chip:hover { border-color: rgba(255,255,255,.22); color: var(--ah-text); }
.fr-chip.active {
  background: var(--ah-accent); border-color: var(--ah-accent);
  color: #fff; font-weight: 600;
  box-shadow: 0 2px 12px rgba(200,40,40,.3);
}

/* â”€â”€ Thread list â”€â”€ */
.fr-list { display: flex; flex-direction: column; gap: 8px; }

/* Thread card */
.fr-thread {
  display: flex; gap: 13px; align-items: flex-start;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 13px 16px;
  text-decoration: none; color: inherit;
  transition: border-color .15s, background .15s;
}
.fr-thread:hover {
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.15);
}
.fr-thread--pinned { border-color: rgba(251,191,36,.3); }

/* Movie poster mini (hub) */
.fr-thread__poster {
  width: 38px; height: 54px;
  object-fit: cover; border-radius: 5px;
  background: #1a1a2a; flex-shrink: 0;
}

/* Badge type */
.fr-badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 10px;
  color: #fff; flex-shrink: 0; margin-top: 1px;
}
.fr-badge--review   { background: #0e7490; }
.fr-badge--question { background: #1d4ed8; }
.fr-badge--spoiler  { background: #c2410c; }
.fr-badge--resource { background: #15803d; }
.fr-badge--other    { background: #4b5563; }

.fr-thread__body { flex:1; min-width:0; }
.fr-thread__movie {
  font-size: 11.5px; color: var(--ah-accent); font-weight: 500;
  margin-bottom: 3px;
  display: flex; align-items: center; gap: 5px;
}
.fr-thread__title {
  font-size: 14px; font-weight: 600; color: var(--ah-text);
  margin-bottom: 5px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.fr-thread__meta {
  font-size: 11.5px; color: var(--ah-text-muted);
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.fr-thread__meta .material-icons-round { font-size: 13px; vertical-align: middle; }
.fr-thread__replies {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; flex-shrink: 0; min-width: 38px; text-align: center;
}
.fr-thread__replies-count {
  font-size: 16px; font-weight: 700; color: var(--ah-text);
}
.fr-thread__replies-lbl { font-size: 10px; color: var(--ah-text-muted); }

/* â”€â”€ Create thread form â”€â”€ */
.fr-create-panel {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}
.fr-create-panel__title {
  font-size: 15px; font-weight: 700; color: var(--ah-text);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px;
}
.fr-create-panel__title .material-icons-round { color: var(--ah-accent); }

/* Movie search in create form */
.fr-movie-search-wrap { position: relative; margin-bottom: 10px; }
.fr-movie-search-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 300;
  background: rgba(18,18,28,.98);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  display: none;
}
.fr-movie-search-results.open { display: block; }
.fr-movie-result {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer;
  transition: background .12s;
}
.fr-movie-result:hover { background: rgba(255,255,255,.07); }
.fr-movie-result img { width: 30px; height: 42px; object-fit: cover; border-radius: 4px; }
.fr-movie-result__name { font-size: 13px; color: var(--ah-text); font-weight: 500; }

/* Form inputs */
.fr-input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  color: var(--ah-text); font-family: var(--ah-font); font-size: 13.5px;
  padding: 10px 14px; outline: none;
  transition: border-color .14s;
  margin-bottom: 10px;
}
.fr-input:focus { border-color: var(--ah-accent); }
.fr-input::placeholder { color: var(--ah-text-muted); }
textarea.fr-input { resize: vertical; min-height: 100px; }

.fr-select {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  color: var(--ah-text); font-family: var(--ah-font); font-size: 13px;
  padding: 9px 14px; outline: none; cursor: pointer;
  appearance: none; margin-bottom: 10px;
}
.fr-select option { background: #1a1a28; }

/* Submit + actions */
.fr-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; font-family: var(--ah-font);
  cursor: pointer; text-decoration: none; border: none;
  transition: all .14s;
}
.fr-btn--primary {
  background: var(--ah-accent); color: #fff;
  box-shadow: 0 3px 14px rgba(200,40,40,.3);
}
.fr-btn--primary:hover { background: #a51c1c; }
.fr-btn--ghost {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--ah-text-muted);
}
.fr-btn--ghost:hover { color: var(--ah-text); }
.fr-btn .material-icons-round { font-size: 16px; }

/* â”€â”€ Thread detail page â”€â”€ */
.fr-thread-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
}
.fr-thread-card__head {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 14px;
}
.fr-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08); object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.fr-thread-card__author { font-weight: 600; font-size: 14px; color: var(--ah-text); }
.fr-thread-card__time { font-size: 11.5px; color: var(--ah-text-muted); }
.fr-thread-card__title { font-size: 20px; font-weight: 700; color: var(--ah-text); margin-bottom: 14px; }
.fr-thread-card__content {
  font-size: 14px; color: var(--ah-text-muted); line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
}

/* â”€â”€ Replies â”€â”€ */
.fr-replies-head {
  font-size: 14px; font-weight: 600; color: var(--ah-text);
  margin: 18px 0 10px;
  display: flex; align-items: center; gap: 7px;
}
.fr-replies-head .material-icons-round { color: var(--ah-accent); font-size: 18px; }
.fr-reply {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 8px;
}
.fr-reply__head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.fr-reply-avatar { width: 30px; height: 30px; border-radius: 50%; }
.fr-reply__author { font-size: 13px; font-weight: 600; color: var(--ah-text); }
.fr-reply__time { font-size: 11px; color: var(--ah-text-muted); }
.fr-reply__content {
  font-size: 13.5px; color: var(--ah-text-muted); line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
}

/* Reply form */
.fr-reply-form {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}
.fr-reply-form__title { font-size: 13px; color: var(--ah-text-muted); margin-bottom: 9px; }

/* â”€â”€ Pagination â”€â”€ */
.fr-pagination {
  display: flex; gap: 6px; justify-content: center;
  flex-wrap: wrap; margin-top: 18px;
}
.fr-pagination a, .fr-pagination span {
  padding: 6px 13px; border-radius: 7px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  color: var(--ah-text-muted); font-size: 13px;
  text-decoration: none; transition: all .12s;
}
.fr-pagination a:hover { background: rgba(255,255,255,.1); color: var(--ah-text); }
.fr-pagination a.active, .fr-pagination span.active {
  background: var(--ah-accent); border-color: var(--ah-accent);
  color: #fff; font-weight: 600;
}

/* â”€â”€ Empty state â”€â”€ */
.fr-empty {
  text-align: center; padding: 48px 20px;
  color: var(--ah-text-muted); font-size: 14px;
}
.fr-empty .material-icons-round { font-size: 48px; opacity: .3; display: block; margin-bottom: 10px; }

/* â”€â”€ Guest prompt â”€â”€ */
.fr-guest {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 18px;
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 10px;
  font-size: 13.5px; color: var(--ah-text-muted);
  margin-top: 10px;
}
.fr-guest a { color: var(--ah-accent); font-weight: 600; text-decoration: none; }
.fr-guest a:hover { text-decoration: underline; }

/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 600px) {
  .fr-thread { padding: 11px 13px; gap: 10px; }
  .fr-thread__title { font-size: 13px; }
  .fr-thread__poster { width: 32px; height: 46px; }
  .fr-create-panel { padding: 14px; }
}

/* ═══════════════════════════════════════════════════════════
   NEW FEATURES — v2
═══════════════════════════════════════════════════════════ */

/* ── Search bar ── */
.fr-search-bar {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 9px 14px;
  margin-bottom: 12px; transition: border-color .14s;
}
.fr-search-bar:focus-within { border-color: var(--ah-accent); }
.fr-search-bar .material-icons-round { color: var(--ah-text-muted); font-size: 18px; }
.fr-search-bar input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--ah-text); font-family: var(--ah-font); font-size: 13.5px;
}
.fr-search-bar input::placeholder { color: var(--ah-text-muted); }
.fr-search-clear {
  background: transparent; border: none; color: var(--ah-text-muted);
  cursor: pointer; font-size: 14px; padding: 0 2px;
}
.fr-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fr-filters { flex: 1; display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 0; }
.fr-sort { display: flex; align-items: center; gap: 6px; font-size: 12px; flex-shrink: 0; }
.fr-sort-opt {
  padding: 4px 10px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  color: var(--ah-text-muted); font-size: 12px; text-decoration: none;
  transition: all .14s; white-space: nowrap;
}
.fr-sort-opt:hover { color: var(--ah-text); }
.fr-sort-opt.active { background: rgba(200,40,40,.15); border-color: var(--ah-accent); color: var(--ah-accent); font-weight: 600; }
.fr-thread-card__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.fr-thread-card__acts { display: flex; gap: 5px; align-items: center; }
.fr-act-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: var(--ah-text-muted); cursor: pointer; transition: all .14s;
}
.fr-act-btn:hover { background: rgba(255,255,255,.12); color: var(--ah-text); }
.fr-act-btn .material-icons-round { font-size: 15px; }
.fr-act-btn--danger:hover { background: rgba(220,38,38,.18); color: #ef4444; border-color: #ef4444; }
.fr-act-btn--mod:hover { background: rgba(245,158,11,.18); color: #f59e0b; border-color: #f59e0b; }
.fr-user-col { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.fr-user-info { display: flex; flex-direction: column; gap: 2px; }
.fr-user-info__name { font-size: 13px; font-weight: 600; color: var(--ah-text); display: flex; gap: 5px; align-items: center; }
.fr-user-info__level { font-size: 10.5px; font-weight: 600; }
.fr-vip-badge { display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: linear-gradient(135deg,#f59e0b,#fbbf24); color: #000; letter-spacing: .04em; }
.fr-mod-badge { display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: linear-gradient(135deg,#7c3aed,#a855f7); color: #fff; letter-spacing: .04em; }
.fr-thread-card__title { font-size: 20px; font-weight: 700; color: var(--ah-text); margin-bottom: 12px; line-height: 1.35; }
.fr-thread-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.fr-thread-card__time { font-size: 11.5px; color: var(--ah-text-muted); }
.fr-thread-card__content { font-size: 13.5px; color: var(--ah-text); line-height: 1.75; word-break: break-word; }
.fr-edited-mark { font-size: 10.5px; color: var(--ah-text-muted); font-style: italic; }
.fr-pin-badge { font-size: 11px; color: #fbbf24; }
.fr-reply { background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 13px 16px; margin-bottom: 8px; transition: border-color .12s; scroll-margin-top: 80px; }
.fr-reply:hover { border-color: rgba(255,255,255,.12); }
.fr-reply--new { animation: frSlideIn .25s ease both; }
@keyframes frSlideIn { from { opacity:0; transform:translateY(8px);} to{opacity:1;transform:none;} }
.fr-reply__head { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 9px; flex-wrap: wrap; }
.fr-reply-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.fr-reply__meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.fr-reply__time { font-size: 11px; color: var(--ah-text-muted); }
.fr-reply__content { font-size: 13.5px; color: var(--ah-text); line-height: 1.7; word-break: break-word; margin-bottom: 9px; }
.fr-reply__actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.06); }
.fr-like-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: var(--ah-text-muted); font-size: 12px; cursor: pointer; font-family: var(--ah-font); transition: all .15s; }
.fr-like-btn:hover { background: rgba(220,38,38,.12); border-color: #ef4444; color: #ef4444; }
.fr-like-btn.active { background: rgba(220,38,38,.18); border-color: #ef4444; color: #ef4444; animation: frPop .2s ease; }
@keyframes frPop { 0%{transform:scale(1);} 50%{transform:scale(1.18);} 100%{transform:scale(1);} }
.fr-act-sm { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 7px; background: transparent; border: 1px solid rgba(255,255,255,.09); color: var(--ah-text-muted); font-size: 11.5px; cursor: pointer; font-family: var(--ah-font); transition: all .13s; }
.fr-act-sm .material-icons-round { font-size: 13px; }
.fr-act-sm:hover { background: rgba(255,255,255,.08); color: var(--ah-text); }
.fr-act-sm--danger:hover { background: rgba(220,38,38,.15); color: #ef4444; border-color: #ef4444; }
.fr-act-sm--mod:hover { background: rgba(245,158,11,.15); color: #f59e0b; border-color: #f59e0b; }
.fr-quote-preview { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; background: rgba(255,255,255,.04); border-left: 3px solid var(--ah-accent); border-radius: 0 8px 8px 0; padding: 8px 12px; margin-bottom: 8px; }
.fr-quote-preview__text { font-size: 12.5px; color: var(--ah-text-muted); font-style: italic; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-quote-preview__remove { background: transparent; border: none; color: var(--ah-text-muted); cursor: pointer; font-size: 13px; padding: 0 2px; flex-shrink: 0; }
.fr-quote-preview__remove:hover { color: #ef4444; }
.fr-inline-edit { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.fr-inline-edit__btns { display: flex; gap: 8px; margin-top: 8px; }
.fr-btn--sm { padding: 6px 14px; font-size: 12.5px; }
.fr-create-error { background: rgba(220,38,38,.12); border: 1px solid rgba(220,38,38,.3); color: #ef4444; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.fr-selected-movie-label { font-size: 12px; color: var(--ah-accent); margin-bottom: 10px; min-height: 16px; }
.fr-textarea { resize: vertical; min-height: 80px; }
.fr-reply__content strong,.fr-thread-card__content strong { color: var(--ah-text); font-weight: 700; }
.fr-reply__content em,.fr-thread-card__content em { font-style: italic; }
.fr-reply__content del,.fr-thread-card__content del { text-decoration: line-through; opacity: .65; }
.fr-code-inline { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 4px; padding: 1px 6px; font-family: monospace; font-size: 85%; color: #a5f3fc; }
.fr-quote { border-left: 3px solid rgba(255,255,255,.2); margin: 6px 0; padding: 6px 12px; background: rgba(255,255,255,.04); border-radius: 0 6px 6px 0; color: var(--ah-text-muted); font-style: italic; }
.fr-link { color: var(--ah-accent); text-decoration: underline; word-break: break-all; }
.fr-md-hint { font-size: 11px; color: var(--ah-text-muted); margin-bottom: 8px; opacity: .7; font-family: monospace; }
.fr-md-hint-inline { font-size: 11px; color: var(--ah-text-muted); margin-left: auto; }
.fr-reply-form__row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.fr-reply-form__title { font-size: 13px; font-weight: 600; color: var(--ah-text); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.fr-reply-form__title .material-icons-round { color: var(--ah-accent); font-size: 17px; }
.fr-char-count { font-size: 11.5px; color: var(--ah-text-muted); margin-left: auto; }
.fr-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: frSpin .7s linear infinite; margin-right: 5px; }
@keyframes frSpin { to { transform: rotate(360deg); } }
@media (max-width:600px) {
  .fr-toolbar{flex-direction:column;align-items:flex-start;gap:8px;}
  .fr-reply__head{flex-direction:column;align-items:flex-start;}
  .fr-reply__actions{gap:5px;}
  .fr-act-sm{font-size:11px;padding:3px 8px;}
}
/* ── Media: Image embed ── */
.fr-reply__content img.fr-img,
.fr-thread-card__content img.fr-img {
  max-width: 100%; border-radius: 8px;
  margin: 6px 0; display: block;
  border: 1px solid rgba(255,255,255,.1);
  cursor: zoom-in; transition: opacity .12s;
}
.fr-reply__content img.fr-img:hover,
.fr-thread-card__content img.fr-img:hover { opacity: .88; }

/* ── Media: Video embed (iframe container) ── */
.fr-video-wrap {
  position: relative; padding-bottom: 56.25%;
  height: 0; overflow: hidden;
  border-radius: 10px; margin: 8px 0;
  background: #000; border: 1px solid rgba(255,255,255,.1);
}
.fr-video-wrap iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: none;
}

/* ── Image lightbox overlay ── */
.fr-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.9); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: frLbIn .18s ease;
  cursor: zoom-out;
}
@keyframes frLbIn { from{opacity:0} to{opacity:1} }
.fr-lightbox img {
  max-width: 94vw; max-height: 90vh;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.7);
  object-fit: contain;
}
.fr-lightbox__close {
  position: absolute; top: 16px; right: 20px;
  background: rgba(255,255,255,.1); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
}

/* ── Media toolbar (insert image / video) ── */
.fr-media-toolbar {
  display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap;
}
.fr-media-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 7px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--ah-text-muted); font-size: 12px;
  cursor: pointer; font-family: var(--ah-font);
  transition: all .13s;
}
.fr-media-btn:hover { background: rgba(255,255,255,.1); color: var(--ah-text); border-color: rgba(255,255,255,.2); }
.fr-media-btn .material-icons-round { font-size: 14px; }

/* ── Profile link on user in forum ── */
.fr-user-info__name a.fr-profile-link {
  color: var(--ah-text); text-decoration: none; transition: color .12s;
}
.fr-user-info__name a.fr-profile-link:hover { color: var(--ah-accent); text-decoration: underline; }
.fr-thread-card__author a.fr-profile-link,
.fr-reply__author a.fr-profile-link {
  color: var(--ah-text); text-decoration: none;
}
.fr-thread-card__author a.fr-profile-link:hover,
.fr-reply__author a.fr-profile-link:hover { color: var(--ah-accent); text-decoration: underline; }

/* ── Layout: 2 cột khi màn hình rộng ── */
@media (min-width: 1200px) {
  .fr-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ── MOD: lock button ── */
.fr-act-btn--mod-lock { color: #a855f7; border-color: rgba(168,85,247,.3); }
.fr-act-btn--mod-lock:hover { background: rgba(168,85,247,.18); color: #c084fc; border-color: #a855f7; }

/* ── Thread locked banner ── */
.fr-locked-banner {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 0 16px;
  padding: 10px 14px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 8px;
  color: #f87171; font-size: 12.5px; font-weight: 600;
}
.fr-locked-banner .material-icons-round { font-size: 15px; }

/* ── MOD: hidden reply visible to MOD (dimmed + border) ── */
.fr-reply--hidden {
  opacity: .55;
  border-color: rgba(245,158,11,.35) !important;
  background: rgba(245,158,11,.04) !important;
}
.fr-reply--hidden::before {
  content: '👁 Ẩn [MOD]';
  display: block;
  font-size: 10px; font-weight: 700;
  color: #f59e0b; margin-bottom: 6px;
  letter-spacing: .04em;
}

/* ── Category icon in thread list (when no poster) ── */
.fr-thread__cat-icon {
  width: 38px; height: 54px;
  border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
}
.fr-thread__cat-label {
  font-size: 11.5px; font-weight: 600;
  margin-bottom: 3px;
}

/* ── Movie badge on thread page ── */
.fr-movie-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ah-accent);
  background: rgba(var(--ah-accent-rgb, 200,40,40),.1);
  border: 1px solid rgba(var(--ah-accent-rgb, 200,40,40),.25);
  border-radius: 20px; padding: 3px 12px;
  margin-bottom: 12px;
}
.fr-movie-badge .material-icons-round { font-size: 14px; }
.fr-movie-badge a { color: inherit; text-decoration: underline; }

/* ── Pending / Rejected banners ── */
.fr-pending-banner {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px;
  padding: 10px 14px;
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.3);
  border-radius: 8px;
  color: #fbbf24; font-size: 12.5px; font-weight: 600;
}
.fr-pending-banner--rejected {
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.3);
  color: #ef4444;
}
.fr-pending-banner .material-icons-round { font-size: 15px; }

/* ── Pending note in create form ── */
.fr-pending-note {
  font-size: 11.5px; color: var(--ah-text-muted);
  font-style: italic;
}

/* ── Form label ── */
.fr-form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--ah-text-muted); margin-bottom: 5px;
}

/* ── Movie opt toggle ── */
.fr-movie-opt-toggle { margin-bottom: 10px; }

/* ── MOD link button ── */
.fr-btn--mod-link {
  background: rgba(168,85,247,.12);
  border: 1px solid rgba(168,85,247,.3);
  color: #a855f7;
}
.fr-btn--mod-link:hover {
  background: rgba(168,85,247,.22);
  color: #c084fc;
}
.fr-btn--mod-link .material-icons-round { font-size: 16px; }

/* ════════════════════════════════════════════════════════
   MOD PANEL (/forum-mod)
════════════════════════════════════════════════════════ */

/* Stats row */
.fr-mod-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.fr-mod-stat {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 14px 16px;
  text-align: center;
}
.fr-mod-stat--pending { border-color: rgba(251,191,36,.25); }
.fr-mod-stat--approved { border-color: rgba(16,185,129,.25); }
.fr-mod-stat--rejected { border-color: rgba(239,68,68,.25); }
.fr-mod-stat__n {
  font-size: 24px; font-weight: 700; color: var(--ah-text);
}
.fr-mod-stat__lbl { font-size: 11px; color: var(--ah-text-muted); margin-top: 2px; }

/* Tabs */
.fr-mod-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
}
.fr-mod-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: var(--ah-text-muted); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all .14s;
}
.fr-mod-tab:hover { border-color: rgba(255,255,255,.2); color: var(--ah-text); }
.fr-mod-tab.active {
  background: rgba(168,85,247,.15);
  border-color: #a855f7; color: #c084fc; font-weight: 600;
}
.fr-mod-tab__badge {
  background: rgba(168,85,247,.3); color: #c084fc;
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px;
}

/* Thread row */
.fr-mod-list { display: flex; flex-direction: column; gap: 8px; }
.fr-mod-row {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 14px 16px;
  transition: border-color .15s, opacity .3s, height .3s;
  overflow: hidden;
}
.fr-mod-row:hover { border-color: rgba(255,255,255,.14); }
.fr-mod-row__poster {
  width: 44px; height: 62px;
  object-fit: cover; border-radius: 6px;
  background: #1a1a2a; flex-shrink: 0;
}
.fr-mod-row__caticon {
  width: 44px; height: 62px;
  border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff;
}
.fr-mod-row__body { flex: 1; min-width: 0; }
.fr-mod-row__meta-top {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-bottom: 5px;
}
.fr-mod-status {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
.fr-mod-status--pending  { background: rgba(251,191,36,.15); color: #fbbf24; }
.fr-mod-status--approved { background: rgba(16,185,129,.15); color: #10b981; }
.fr-mod-status--rejected { background: rgba(239,68,68,.15);  color: #ef4444; }
.fr-mod-row__movie { font-size: 11px; color: var(--ah-accent); }
.fr-mod-row__title {
  display: block; font-size: 14px; font-weight: 600; color: var(--ah-text);
  text-decoration: none; margin-bottom: 5px; line-height: 1.4;
  transition: color .15s;
}
.fr-mod-row__title:hover { color: var(--ah-accent); }
.fr-mod-row__info {
  font-size: 11.5px; color: var(--ah-text-muted);
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 6px;
}
.fr-mod-row__preview {
  font-size: 12.5px; color: var(--ah-text-muted);
  opacity: .75; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.fr-mod-row__acts {
  display: flex; flex-direction: column; gap: 6px;
  flex-shrink: 0; min-width: 90px;
}
.fr-btn--approve {
  background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.3);
  color: #10b981; font-size: 12px; padding: 6px 12px;
}
.fr-btn--approve:hover { background: rgba(16,185,129,.28); }
.fr-btn--reject {
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3);
  color: #ef4444; font-size: 12px; padding: 6px 12px;
}
.fr-btn--reject:hover { background: rgba(239,68,68,.22); }
.fr-btn--approve .material-icons-round,
.fr-btn--reject .material-icons-round { font-size: 14px; }

@media (max-width: 700px) {
  .fr-mod-stats { grid-template-columns: repeat(2, 1fr); }
  .fr-mod-row { flex-direction: column; }
  .fr-mod-row__acts { flex-direction: row; flex-wrap: wrap; }
}
/* -- Markdown rendered content ----------------------------------------------- */
.fr-thread-card__content,
.fr-reply__content {
  line-height: 1.75;
  color: var(--ah-text, #e8e8e8);
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Headings */
.fr-thread-card__content .fr-heading,
.fr-reply__content .fr-heading {
  font-weight: 700;
  margin: 10px 0 4px;
  color: #fff;
}
.fr-thread-card__content h1.fr-heading { font-size: 1.25rem; }
.fr-thread-card__content h2.fr-heading { font-size: 1.1rem; }
.fr-thread-card__content h3.fr-heading { font-size: 1rem; }

/* Inline code */
.fr-code-inline {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  color: #e2c08d;
}

/* Fenced code block */
.fr-code-block {
  background: #0d0d1a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  margin: 8px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #c9d1d9;
}

/* Images */
.fr-thread-card__content .fr-img,
.fr-reply__content .fr-img {
  max-width: 100%;
  border-radius: 8px;
  margin: 6px 0;
  cursor: zoom-in;
  border: 1px solid rgba(255,255,255,0.08);
  display: block;
}

/* Lists */
.fr-thread-card__content .fr-list,
.fr-reply__content .fr-list {
  padding-left: 20px;
  margin: 4px 0;
}
.fr-thread-card__content .fr-list li,
.fr-reply__content .fr-list li {
  margin: 2px 0;
}

/* Horizontal rule */
.fr-thread-card__content .fr-hr,
.fr-reply__content .fr-hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 12px 0;
}

/* ═══════════════════════════════════════════════════════════
   THREAD TIP SYSTEM  v2
═══════════════════════════════════════════════════════════ */

/* ── Tip section (bar) ── */
.fr-tip-section {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-top: 16px; padding: 14px 18px;
  background: linear-gradient(135deg, rgba(245,158,11,.06) 0%, rgba(251,191,36,.03) 100%);
  border: 1px solid rgba(245,158,11,.18);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.fr-tip-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 10% 50%, rgba(245,158,11,.06) 0%, transparent 60%);
  pointer-events: none;
}
.fr-tip-section__left { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.fr-tip-section__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.2);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.fr-tip-coin-icon { font-size: 22px; filter: drop-shadow(0 2px 4px rgba(245,158,11,.3)); }
.fr-tip-coin-sparkle {
  position: absolute; inset: -4px;
  border-radius: 16px;
  pointer-events: none;
}
.fr-tip-sparkle-anim {
  animation: frSparkle .8s ease;
  box-shadow: 0 0 12px rgba(245,158,11,.5), 0 0 24px rgba(251,191,36,.2);
}
@keyframes frSparkle {
  0%   { opacity: 0; transform: scale(.8); }
  30%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.3); }
}
.fr-tip-section__info { display: flex; flex-direction: column; gap: 2px; }
.fr-tip-section__count {
  display: flex; align-items: baseline; gap: 5px;
  transition: transform .3s;
}
.fr-tip-section__number {
  font-size: 22px; font-weight: 800; color: #fbbf24;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(251,191,36,.2);
}
.fr-tip-section__unit {
  font-size: 12.5px; font-weight: 600; color: var(--ah-text-muted);
}
.fr-tip-section__desc {
  font-size: 11.5px; color: var(--ah-text-muted); opacity: .7;
}
.fr-tip-bounce { animation: frTipBounce .5s ease; }
@keyframes frTipBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.12); }
  60%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}

/* ── Tip button ── */
.fr-tip-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: 22px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000; font-size: 13px; font-weight: 700;
  border: none; cursor: pointer;
  font-family: var(--ah-font);
  transition: all .18s; text-decoration: none;
  box-shadow: 0 3px 12px rgba(245,158,11,.25);
  position: relative; z-index: 1;
}
.fr-tip-btn:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,.4);
}
.fr-tip-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(245,158,11,.2); }
.fr-tip-btn .material-icons-round { font-size: 17px; }
.fr-tip-btn--muted {
  background: rgba(255,255,255,.06);
  color: var(--ah-text-muted);
  box-shadow: none;
  border: 1px solid rgba(255,255,255,.1);
}
.fr-tip-btn--muted:hover { background: rgba(255,255,255,.1); transform: none; box-shadow: none; }

/* ── Tip modal ── */
.fr-tip-modal {
  margin-top: 12px;
  background: rgba(18,18,30,.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(245,158,11,.15);
  border-radius: 14px;
  overflow: hidden;
  animation: frSlideIn .25s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.fr-tip-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(245,158,11,.08) 0%, rgba(245,158,11,.02) 100%);
  border-bottom: 1px solid rgba(245,158,11,.1);
}
.fr-tip-modal__header-left { display: flex; align-items: center; gap: 10px; }
.fr-tip-modal__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  border: 2px solid rgba(245,158,11,.25);
  flex-shrink: 0;
}
.fr-tip-modal__title { font-size: 11px; color: var(--ah-text-muted); font-weight: 500; }
.fr-tip-modal__author { font-size: 14px; font-weight: 700; color: var(--ah-text); }
.fr-tip-modal__close {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--ah-text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.fr-tip-modal__close:hover { background: rgba(239,68,68,.15); color: #ef4444; border-color: rgba(239,68,68,.2); }
.fr-tip-modal__close .material-icons-round { font-size: 16px; }
.fr-tip-modal__body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.fr-tip-modal__label {
  font-size: 12px; font-weight: 700; color: var(--ah-text-muted);
  text-transform: uppercase; letter-spacing: .06em;
}

/* Quick select */
.fr-tip-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.fr-tip-quick__btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px; border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1.5px solid rgba(255,255,255,.08);
  color: var(--ah-text-muted); font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: var(--ah-font);
  transition: all .14s;
}
.fr-tip-quick__coin { font-size: 14px; }
.fr-tip-quick__btn:hover {
  border-color: rgba(245,158,11,.35); color: #fbbf24;
  background: rgba(245,158,11,.06);
  transform: translateY(-1px);
}
.fr-tip-quick__btn.active {
  background: rgba(245,158,11,.12);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 2px 10px rgba(245,158,11,.15);
}

/* Custom input */
.fr-tip-custom, .fr-tip-msg { display: flex; flex-direction: column; gap: 5px; }
.fr-tip-custom label, .fr-tip-msg label {
  font-size: 12px; font-weight: 600; color: var(--ah-text-muted);
}
.fr-tip-custom__hint { font-weight: 400; opacity: .6; }
.fr-tip-custom__input-wrap {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px; padding-left: 12px;
  transition: border-color .14s;
}
.fr-tip-custom__input-wrap:focus-within { border-color: #f59e0b; }
.fr-tip-custom__prefix { font-size: 16px; flex-shrink: 0; }
.fr-tip-custom__input {
  background: transparent !important; border: none !important;
  margin-bottom: 0 !important; padding-left: 0 !important;
}
.fr-tip-msg .fr-input { margin-bottom: 0; }

/* Summary (receipt) */
.fr-tip-summary {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.fr-tip-summary__row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--ah-text-muted);
}
.fr-tip-summary__row strong { color: var(--ah-text); }
.fr-tip-summary__row--fee { opacity: .6; }
.fr-tip-summary__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  margin: 2px 0;
}
.fr-tip-summary__row--total { font-size: 13.5px; }
.fr-tip-summary__row--total strong { color: #fbbf24; font-size: 14px; }

/* Submit button */
.fr-tip-submit-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 11px 20px;
  border-radius: 10px; border: none;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000; font-size: 14px; font-weight: 700;
  font-family: var(--ah-font);
  cursor: pointer; transition: all .15s;
  box-shadow: 0 3px 14px rgba(245,158,11,.2);
}
.fr-tip-submit-btn:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 5px 20px rgba(245,158,11,.35);
  transform: translateY(-1px);
}
.fr-tip-submit-btn:active { transform: translateY(0); }
.fr-tip-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.fr-tip-submit-btn .material-icons-round { font-size: 18px; }

/* Result */
.fr-tip-result {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-radius: 10px; font-size: 13px;
  font-weight: 500;
}
.fr-tip-result .material-icons-round { font-size: 17px; }
.fr-tip-result--ok {
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2);
  color: #10b981;
}
.fr-tip-result--err {
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2);
  color: #ef4444;
}

/* ── Hub badge ── */
.fr-tip-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: #fbbf24;
  background: rgba(251,191,36,.1);
  border-radius: 10px; padding: 1px 8px;
}

@media (max-width: 600px) {
  .fr-tip-section { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 14px; }
  .fr-tip-btn { width: 100%; justify-content: center; }
  .fr-tip-quick { gap: 6px; }
  .fr-tip-quick__btn { padding: 7px 12px; font-size: 13px; flex: 1; min-width: 0; justify-content: center; }
  .fr-tip-modal__body { padding: 14px; }
}

