/* Notification bell */

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #ffffff04;
  color: #d4c4f5;
  transition:
    background .2s,
    border-color .2s;
}

.notification-bell:hover,
.notification-bell[aria-current="page"] {
  border-color: #b9a1fa70;
  background: #b9a1fa14;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid var(--bg);
  border-radius: 20px;
  background: #ed718f;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* Completion status */

.anime-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 11px;
  border: 1px solid;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

.anime-status-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.anime-status.is-completed {
  border-color: #47db8a40;
  background: #47db8a0c;
  color: #9be7b7;
}

.anime-status.is-completed .anime-status-dot {
  background: #4ce68c;
  box-shadow:
    0 0 5px #4ce68ccc,
    0 0 12px #4ce68c66;
}

.anime-status.is-ongoing {
  border-color: #f06b7e40;
  background: #f06b7e0c;
  color: #f3a1ad;
}

.anime-status.is-ongoing .anime-status-dot {
  background: #f26b80;
  box-shadow:
    0 0 5px #f26b80cc,
    0 0 12px #f26b8066;
}

.card-info .anime-status {
  margin-top: 8px;
  padding: 3px 8px;
  font-size: 12px;
}

.detail-member-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.detail-member-actions form {
  margin: 0;
}

.follow-button.is-following {
  border-color: #b9a1fa70;
  background: #b9a1fa15;
  color: #d9caff;
}

.follow-help {
  margin-top: 12px;
}

/* Episode likes */

.episode-community-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 130px;
}

.episode-community-bar form {
  margin: 0;
}

.episode-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #ffffff20;
  border-radius: 9px;
  background: #ffffff04;
  color: #c4cadd;
  line-height: 1.4;
  cursor: pointer;
  transition:
    background .2s,
    border-color .2s,
    color .2s;
}

.episode-like:hover {
  border-color: #ee799760;
  background: #ee79970c;
  color: #f7afc2;
}

.episode-like.is-liked {
  border-color: #ee799760;
  background: #ee799715;
  color: #f38fab;
}

.episode-like svg {
  flex-shrink: 0;
}

.like-total {
  min-width: 23px;
  padding-left: 10px;
  border-left: 1px solid currentColor;
  font-family: "FC Sound", Tahoma, Arial, sans-serif;
  font-size: 13px;
  text-align: center;
}

.comment-shortcut {
  color: var(--muted);
  font-size: 14px;
}

.comment-shortcut:hover {
  color: var(--accent);
}

.episode-list-section {
  margin-top: 40px;
}

/* Notifications page */

.notification-page {
  max-width: 1000px;
}

.notification-list {
  display: grid;
  gap: 15px;
}

/* ==================================================
   Comments
   ================================================== */

.episode-comments {
  margin-top: 45px;
  scroll-margin-top: 130px;
}

.comment-heading-count {
  margin-left: 7px;
  color: var(--muted);
  font-family: "FC Sound", Tahoma, Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
}

.comment-form {
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}

.comment-form label {
  display: block;
  margin-top: 0;
}

.comment-form textarea {
  display: block;
  width: 100%;
  min-height: 125px;
  box-sizing: border-box;
}

.comment-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 14px;
}

.comment-form-footer small {
  margin: 0;
}

.comment-list {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 0;
}

.comment-item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 23px 0;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
  border-bottom: 0;
}

.comment-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  border: 1px solid #b9a1fa35;
  border-radius: 50%;
  background: #b9a1fa12;
  color: #d6c5ff;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  object-fit: cover;
}

.comment-content {
  display: block;
  flex: 1 1 auto;
  align-self: flex-start;
  width: auto;
  max-width: calc(100% - 52px);
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: left;
}

.comment-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: auto;
  margin: 0;
  padding: 0;
  text-align: left;
}

.comment-author {
  color: #e5def6;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.comment-meta time {
  color: #78849c;
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.comment-admin-badge {
  padding: 2px 7px;
  border: 1px solid #b9a1fa30;
  border-radius: 5px;
  background: #b9a1fa0d;
  color: #cbb6ff;
  font-size: 11px;
  line-height: 1.5;
}

.comment-body {
  display: block;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d7dae2;
  font-size: 16px;
  line-height: 1.85;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin: 8px 0 0;
  padding: 0;
  text-align: left;
}

.comment-edit-form {
  width: 100%;
  max-width: 560px;
  margin: 10px 0 0;
}

.comment-edit-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  resize: vertical;
}

.comment-edit-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 8px;
}

.comment-action-button,
.comment-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  margin: 0;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #929db3;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.comment-action-button:hover,
.comment-delete-button:hover {
  color: #d9dce8;
}

