@import url('https://fonts.googleapis.com/css2?family=Goldman:wght@400;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Goldman, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: #eee;
  background: black;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
}

main {
  margin: 0 auto;
  padding: 56px 24px 72px;
}

h1 {
  display: block;
  margin: 0 0 12px;
  font-weight: 600;
  font-size: 7vw;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

h2 {
  font-size: 4vw;
  text-align: center;
  margin-bottom: 32px;
  text-transform: uppercase;
}

footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.9rem;
  color: #aaa;
}

footer a {
  color: #eee;
  text-decoration: none;
}

.intro {
  margin-bottom: 40px;
  font-size: 1.5rem;
  line-height: 1.6;
  text-align: center;
}

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

.video-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-card:hover .video-thumb,
.video-card:focus-within .video-thumb {
  animation: thumbShake 0.2s ease-in-out;
  box-shadow: 0 0 24px #eee3;
}

.video-card:hover .video-thumb img,
.video-card:focus-within .video-thumb img {
  transform: scale(1);
}

.video-card:hover,
.video-card:focus-within {
  border: 2px solid #eee;
  animation: borderFade 0.9s ease forwards;
  transform: scale(1.1);
  z-index: 3;
}

.video-card.is-hidden {
  display: none;
}

.video-card.is-revealed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  animation: videoFlash 0.35s ease-out;
  z-index: 2;
}

.confetti-burst {
  position: fixed;
  pointer-events: none;
  overflow: visible;
  z-index: 60;
  transform: translateZ(0);
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 18px;
  border-radius: 2px;
  background: var(--color, #fff);
  opacity: 0;
  transform: translate(0, 0) rotate(var(--rotation, 0deg));
  animation: confettiFly var(--duration, 1.6s) linear var(--delay, 0s) forwards;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
}

.video-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-toggle {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.video-toggle:hover {
  transform: scale(1.04);
  background: rgba(0, 0, 0, 0.6);
}

.video-frame.is-playing .video-toggle {
  opacity: 0;
  pointer-events: none;
}

.video-frame.is-playing:hover .video-toggle,
.video-frame.is-playing:focus-within .video-toggle {
  opacity: 1;
  pointer-events: auto;
}

.video-toggle::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 6px;
}

.video-toggle.is-playing::before {
  width: 18px;
  height: 24px;
  border: 0;
  margin-left: 0;
  background:
    linear-gradient(90deg, #fff 0 40%, transparent 40% 60%, #fff 60% 100%);
}

.video-toggle:focus-visible {
  outline: 3px solid #1d1a14;
  outline-offset: 2px;
}

.video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: #000;
  cursor: pointer;
  display: block;
  z-index: 1;
  transform-origin: center;
  transition: transform 0.2s ease;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform 0.2s ease;
}

.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.55));
}

.video-play span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.video-play span::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 10px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.video-thumb:focus-visible {
  outline: 3px solid #1d1a14;
  outline-offset: 2px;
}

.video-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.video-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.video-modal__dialog {
  position: relative;
  display: inline-block;
}

.video-modal__frame {
  position: relative;
  width: min(1280px, 92vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  border: 3px solid #e100ff;
}

.video-modal__frame.is-vertical {
  width: min(45vh, 92vw);
  aspect-ratio: 9 / 16;
}

.video-modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal__close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  z-index: 3;
}

.video-modal__close::before,
.video-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #fff;
  transform-origin: center;
}

.video-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.video-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.video-modal__close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.load-more-wrap.is-hidden {
  display: none;
}

.load-more-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a130a;
  background: linear-gradient(135deg, #ffd2ea, #f4c4ff);
  box-shadow: 0 16px 30px rgba(45, 8, 52, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(45, 8, 52, 0.3);
}

.load-more-btn:focus-visible {
  outline: 3px solid #1d1a14;
  outline-offset: 3px;
}

@keyframes videoFlash {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes confettiFly {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(var(--rotation, 0deg));
    animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1);
  }
  12% {
    opacity: 1;
  }
  45% {
    opacity: 1;
    transform: translate(var(--dx-up, 0px), var(--dy-up, -120px))
      rotate(calc(var(--rotation, 0deg) + 120deg));
    animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1);
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 0px), var(--dy, 0px))
      rotate(calc(var(--rotation, 0deg) + 220deg));
  }
}

@keyframes thumbShake {
  0% {
    transform: scale(1.02) translateX(0);
  }
  25% {
    transform: scale(1.02) translateX(-2px) rotate(-1.6deg) translateY(-5px);
  }
  50% {
    transform: scale(1.02) translateX(2px) rotate(1.6deg) translateY(-5px);
  }
  75% {
    transform: scale(1.02) translateX(-1px) rotate(-1.4deg) translateY(-5px);
  }
  100% {
    transform: scale(1.02) translateX(0);
  }
}

@keyframes borderFade {
  0% {
    border-color: #eee;
  }
  100% {
    border-color: #000;
  }
}

@media (max-width: 1100px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  main {
    padding: 40px 16px 56px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}
