/* © 2026 Eaglercraft Ranked. All rights reserved. Unauthorized copying or redistribution is prohibited. */
/* Official YouTube Trailer button on the home page (shown until Friday 2026-11-27 12:00 AM New York time, see index.html) */
.trailer-wrap { display: flex; justify-content: center; margin: 0 auto 16px; max-width: 100%; }
.trailer-wrap[hidden] { display: none; }
.trailer-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 280px;
  max-width: 100%;
  padding: 10px 20px 8px;
  background: #c41818;
  color: #ffffff;
  border: 2px solid #4a0606;
  box-shadow: inset -3px -3px 0 #8e0e0e, inset 3px 3px 0 #ff6a5e, 0 0 14px rgba(255, 36, 36, 0.32);
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  animation: trailer-glow 2.4s ease-in-out infinite;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.trailer-btn:hover { filter: brightness(1.1); }
.trailer-btn:active { transform: translateY(2px); box-shadow: inset -3px -3px 0 #8e0e0e; }
.trailer-btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
/* the same light sweep as Donate, a little quicker */
.trailer-btn::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: trailer-shine 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes trailer-shine {
  0%, 50% { left: -60%; }
  80%, 100% { left: 130%; }
}
@keyframes trailer-glow {
  0%, 100% { box-shadow: inset -3px -3px 0 #8e0e0e, inset 3px 3px 0 #ff6a5e, 0 0 10px rgba(255, 36, 36, 0.25); }
  50% { box-shadow: inset -3px -3px 0 #8e0e0e, inset 3px 3px 0 #ff6a5e, 0 0 20px rgba(255, 36, 36, 0.5); }
}
.trailer-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "Minecraft", "Plus Jakarta Sans", monospace;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-shadow: 2px 2px 0 #4a0606;
}
/* a white play triangle */
.trailer-play {
  width: 0;
  height: 0;
  border-left: 11px solid #ffffff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  filter: drop-shadow(2px 2px 0 #4a0606);
  flex-shrink: 0;
}
.trailer-sub {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.35;
  color: #d6d0d0;
  text-shadow: 1px 1px 0 rgba(40, 0, 0, 0.6);
  text-wrap: balance;
}
@media (prefers-reduced-motion: reduce) {
  .trailer-btn, .trailer-btn::after { animation: none; }
}
@media (max-width: 560px) {
  .trailer-btn { min-width: 0; padding: 9px 14px 7px; }
  .trailer-title { font-size: 0.98rem; gap: 8px; }
  .trailer-play { border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; }
  .trailer-sub { font-size: 0.66rem; }
}
