:root {
  color-scheme: dark;
  --ax-bg: #050506;
  --ax-panel: #101116;
  --ax-panel-soft: #15161c;
  --ax-line: rgba(218, 178, 55, .22);
  --ax-line-strong: rgba(246, 220, 114, .58);
  --ax-gold: #d6aa2f;
  --ax-gold-soft: #f4dc78;
  --ax-text: #f7f0df;
  --ax-muted: #bdb4a4;
  --ax-green: #58d98b;
  --ax-red: #ff7474;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--ax-bg);
  color: var(--ax-text);
  font-family: "Heebo", "Assistant", "Noto Sans Hebrew", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

.academyx {
  min-height: 100vh;
  padding: 18px;
  background:
    radial-gradient(circle at 82% 8%, rgba(214, 170, 47, .16), transparent 22rem),
    radial-gradient(circle at 10% 88%, rgba(246, 220, 114, .08), transparent 18rem),
    linear-gradient(180deg, #050506, #090a0d 46%, #050506);
}

.academyx-shell {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 18px;
  width: min(100%, 1540px);
  min-height: calc(100vh - 36px);
  margin: 0 auto;
}

.academyx-rail,
.academyx-stage {
  border: 1px solid var(--ax-line);
  background: linear-gradient(145deg, rgba(18, 19, 24, .96), rgba(7, 8, 11, .98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
}

.academyx-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
}

.academyx-brand {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.academyx-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 15px;
  background: radial-gradient(circle, rgba(246, 220, 114, .16), rgba(255, 255, 255, .02));
}

.academyx-brand strong,
.academyx-topbar h1 {
  display: block;
  margin: 0;
  color: var(--ax-text);
  line-height: 1.08;
}

.academyx-brand strong {
  font-size: 22px;
}

.academyx-brand span,
.academyx-topbar span,
.academyx-progress span,
.academyx-lessons p,
.academyx-lesson-note span {
  color: var(--ax-gold-soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.academyx-levels {
  display: grid;
  gap: 8px;
}

.academyx-levels a,
.academyx-lessons a,
.academyx-actions a,
.academyx-actions button {
  border: 1px solid var(--ax-line);
  color: var(--ax-text);
  text-decoration: none;
  background: rgba(255, 255, 255, .035);
}

.academyx-levels a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
}

.academyx-levels a small {
  color: var(--ax-muted);
  font-size: 12px;
}

.academyx-levels a.is-active,
.academyx-lessons a.is-active {
  border-color: var(--ax-line-strong);
  background: linear-gradient(90deg, rgba(214, 170, 47, .20), rgba(255, 255, 255, .035));
}

.academyx-levels a.is-locked,
.academyx-lessons a.is-locked {
  opacity: .58;
}

.academyx-progress {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
}

.academyx-progress div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.academyx-progress strong {
  color: var(--ax-gold-soft);
}

.academyx-progress i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}

.academyx-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9e7419, var(--ax-gold-soft));
}

.academyx-lessons {
  display: grid;
  gap: 8px;
}

.academyx-lessons p {
  display: flex;
  justify-content: space-between;
  margin: 0 2px 4px;
}

.academyx-lessons p span {
  color: var(--ax-muted);
  font-weight: 700;
}

.academyx-lessons a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
  border-radius: 14px;
}

.academyx-lessons i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(214, 170, 47, .14);
  color: var(--ax-gold-soft);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.academyx-lessons a.is-done i {
  color: var(--ax-green);
}

.academyx-lessons b,
.academyx-lessons small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academyx-lessons b {
  font-size: 13px;
}

.academyx-lessons small {
  margin-top: 2px;
  color: var(--ax-muted);
  direction: ltr;
  text-align: right;
  font-size: 10px;
}

.academyx-stage {
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding: 18px;
  border-radius: 24px;
}

.academyx-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 70px;
  padding: 0 4px 8px;
}

.academyx-topbar h1 {
  margin-top: 6px;
  font-size: 34px;
}

.academyx-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.academyx-status span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--ax-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--ax-gold-soft);
}

.academyx-player {
  display: grid;
  gap: 10px;
  justify-self: center;
  width: min(100%, 920px);
}

.academyx-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--ax-line-strong);
  border-radius: 22px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .50), 0 0 48px rgba(214, 170, 47, .10);
  animation: academyxVideoIn .72s ease both;
}

.academyx-video-mount {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.academyx-video-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .58;
}

.academyx-video-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .80)),
    radial-gradient(circle at 32% 58%, rgba(246, 220, 114, .15), transparent 18rem),
    radial-gradient(circle at 68% 42%, rgba(214, 170, 47, .18), transparent 20rem),
    linear-gradient(135deg, #030303, #111216 46%, #050505);
}

.academyx-video-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, .82));
  pointer-events: none;
}

.academyx-video-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  place-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(246, 220, 114, .16), transparent 11rem),
    linear-gradient(135deg, #030303, #111216 46%, #050505);
}

.academyx-video-frame iframe,
.academyx-video-frame video {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.academyx-video-cover {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 22px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(246, 220, 114, .18), transparent 12rem),
    linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .58));
  pointer-events: none;
}

.academyx-video-cover__pulse {
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 1px solid rgba(246, 220, 114, .20);
  box-shadow: 0 0 48px rgba(246, 220, 114, .14);
  animation: academyxPulse 1.9s ease-in-out infinite;
}

