body {
  margin: 0;
  padding-top: 86px;
  background: #090e16;
  color: #f5f7fb;
}

.juan-video-page {
  padding: 36px 0 calc(88px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at top right, #10233d, transparent 65%);
}

.juan-library-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}

.juan-profile-column {
  position: sticky;
  top: 110px;
}

.video-profile {
  overflow: hidden;
  border: 1px solid #293b56;
  border-radius: 18px;
  background: #101823;
}

.video-profile .coach-media {
  position: relative;
  padding-bottom: 12px;
}

.video-profile .coach-img {
  display: block;
  width: 100%;
  height: 215px;
  object-fit: cover;
  object-position: center 25%;
}

.video-profile .rating-box {
  position: static;
  margin: 12px 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #1a2331;
}

.video-profile .rating-display {
  color: #fe951c;
  font-weight: 800;
}

.video-profile .vote-count {
  color: #b5c0d1;
  font-size: 0.8rem;
}

.video-profile .stars {
  display: flex;
  gap: 0;
}

.video-profile .stars button {
  min-width: 23px;
}

.video-profile .stars i {
  color: #aab7ca;
}

.video-profile .stars i.active {
  color: #fe951c;
}

.video-profile .coach-copy {
  padding: 0 18px 18px;
}

.video-profile .coach-kicker {
  color: #8cbfff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.video-profile h2 {
  margin: 6px 0;
  font-size: 1.8rem;
}

.video-profile .coach-role {
  margin: 0;
  color: #b5c0d1;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
}

.video-profile .coach-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.video-profile .coach-action {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #33445f;
  border-radius: 10px;
  color: #fff;
  background: #162c4e;
  font-size: 1.05rem;
}

.video-profile .coach-action-whatsapp {
  background: #126a3d;
}

.video-profile .coach-action-instagram {
  background: #92346c;
}

.video-profile .coach-action:hover {
  background: #0075ff;
}

.video-profile-info {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #293b56;
}

.video-profile-info h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.video-profile-info p {
  margin: 0 0 16px;
  color: #b5c0d1;
  font-size: 0.875rem;
  line-height: 1.6;
}

.video-back {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px;
  border-radius: 10px;
  color: #fff;
  background: #0075ff;
  font-weight: 700;
  text-decoration: none;
}

.video-back:hover {
  color: #fff;
  background: #005bd0;
}

.video-back-floating {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: calc(16px + env(safe-area-inset-left));
  z-index: 1030;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid #4986ce;
  border-radius: 9px;
  background: #12376b;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.video-back-floating:hover,
.video-back-floating:focus-visible {
  background: #1b4c8c;
  color: #fff;
}

.video-back-floating:focus-visible {
  outline: 2px solid #8ec5ff;
  outline-offset: 2px;
}

.juan-library-heading {
  margin-bottom: 24px;
}

.section-kicker {
  color: #8cbfff;
  font-size: 0.875rem;
  font-weight: 700;
}

.juan-library-heading h1 {
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.juan-video-section {
  scroll-margin-top: 110px;
}

.video-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.video-section-heading h2 {
  margin: 0;
  font-size: 1.7rem;
}

.video-access {
  color: #8cbfff;
  font-size: 0.875rem;
  font-weight: 700;
}

.juan-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.juan-video-card {
  overflow: hidden;
  border: 1px solid #293750;
  border-radius: 12px;
  background: #101823;
}

.juan-video-card[hidden] {
  display: none;
}

.juan-video-card > a {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.juan-video-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2.1 / 1;
}

.juan-video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: #0075ff;
  font-size: 1.2rem;
}

.juan-video-copy {
  padding: 10px 12px;
}

.juan-video-copy h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.juan-video-card:hover {
  border-color: #0075ff;
}

.video-show-more {
  display: block;
  min-height: 44px;
  margin: 8px auto 0;
  padding: 8px 20px;
  border: 0;
  border-radius: 8px;
  color: #8cbfff;
  background: transparent;
  font-weight: 700;
}

.video-show-more:hover {
  background: #16253b;
}

.premium-video-section {
  margin-top: 24px;
}

.coach-video-empty {
  padding: 32px 24px;
  border: 1px solid #293b56;
  border-radius: 14px;
  background: #101823;
}

.coach-video-empty > i {
  display: block;
  margin-bottom: 16px;
  color: #8cbfff;
  font-size: 2rem;
}

.coach-video-empty h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.coach-video-empty p {
  margin: 0;
  color: #b5c0d1;
  line-height: 1.6;
}

.premium-video-section .video-access {
  color: #ffb260;
}

.premium-extra {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid #395b89;
  border-radius: 16px;
  background: #101823;
  scroll-margin-top: 110px;
}

.premium-extra-cover {
  position: relative;
  background: #0a101a;
}

.premium-extra-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.premium-extra-cover > span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #7a4916;
  color: #ffe2b5;
  font-size: 0.75rem;
  font-weight: 800;
}

