@font-face {
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/epilogue-300-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/epilogue-300-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/epilogue-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/epilogue-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/epilogue-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/epilogue-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/epilogue-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Epilogue";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/epilogue-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #13272e;
  --panel: #14262e;
  --panel-bright: #1d3641;
  --text: #fdf0e2;
  --muted: #fdf0e2;
  --accent: #6cc5d8;
  --danger: #f76b6b;
  --bp-s: 600px;
  --bp-m: 900px;
  --bp-l: 1200px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Epilogue", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-width: 275px;
  display: flex;
  flex-direction: column;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 96px 24px 80px;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header {
  display: flex;
  flex-direction: column;
  gap: 36px;
  align-items: flex-start;
  text-align: left;
}

.title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.logo {
  height: 24px;
  width: auto;
}

.title {
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1;
  margin: 0.1em 0 -0.2em;
}

.description {
  margin: 0;
  font-weight: 300;
  line-height: 1.5;
  color: var(--muted);
  max-width: 720px;
}

.description.is-error {
  margin-top: 6px;
}

.helper {
  margin: 0;
  font-size: 0.9rem;
}

.video-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 24px;
}

.footer {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 48px;
  margin-top: auto;
}

.footer-text {
  margin: 0;
  color: rgba(194, 209, 216, 0.6);
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-text a {
  color: inherit;
}

.video-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
  box-shadow: 0 24px 60px -40px rgba(0, 0, 0, 0.9);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card.placeholder {
  cursor: default;
  box-shadow: none;
}

.video-card.placeholder .thumbnail {
  background: #0f1e24;
}

.placeholder-block {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

.video-card.placeholder .placeholder-block {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.title .placeholder-block {
  position: relative;
  display: block;
  width: 420px;
  max-width: 70vw;
  height: 1em;
  border-radius: 10px;
}

.video-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 1);
}

.thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
  overflow: hidden;
}

.thumbnail .player-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.video-card:hover img {
  transform: scale(1.02);
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .overlay {
  opacity: 1;
}

.play-button {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-ring {
  height: 62px;
  width: 62px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
  will-change: opacity, transform;
}

.video-card:hover .play-ring {
  opacity: 1;
  transform: scale(1);
}

.play-ring svg {
  height: 40px;
  width: 40px;
  fill: #ffffff;
  transform: translateX(1.75px);
}

.duration {
  display: none;
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 8px 10px;
  z-index: 2;
  font-family: "Epilogue", system-ui, sans-serif;
  background: rgba(255, 255, 255, 0.8);
  color: #0e1a1f;
  border-radius: 8px;
  font-size: 0.95rem;
}

.video-title {
  position: absolute;
  left: 16px;
  bottom: 12px;
  /* right: 77px; */
  right: 16px;
  z-index: 2;
  font-family: "Epilogue", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.3;
  color: #fdf0e2;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bottom-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.85));
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 10, 12, 0.7);
  backdrop-filter: blur(6px);
  z-index: 20;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
}

.modal-content {
  position: relative;
  background: var(--panel);
  border-radius: 20px;
  padding: 28px;
  width: min(100%, 980px);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.modal-title {
  margin: 0 0 20px;
  font-size: 1.4rem;
  font-weight: 600;
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  border: none;
  background: transparent;
  color: #fdf0e2;
  height: 36px;
  width: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.modal-close svg {
  height: 18px;
  width: 18px;
}

.player-shell {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
}

.player-shell stream,
.player-shell iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
  z-index: 30;
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 72px 20px 60px;
  }

  .modal-content {
    padding: 20px;
  }

  .video-title {
    right: 60px;
  }
}

@media (max-width: 900px) {
  .title {
    font-size: 3rem;
  }

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

@media (max-width: 600px) {
  .title {
    font-size: 2.6rem;
  }

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