.academyx-video-play {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(255, 239, 170, .66);
  border-radius: 50%;
  background: linear-gradient(135deg, #9e7419, var(--ax-gold-soft), #b9861b);
  box-shadow: 0 18px 50px rgba(214, 170, 47, .30), inset 0 1px rgba(255, 255, 255, .34);
  cursor: pointer;
  pointer-events: auto;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.academyx-video-play:hover {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.08);
  box-shadow: 0 22px 60px rgba(214, 170, 47, .38), inset 0 1px rgba(255, 255, 255, .40);
}

.academyx-video-play span {
  width: 30px;
  height: 34px;
  margin-inline-start: 5px;
  background: #070707;
  clip-path: polygon(0 0, 0 100%, 100% 50%);
}

.academyx-video-cover strong,
.academyx-video-cover small {
  position: relative;
  z-index: 2;
  display: block;
}

.academyx-video-cover strong {
  color: var(--ax-gold-soft);
  font-size: 18px;
  letter-spacing: .02em;
}

.academyx-video-cover small {
  max-width: 540px;
  color: #e6dcc2;
  line-height: 1.65;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .72);
}

.academyx-video-frame.is-video-ready .academyx-video-cover small {
  color: #dff8e6;
}

.academyx-video-frame.has-video-error .academyx-video-cover small {
  color: #ffd0cc;
}

.academyx-video-frame.has-video-error .academyx-video-play {
  background: linear-gradient(135deg, #7d2727, #ffb3a8);
}

.academyx-video-fallback {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(260px, 1fr);
  gap: 20px;
  align-items: center;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .86), rgba(12, 12, 12, .70)),
    radial-gradient(circle at 72% 42%, rgba(246, 220, 114, .16), transparent 18rem);
  backdrop-filter: blur(3px);
}

.academyx-video-fallback img {
  position: static;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  opacity: .86;
  border: 1px solid rgba(246, 220, 114, .28);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .38);
}

.academyx-video-fallback strong,
.academyx-video-fallback small,
.academyx-video-fallback a {
  display: block;
}

.academyx-video-fallback strong {
  color: var(--ax-gold-soft);
  font-size: 22px;
  line-height: 1.25;
}

.academyx-video-fallback small {
  max-width: 440px;
  margin-top: 8px;
  color: #dfd4bd;
  line-height: 1.7;
}

.academyx-video-fallback a {
  width: fit-content;
  min-width: 150px;
  margin-top: 16px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #9e7419, var(--ax-gold-soft), #b9861b);
  color: #070707;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(214, 170, 47, .22);
}

.academyx-video-frame.has-video::after,
.academyx-video-frame.has-empty-video::after {
  opacity: 0;
}

.academyx-video-empty strong,
.academyx-video-empty small {
  display: block;
}

.academyx-video-empty strong {
  color: var(--ax-gold-soft);
  font-size: 20px;
}

.academyx-video-empty small {
  max-width: 420px;
  color: var(--ax-muted);
  line-height: 1.6;
}

.academyx-video-error {
  position: absolute;
  inset-inline: 18px;
  inset-block-end: 18px;
  z-index: 6;
  padding: 10px 12px;
  border: 1px solid rgba(255, 116, 116, .36);
  border-radius: 12px;
  background: rgba(40, 8, 8, .88);
  color: #ffd0cc;
  font-size: 13px;
}

.academyx-lesson-note {
  display: flex;
  justify-self: center;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  width: min(100%, 920px);
  min-height: 74px;
  padding: 11px 13px;
  border: 1px solid rgba(246, 220, 114, .20);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .052), rgba(214, 170, 47, .052)),
    rgba(9, 10, 13, .90);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  animation: academyxSoftRise .64s ease .08s both;
}

.academyx-lesson-note div {
  min-width: 0;
}

.academyx-lesson-note p {
  max-width: 760px;
  margin: 5px 0 0;
  color: #d7cebe;
  line-height: 1.55;
  font-size: 14px;
}

.academyx-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
}

.academyx-actions a,
.academyx-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.academyx-actions a:hover,
.academyx-actions button:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 220, 114, .50);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

.academyx-actions button:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
  box-shadow: none;
}

.academyx-actions .is-primary,
.academyx-actions button {
  border-color: transparent;
  background: linear-gradient(135deg, #9e7419, var(--ax-gold-soft), #b9861b);
  color: #070707;
}

@keyframes academyxVideoIn {
  from {
    opacity: .72;
    transform: translateY(8px) scale(.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes academyxPulse {
  0% {
    transform: scale(.86);
    opacity: .38;
  }
  55% {
    transform: scale(1.12);
    opacity: .12;
  }
  100% {
    transform: scale(.86);
    opacity: .38;
  }
}

@media (max-width: 1040px) {
  .academyx-shell {
    grid-template-columns: 1fr;
  }

  .academyx-rail {
    position: static;
  }

  .academyx-video-frame {
    min-height: 320px;
  }

  .academyx-lesson-note {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .academyx {
    padding: 8px;
  }

  .academyx-stage,
  .academyx-rail {
    padding: 12px;
    border-radius: 16px;
  }

  .academyx-topbar,
  .academyx-status {
    display: grid;
    justify-content: stretch;
  }

  .academyx-topbar h1 {
    font-size: 25px;
  }

  .academyx-video-frame {
    min-height: 220px;
    border-radius: 16px;
  }

  .academyx-video-play {
    width: 70px;
    height: 70px;
  }

  .academyx-video-play span {
    width: 24px;
    height: 28px;
  }

  .academyx-video-fallback {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .academyx-video-fallback strong {
    font-size: 18px;
  }

  .academyx-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .academyx-actions a,
  .academyx-actions button {
    min-width: 0;
  }
}