.premium-extra-copy {
  min-width: 0;
  padding: 20px;
  border-left: 3px solid #0075ff;
}

.premium-extra-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.premium-extra-meta span {
  padding: 4px 8px;
  border-radius: 6px;
  background: #263b59;
  color: #a8ceff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.premium-extra-meta span:first-child {
  background: #3b2c1c;
  color: #ffbc72;
}

.premium-extra-copy h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.premium-extra-copy p,
.premium-preview-body p {
  color: #b5c0d1;
  font-size: 1rem;
  line-height: 1.5;
}

.premium-extra-copy ul,
.premium-preview-body ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.premium-extra-copy li,
.premium-preview-body li {
  padding: 5px 9px;
  border: 1px solid #344052;
  border-radius: 20px;
  color: #b5c0d1;
  font-size: 0.8rem;
}

.premium-extra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.premium-extra-actions button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #4777ba;
  border-radius: 9px;
  background: #17365f;
  color: #e5f0ff;
  font-weight: 800;
}

.premium-extra-actions .premium-extra-locked {
  border-color: #775b34;
  background: #3e301e;
  color: #e5bb7a;
  cursor: not-allowed;
}

.premium-extra-copy .premium-plan-note {
  margin: 12px 0 0;
  font-size: 0.875rem;
}

.premium-preview-dialog {
  position: fixed;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: auto;
  border: 1px solid #395b89;
  border-radius: 18px;
  background: #101823;
  color: #f5f7fb;
}

.premium-preview-dialog::backdrop {
  background: rgba(0, 5, 14, 0.82);
  backdrop-filter: blur(6px);
}

body:has(.premium-preview-dialog[open]) {
  overflow: hidden;
}

.premium-preview-close {
  position: sticky;
  top: 12px;
  z-index: 1;
  display: block;
  width: 44px;
  height: 44px;
  margin: 12px 12px -56px auto;
  border: 1px solid #58708f;
  border-radius: 50%;
  background: #101823;
  color: #fff;
}

.premium-preview-banner {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
}

.premium-preview-body {
  padding: 24px;
}

.premium-preview-body h2 {
  margin: 0 0 12px;
  font-size: 1.8rem;
}

.premium-preview-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #775b34;
  border-radius: 12px;
  background: #30251a;
  color: #ffcc8a;
}

.premium-preview-notice p {
  margin: 8px 0 0;
}

.premium-extra-actions button:focus-visible,
.premium-preview-close:focus-visible {
  outline: 2px solid #fe951c;
  outline-offset: 3px;
}

.premium-coming-soon-page {
  padding: 48px 0 64px;
}

.premium-coming-soon-panel {
  max-width: 800px;
  margin: auto;
  padding: 32px;
  border: 1px solid #395b89;
  border-radius: 18px;
  background: #101823;
}

.premium-coming-soon-panel p {
  color: #b5c0d1;
  line-height: 1.6;
}

.premium-coming-soon-panel .video-back {
  margin-top: 24px;
}

.premium-video-empty {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 120px;
  padding: 20px;
  border: 1px solid #68492f;
  border-radius: 14px;
  background: linear-gradient(135deg, #332319, #151a24);
}

.premium-video-empty > i {
  color: #fe951c;
  font-size: 2rem;
}

.premium-video-empty h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.premium-video-empty p {
  margin: 0;
  color: #c5bbaf;
  font-size: 1rem;
  line-height: 1.5;
}

.juan-video-page a:focus-visible,
.video-show-more:focus-visible {
  outline: 2px solid #fe951c;
  outline-offset: -2px;
}

@media (max-width: 991px) {
  .juan-library-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 24px;
  }

  .juan-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 74px;
  }

  .juan-video-page {
    padding: 24px 0 40px;
  }

  .juan-library-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .juan-profile-column {
    position: static;
  }

  .video-profile {
    max-width: 420px;
    margin: auto;
  }

  .video-profile .coach-img {
    height: 230px;
  }

  .juan-video-grid {
    gap: 10px;
  }

  .premium-video-empty {
    padding: 18px;
  }

  .premium-extra {
    grid-template-columns: minmax(0, 1fr);
  }

  .premium-extra-cover img {
    height: 180px;
  }

  .premium-extra-copy {
    padding: 16px;
    border-top: 3px solid #0075ff;
    border-left: 0;
  }

  .premium-preview-body {
    padding: 18px;
  }

  .premium-coming-soon-panel {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