.comment-delete-button {
  color: #ad7785;
}

.comment-delete-button:hover {
  color: #f2a0b5;
}

.comment-body[hidden],
.comment-edit-form[hidden] {
  display: none !important;
}

.community-empty {
  padding: 30px 10px;
  text-align: center;
}

.community-empty p {
  margin: 0;
  color: #b7bfd1;
}

.community-empty small {
  color: var(--muted);
}

.community-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

.community-pagination > span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 750px) {
  .comment-item {
    gap: 10px;
  }

  .comment-avatar {
    flex-basis: 31px;
    width: 31px;
    height: 31px;
    font-size: 12px;
  }

  .comment-content {
    max-width: calc(100% - 41px);
  }

  .comment-form-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .comment-form-footer .btn {
    align-self: flex-end;
  }

  .comment-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .comment-edit-form {
    width: 100%;
  }
}

.notification-card {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.notification-card.is-unread {
  border-color: #b9a1fa40;
  background:
    linear-gradient(
      110deg,
      #b9a1fa0b,
      transparent 70%
    ),
    var(--surface-soft);
}

.notification-poster {
  display: grid;
  place-items: center;
  flex: 0 0 90px;
  width: 90px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: #192031;
}

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

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: #ac98d5;
  font-size: 12px;
}

.notification-unread-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b9a1fa;
}

.notification-content h2 {
  margin: 0;
  color: #e4e0ef;
  font-size: 21px;
  font-weight: 500;
}

.notification-content p {
  margin: 7px 0;
  color: #aeb8ce;
  font-size: 15px;
}

.notification-content small {
  color: #7c879e;
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.notification-open-form {
  margin-top: 14px;
}

/* Pagination */

.community-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

.community-pagination > span {
  color: var(--muted);
  font-size: 13px;
}

/* Mobile */

@media (max-width: 750px) {
  .notification-bell {
    width: 35px;
    height: 35px;
  }

  .account {
    gap: 10px;
  }

  .episode-community-bar {
    gap: 15px;
  }

  .episode-like {
    padding: 9px 13px;
    font-size: 14px;
  }

  .comment-item {
    gap: 10px;
  }

  .comment-avatar {
    flex-basis: 31px;
    width: 31px;
    height: 31px;
    font-size: 12px;
  }

  .comment-form-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .comment-form-footer .btn {
    align-self: flex-end;
  }

  .notification-card {
    gap: 14px;
    padding: 16px;
  }

  .notification-poster {
    flex-basis: 65px;
    width: 65px;
  }

  .notification-content h2 {
    font-size: 18px;
  }

  .notification-content p {
    font-size: 14px;
  }

  .detail-member-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-member-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notification-bell,
  .episode-like {
    transition: none;
  }
}

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.comment-content {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  text-align: left;
}

.comment-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  text-align: left;
}

.comment-body {
  display: inline-block !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 8px 0 0 !important;
  padding: 8px 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 10px !important;
  background: rgba(0, 0, 0, 0.35) !important;
  color: #d7dae2 !important;
  line-height: 1.6 !important;
  text-align: left !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.comment-body[hidden] {
  display: none !important;
}

.comment-actions {
  display: flex;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center !important;
  gap: 14px;
  margin-top: 8px;
  text-align: left;
}

.comment-delete-form {
  margin: 0;
  display: inline-flex;
}

.comment-edit-form {
  flex-basis: 100%;
  width: min(100%, 560px);
  max-width: 100%;
}

.comment-edit-form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  resize: vertical;
}

.comment-edit-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.comment-action-button,
.comment-delete-button {
  display: inline-flex;
  align-items: center;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #929db3;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}

.comment-action-button:hover {
  color: #d9dce8;
}

.comment-delete-button {
  color: rgba(244, 114, 130, 0.75);
}

.comment-delete-button:hover {
  color: #ff9caf;
}

@media (max-width: 750px) {
  .comment-item {
    gap: 9px;
  }

  .comment-content {
    min-width: 0;
  }

  .comment-edit-form {
    width: 100%;
  }
}

/* ==================================================
   Pro Player & Community Upgrades
   ================================================== */

.watch-container.is-theater {
  width: min(1680px, 96%);
}

.watch-container.is-theater video {
  max-height: 85vh;
}

.lights-off-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
}

.player-stage {
  position: relative;
  z-index: 45;
  margin-bottom: 18px;
}

.player-stage video {
  margin-bottom: 10px;
}

