.video-page,
.profile-page {
  width: min(1720px, calc(100% - clamp(40px, 5vw, 160px)));
  margin: auto;
}
.video-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}
.video-hero h1,
.profile-panel h1 {
  margin-bottom: 12px;
}
.video-hero p:not(.eyebrow),
.form-lead,
.field-note,
.video-status {
  color: var(--muted);
}
.video-section {
  padding: 72px 0 105px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.video-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  background: #000;
}
.video-card-body {
  padding: 18px;
}
.video-card h3 {
  margin: 0 0 7px;
  font-size: 1rem;
  line-height: 1.5;
}
.video-card h3 a {
  text-decoration: none;
}
.video-card h3 a:hover {
  color: var(--accent-light);
}
.video-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.video-status {
  grid-column: 1/-1;
}
.profile-page {
  padding: 64px 0 110px;
}
.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  text-decoration: none;
}
.profile-panel {
  max-width: 760px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.profile-panel h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}
.profile-panel form {
  display: grid;
  gap: 22px;
  margin-top: 32px;
}
.profile-panel label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}
.profile-panel input,
.profile-panel textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--page);
  font: inherit;
  resize: vertical;
}
.profile-panel input:focus,
.profile-panel textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.field-note {
  margin: -12px 0 0;
  font-size: 0.84rem;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.form-actions button {
  border: 0;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.form-actions .error {
  color: #ff8c96;
}
@media (max-width: 900px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .video-hero {
    padding: 58px 0;
    align-items: flex-start;
    flex-direction: column;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
  .profile-panel {
    padding: 24px;
  }
  .video-section {
    padding-top: 56px;
  }
}

.channel-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent-light);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}
.creator-card {
  display: flex;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.creator-card > img {
  width: 38%;
  min-width: 120px;
  object-fit: cover;
}
.creator-card-body {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 22px;
}
.creator-card-body h3 {
  margin-bottom: 8px;
}
.creator-card-body p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.88rem;
}
.creator-card-body .button {
  min-height: 40px;
  margin-top: auto;
  padding: 8px 12px;
  font-size: 0.8rem;
}
@media (max-width: 900px) {
  .creator-card {
    flex-direction: column;
  }
  .creator-card > img {
    width: 100%;
    height: 160px;
  }
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 42px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 95, 109, 0.28);
}
.danger-zone h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.danger-zone p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.danger-button {
  flex: 0 0 auto;
  padding: 11px 15px;
  color: #ff9ba4;
  border: 1px solid rgba(255, 95, 109, 0.55);
  border-radius: 9px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.danger-button:hover {
  color: #fff;
  background: #c43b49;
}
.danger-button:disabled {
  cursor: wait;
  opacity: 0.55;
}
@media (max-width: 620px) {
  .danger-zone {
    align-items: stretch;
    flex-direction: column;
  }
  .danger-button {
    width: 100%;
  }
}

.popular-videos {
  border-bottom: 1px solid var(--line);
}
.video-section .section-heading > p:last-child {
  color: var(--muted);
}

.profile-completion {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 166, 91, 0.38);
  border-radius: 999px;
  color: #ffd09b;
  background: rgba(255, 166, 91, 0.1);
  font-size: 0.82rem;
  font-weight: 800;
}
.profile-completion.is-complete {
  color: #9ee8cc;
  border-color: rgba(69, 211, 154, 0.35);
  background: rgba(69, 211, 154, 0.1);
}
body[data-theme="light"] .profile-completion {
  color: #9b5715;
}
body[data-theme="light"] .profile-completion.is-complete {
  color: #116b4d;
}
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page);
}
.profile-avatar-row img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-soft);
}
.profile-avatar-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.profile-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.member-listing-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(116, 130, 255, 0.34);
  border-radius: 12px;
  background: rgba(116, 130, 255, 0.07);
}
.member-listing-option > input {
  width: 21px !important;
  height: 21px;
  margin-top: 3px;
  flex: 0 0 auto;
}
.member-listing-option span,
.member-listing-option small {
  display: block;
}
.member-listing-option small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.55;
}
@media (max-width: 650px) {
  .profile-link-grid {
    grid-template-columns: 1fr;
  }
}
.profile-ranking-option {
  display: flex !important;
  align-items: center;
  grid-template-columns: none !important;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--page);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}
.profile-ranking-group {
  min-width: 0;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}
.profile-ranking-group legend {
  margin-bottom: 4px;
  font-weight: 900;
}
.ranking-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.profile-ranking-option:hover {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
  transform: translateY(-1px);
}
.profile-ranking-option:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.profile-ranking-option > input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.ranking-option-copy {
  display: block;
  min-width: 0;
  flex: 1;
}
.ranking-option-copy strong,
.ranking-option-copy small {
  display: block;
}
.ranking-option-copy strong {
  color: var(--text);
  font-size: 0.95rem;
}
.ranking-option-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.6;
}
.ranking-option-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.ranking-option-switch > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
.profile-ranking-option > input:checked ~ .ranking-option-switch {
  border-color: var(--accent);
  background: var(--accent);
}
.profile-ranking-option > input:checked ~ .ranking-option-switch > span {
  transform: translateX(20px);
}
.profile-ranking-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, var(--page));
}
@media (max-width: 650px) {
  .ranking-option-grid {
    grid-template-columns: 1fr;
  }
  .profile-ranking-option {
    align-items: flex-start;
    padding: 16px;
  }
  .ranking-option-switch {
    margin-top: 1px;
  }
  .profile-link-grid {
    grid-template-columns: 1fr;
  }
}
.profile-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2000;
  padding: 14px 18px;
  border: 1px solid rgba(69, 211, 154, 0.38);
  border-radius: 12px;
  color: #eafff7;
  background: rgba(18, 91, 68, 0.96);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
  font-size: 0.92rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.profile-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.profile-toast[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  .profile-toast {
    right: 14px;
    bottom: 14px;
    left: 14px;
    text-align: center;
  }
}