.resume-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 16px;
  border: 1px solid #b9a1fa50;
  border-radius: 10px;
  background: #151b29;
  color: #e6dff8;
  font-size: 14px;
}

.resume-toast-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-pro-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #101520;
}

.player-pro-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pro-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: #d4d8e6;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pro-tool-btn:hover,
.pro-tool-btn[aria-pressed="true"] {
  border-color: #b9a1fa80;
  background: rgba(185, 161, 250, 0.16);
  color: #fff;
}

.player-hotkey-hint {
  color: var(--muted);
  font-size: 12px;
}

.player-hotkey-hint kbd {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  font-family: Arial, sans-serif;
  font-size: 11px;
}

/* Sort Tabs & Spoiler Checkbox */

.comment-sort-tabs {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #0c1018;
}

.comment-sort-tab {
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}

.comment-sort-tab.is-active {
  background: #b9a1fa;
  color: #1f1433;
  font-weight: 700;
}

.comment-form-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.spoiler-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #f3a1ad;
  font-size: 13px;
  cursor: pointer;
}

/* Badges, Spoiler Blur, Likes & Replies */

.comment-item.is-pinned-comment {
  padding-left: 14px;
  border-left: 3px solid #b9a1fa;
  background: linear-gradient(90deg, rgba(185, 161, 250, 0.05), transparent 60%);
}

.comment-pinned-badge {
  padding: 2px 8px;
  border: 1px solid rgba(76, 230, 140, 0.35);
  border-radius: 5px;
  background: rgba(76, 230, 140, 0.1);
  color: #9be7b7;
  font-size: 11px;
}

.comment-spoiler-badge {
  padding: 2px 7px;
  border: 1px solid rgba(242, 107, 128, 0.4);
  border-radius: 5px;
  background: rgba(242, 107, 128, 0.12);
  color: #ff9caf;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.comment-body-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.comment-body.is-spoiler-blurred {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
}

.spoiler-reveal-btn {
  padding: 4px 10px;
  border: 1px solid rgba(242, 107, 128, 0.45);
  border-radius: 6px;
  background: rgba(24, 15, 22, 0.9);
  color: #ff9caf;
  font-size: 12px;
  cursor: pointer;
}

.comment-like-form,
.comment-pin-form {
  margin: 0;
  display: inline-flex;
}

.comment-like-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #929db3;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.comment-like-button:hover,
.comment-like-button.is-liked {
  border-color: rgba(238, 121, 151, 0.5);
  background: rgba(238, 121, 151, 0.14);
  color: #f38fab;
}

.comment-like-static {
  color: var(--muted);
  font-size: 12px;
}

.comment-reply-form {
  flex-basis: 100%;
  width: min(100%, 520px);
  margin-top: 8px;
}

.comment-replies {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
}

.comment-reply-item {
  padding: 12px 0 !important;
}

.comment-reply-avatar {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  font-size: 12px !important;
}

.header {
  z-index: 100 !important;
}

.player-stage,
video {
  position: relative;
  z-index: 1;
}

/* ==================================================
   Hero Smooth Skew Slide & Auto Trailer
   ================================================== */

.home-hero .hero-slider {
  overflow: visible !important;
  scroll-snap-type: none !important;
  will-change: transform;
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-slide .hero-layout,
.hero-slide .hero-poster,
.hero-slide .hero-copy {
  transition:
    transform 0.68s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.55s ease,
    filter 0.55s ease;
  transform-origin: center bottom;
}

/* เอฟเฟกต์เอียงลื่นๆ จากขวามาซ้ายตอนกดถัดไป */
.hero-slider.is-tilting-next .hero-slide.is-active .hero-layout {
  animation: heroSkewFromRight 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-slider.is-tilting-prev .hero-slide.is-active .hero-layout {
  animation: heroSkewFromLeft 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes heroSkewFromRight {
  0% {
    transform: translate3d(55px, 0, 0) skewX(-7deg) scale(0.97);
    opacity: 0.45;
  }
  55% {
    transform: translate3d(-6px, 0, 0) skewX(1.5deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 0, 0) skewX(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes heroSkewFromLeft {
  0% {
    transform: translate3d(-55px, 0, 0) skewX(7deg) scale(0.97);
    opacity: 0.45;
  }
  55% {
    transform: translate3d(6px, 0, 0) skewX(-1.5deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 0, 0) skewX(0deg) scale(1);
    opacity: 1;
  }
}

/* วิดีโอตัวอย่างบนแบนเนอร์ และการซ่อนโปสเตอร์แบบสมูท */
.hero-trailer-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
  background: #05070c;
}

.hero-trailer-video {
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  opacity: 0.85;
}

.hero-slide.is-playing-trailer .hero-poster {
  opacity: 0;
  transform: translate3d(35px, 0, 0) scale(0.9);
  pointer-events: none;
}

.hero-slide.is-playing-trailer .hero-background {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-slide.is-playing-trailer .hero-trailer-stage {
  opacity: 1;
}

/* ==================================================
   Season Badge (หน้าแรก & Explore The Library)
   ================================================== */

.season-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border: 1px solid rgba(185, 161, 250, 0.35);
  border-radius: 7px;
  background: rgba(185, 161, 250, 0.1);
  color: #dfd2ff;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

.card-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.card-status-row .anime-status {
  margin-top: 0 !important;
}

.season-badge-card {
  padding: 3px 8px;
  font-size: 12px;
}

/* ==================================================
   Lights-Off Fix (มืดทั้งเว็บยกเว้นวิดีโอ และไม่ทับเมนูเวลาเลื่อน)
   ================================================== */

.header {
  z-index: 100 !important;
}

/* ปกติให้อยู่ต่ำกว่า Header เวลาเลื่อนหน้าจอ */
.player-stage {
  position: relative;
  z-index: 1 !important;
}

.player-stage video {
  position: relative;
  z-index: 1;
}

/* เมื่อกดปิดไฟ ฉากมืดจะคลุมทั้งเว็บ รวมถึง Header ด้านบน */
.lights-off-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500 !important;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(5px);
}

/* ยกเฉพาะส่วนเครื่องเล่นวิดีโอและปุ่มควบคุมขึ้นมาเหนือฉากมืด */
.player-stage.is-lit {
  z-index: 510 !important;
}

.player-stage.is-lit video {
  z-index: 511 !important;
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.95);
}

/* ==================================================
   Multi-Season Selector Tabs
   ================================================== */

.season-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.season-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd2e1;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.season-tab-btn:hover {
  border-color: rgba(185, 161, 250, 0.55);
  background: rgba(185, 161, 250, 0.1);
  color: #fff;
  transform: translateY(-1px);
}

.season-tab-btn.is-active {
  border-color: #b9a1fa;
  background: rgba(185, 161, 250, 0.2);
  color: #efeaff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(185, 161, 250, 0.18);
}

.season-tab-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #b8a5db;
  font-size: 11px;
  font-weight: 400;
}

.season-tab-btn.is-active .season-tab-count {
  background: #b9a1fa;
  color: #1f1433;
  font-weight: 700;
}

/* ==================================================
   Fix Season Badge Font in Movie Detail & Slow Pulse Status
   ================================================== */

.season-badge,
.hero-meta > span.season-badge:last-child {
  font-family: var(--font) !important;
  font-size: 13px !important;
  letter-spacing: normal !important;
  color: #dfd2ff !important;
}

.season-badge-card {
  font-size: 12px !important;
}

/* เอฟเฟกต์กระพริบช้าๆ (Slow Breathing Pulse) สำหรับ จบแล้ว / ยังไม่จบ */
.anime-status.is-completed {
  animation: statusPulseCompleted 3.2s ease-in-out infinite;
}

.anime-status.is-ongoing {
  animation: statusPulseOngoing 3.2s ease-in-out infinite;
}

.anime-status.is-completed .anime-status-dot,
.search-suggestion-status.is-completed .search-suggestion-dot {
  animation: dotPulseCompleted 2.4s ease-in-out infinite;
}

.anime-status.is-ongoing .anime-status-dot,
.search-suggestion-status.is-ongoing .search-suggestion-dot {
  animation: dotPulseOngoing 2.4s ease-in-out infinite;
}

@keyframes statusPulseCompleted {
  0%, 100% {
    opacity: 1;
    border-color: rgba(71, 219, 138, 0.35);
    box-shadow: 0 0 0 rgba(76, 230, 140, 0);
  }
  50% {
    opacity: 0.72;
    border-color: rgba(71, 219, 138, 0.75);
    box-shadow: 0 0 12px rgba(76, 230, 140, 0.18);
  }
}

@keyframes statusPulseOngoing {
  0%, 100% {
    opacity: 1;
    border-color: rgba(240, 107, 126, 0.35);
    box-shadow: 0 0 0 rgba(242, 107, 128, 0);
  }
  50% {
    opacity: 0.72;
    border-color: rgba(240, 107, 126, 0.75);
    box-shadow: 0 0 12px rgba(242, 107, 128, 0.18);
  }
}

@keyframes dotPulseCompleted {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 6px #4ce68ccc, 0 0 14px #4ce68c80;
  }
  50% {
    opacity: 0.35;
    transform: scale(0.82);
    box-shadow: 0 0 2px #4ce68c40;
  }
}

@keyframes dotPulseOngoing {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 6px #f26b80cc, 0 0 14px #f26b8080;
  }
  50% {
    opacity: 0.35;
    transform: scale(0.82);
    box-shadow: 0 0 2px #f26b8040;
  }
}

/* ==================================================
   Friends, Watch Together, Feedback & Q&A Styles
   ================================================== */

.pro-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

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

.friend-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.friend-user-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.friend-user-meta small {
  margin-top: 2px;
}

/* Watch Together Room */

.watch-party-panel {
  border-color: rgba(185, 161, 250, 0.45);
  background: linear-gradient(145deg, rgba(185, 161, 250, 0.06), rgba(16, 20, 30, 0.95));
}

.watch-party-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 20px;
}

.watch-party-sidebar {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.25);
}

.party-member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.party-invite-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 170px;
  overflow-y: auto;
}

.party-invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
}

.watch-party-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.party-chat-box {
  height: 220px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #0a0d14;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.party-chat-line {
  font-size: 14px;
  line-height: 1.5;
}

.party-chat-line b {
  color: #cbb6ff;
  margin-right: 6px;
}

.party-chat-line small {
  display: inline;
  margin-left: 8px;
  font-size: 11px;
  opacity: 0.6;
}

.party-chat-form {
  display: flex;
  gap: 10px;
}

.party-chat-form input {
  flex: 1;
}

/* Footer Support Links & Q&A */

.footer-support-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: #cbb6ff;
}

.footer-support-links a:hover {
  text-decoration: underline;
}

.qa-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.qa-faq-card,
.qa-thread-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  margin-bottom: 14px;
}

@media (max-width: 850px) {
  .pro-grid-2,
  .watch-party-layout,
  .qa-faq-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   Watch Together Guest Sync Overlay
   ================================================== */

.video-wrapper-stage {
  position: relative;
  width: 100%;
}

.guest-wait-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 12px;
  background: rgba(9, 11, 18, 0.72);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.guest-wait-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 440px;
  padding: 18px 24px;
  border: 1px solid rgba(185, 161, 250, 0.45);
  border-radius: 14px;
  background: rgba(18, 23, 34, 0.92);
  text-align: center;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}

.guest-wait-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(185, 161, 250, 0.16);
  color: #cbb6ff;
  font-size: 18px;
}

.guest-wait-box b {
  color: #f1f2f8;
  font-size: 17px;
}

.guest-wait-box small {
  margin: 0;
  color: #929db3;
  font-size: 13px;
}

.guest-unmute-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 16;
  padding: 9px 16px;
  border: 1px solid #b9a1fa;
  border-radius: 999px;
  background: rgba(18, 23, 34, 0.92);
  color: #efeaff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.guest-unmute-btn:hover {
  background: #b9a1fa;
  color: #1f1433;
}

/* ==================================================
   Fix 2: ป้องกันปุ่มโปรไฟล์บนมือถือย่อเล็กหรือหายไป
   ================================================== */

.account {
  flex-shrink: 0;
}

.account-profile {
  flex-shrink: 0;
  min-height: 38px;
}

.account-profile .account-avatar {
  display: grid !important;
  place-items: center;
  flex: 0 0 32px !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  object-fit: cover;
}

.account-profile img.account-avatar {
  display: block !important;
}

@media (max-width: 750px) {
  .account-profile {
    padding: 3px !important;
    min-width: 38px;
    min-height: 38px;
    justify-content: center;
  }

  .account-profile .account-name {
    display: none !important;
  }
}

/* ==================================================
   Fix 3: แก้บั๊ก iOS Safari พื้นหลังแบนเนอร์สว่างวาบตอนเลื่อนสไลด์
   ================================================== */

.hero-slide {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.hero-background {
  opacity: 0.2;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  will-change: opacity;
}

.hero-background img {
  opacity: 1 !important;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0) scale(1.1);
  transform: translate3d(0, 0, 0) scale(1.1);
}

.hero-slide.is-playing-trailer .hero-background {
  opacity: 0 !important;
}

/* ==================================================
   Online / Offline Status Badge (ใช้เทมเพลตเดียวกับ จบแล้ว/ยังไม่จบ)
   ================================================== */

.user-name-with-status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.anime-status.is-compact {
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  gap: 6px;
}

.anime-status.is-compact .anime-status-dot {
  width: 6px;
  height: 6px;
}