/* ============================================
   FOOTBALL LEGENDS REEL — CINEMATIC STYLES
   YouTube Shorts Format: 9:16
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --red: #c8102e;
  --gold: #f5c518;
  --dark: #0a0a0a;
  --black: #000000;
  --white: #ffffff;
  --gray: #888888;
  --slide-duration: 3500ms;
  --transition-duration: 800ms;
}

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  font-family: 'Montserrat', sans-serif;
  overflow: hidden;
  cursor: default;
}

.hidden { display: none !important; }

/* ============================================
   INTRO SCREEN
   ============================================ */
.intro-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  overflow: hidden;
}

.intro-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(200,16,46,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(245,197,24,0.15) 0%, transparent 55%),
    linear-gradient(160deg, #0a0a0a 0%, #1a0a0a 50%, #0a0a0a 100%);
  animation: introBgPulse 4s ease-in-out infinite alternate;
}

@keyframes introBgPulse {
  from { filter: brightness(1); }
  to   { filter: brightness(1.15); }
}

.intro-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: particleFly linear infinite;
}

@keyframes particleFly {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 30px;
  animation: introFadeIn 1.2s ease forwards;
}

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

.intro-badge {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--gold);
  border: 1px solid rgba(245,197,24,0.4);
  padding: 6px 16px;
  border-radius: 2px;
  margin-bottom: 28px;
  text-transform: uppercase;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,197,24,0.3); }
  50%       { box-shadow: 0 0 0 8px rgba(245,197,24,0); }
}

.intro-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(72px, 18vw, 110px);
  line-height: 0.9;
  color: var(--white);
  letter-spacing: 4px;
  text-shadow:
    0 0 40px rgba(200,16,46,0.6),
    0 0 80px rgba(200,16,46,0.3),
    4px 4px 0 rgba(0,0,0,0.5);
  margin-bottom: 8px;
}

.intro-title span {
  color: var(--red);
  text-shadow:
    0 0 30px rgba(200,16,46,0.9),
    0 0 60px rgba(200,16,46,0.5),
    4px 4px 0 rgba(0,0,0,0.5);
}

.intro-sub {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 30px;
}

.intro-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 30px;
  animation: lineExpand 1.5s ease 0.8s both;
}

@keyframes lineExpand {
  from { width: 0; opacity: 0; }
  to   { width: 60px; opacity: 1; }
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 16px 36px;
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(200,16,46,0.5);
}

.play-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.play-btn:hover::before { transform: translateX(100%); }
.play-btn:hover {
  background: #e8102e;
  box-shadow: 0 0 50px rgba(200,16,46,0.8);
  transform: translateY(-2px);
}

.play-icon {
  font-size: 14px;
}

/* ============================================
   REEL CONTAINER — 9:16 ASPECT RATIO
   ============================================ */
.reel-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: min(100vw, calc(100vh * 9/16));
  max-height: min(100vh, calc(100vw * 16/9));
  overflow: hidden;
  background: #000;
}

/* CINEMATIC BARS */
.cinema-bar {
  position: fixed;
  left: 0; right: 0;
  height: 0;
  background: #000;
  z-index: 50;
  transition: height 0.6s ease;
}
.cinema-bar.top    { top: 0; }
.cinema-bar.bottom { bottom: 0; }
.reel-container.cinema-mode .cinema-bar { height: 40px; }

/* ============================================
   SLIDES
   ============================================ */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.slide.prev {
  z-index: 1;
}

/* SLIDE BACKGROUND */
.slide-bg {
  position: absolute;
  inset: -5%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.08);
  filter: brightness(0.75) saturate(1.2) contrast(1.05);
  transition: transform 6s ease, filter 1s ease;
}

.slide.active .slide-bg {
  transform: scale(1.0);
  animation: kenBurns 6s ease forwards;
}

@keyframes kenBurns {
  0%   { transform: scale(1.08) translateX(0px); }
  100% { transform: scale(1.0) translateX(-8px); }
}

/* SLIDE OVERLAY — cinematic color grade */
.slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.15) 0%,
      rgba(0,0,0,0.0) 30%,
      rgba(0,0,0,0.0) 55%,
      rgba(0,0,0,0.7) 80%,
      rgba(0,0,0,0.92) 100%
    );
  z-index: 1;
}

/* VIGNETTE */
.slide-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.65) 100%);
  z-index: 2;
}

/* LENS FLARE */
.slide-flare {
  position: absolute;
  top: 15%;
  right: 10%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,220,100,0.25) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  animation: none;
}

.slide.active .slide-flare {
  animation: flareAppear 1.5s ease 0.5s forwards;
}

@keyframes flareAppear {
  0%   { opacity: 0; transform: scale(0.5); }
  50%  { opacity: 1; }
  100% { opacity: 0.6; transform: scale(1.2); }
}

/* SLIDE CONTENT */
.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 28px 90px;
  z-index: 10;
  transform: translateY(20px);
  opacity: 0;
  transition: none;
}

.slide.active .slide-content {
  animation: contentSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

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

.slide-tag {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--gold);
}

.slide-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(42px, 11vw, 64px);
  line-height: 0.95;
  color: var(--white);
  letter-spacing: 3px;
  text-shadow:
    2px 2px 0 rgba(0,0,0,0.8),
    0 0 30px rgba(200,16,46,0.4);
  margin-bottom: 12px;
}

.slide-quote {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.65);
  letter-spacing: 1px;
  line-height: 1.5;
}

.slide-number {
  position: absolute;
  top: 30px;
  right: 28px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 80px;
  color: rgba(255,255,255,0.06);
  line-height: 1;
  letter-spacing: 2px;
  pointer-events: none;
  user-select: none;
}

/* ============================================
   SLIDE TRANSITIONS
   ============================================ */

/* FADE */
.slide.transition-fade-out {
  animation: fadeOut var(--transition-duration) ease forwards;
  z-index: 3;
}
.slide.transition-fade-in {
  animation: fadeIn var(--transition-duration) ease forwards;
  z-index: 4;
}
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }

/* SLIDE LEFT */
.slide.transition-slide-out {
  animation: slideOutLeft var(--transition-duration) cubic-bezier(0.77,0,0.18,1) forwards;
  z-index: 3;
}
.slide.transition-slide-in {
  animation: slideInRight var(--transition-duration) cubic-bezier(0.77,0,0.18,1) forwards;
  z-index: 4;
}
@keyframes slideOutLeft  { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes slideInRight  { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* ZOOM BLUR */
.slide.transition-zoom-out {
  animation: zoomBlurOut var(--transition-duration) ease forwards;
  z-index: 3;
}
.slide.transition-zoom-in {
  animation: zoomBlurIn var(--transition-duration) ease forwards;
  z-index: 4;
}
@keyframes zoomBlurOut { from { transform: scale(1); opacity: 1; filter: blur(0); } to { transform: scale(1.15); opacity: 0; filter: blur(8px); } }
@keyframes zoomBlurIn  { from { transform: scale(0.9); opacity: 0; filter: blur(8px); } to { transform: scale(1); opacity: 1; filter: blur(0); } }

/* FLASH */
.flash-overlay {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
}
.flash-overlay.flash {
  animation: flashAnim 0.4s ease forwards;
}
@keyframes flashAnim {
  0%   { opacity: 0.9; }
  100% { opacity: 0; }
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.1);
  z-index: 20;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  width: 0%;
  transition: width linear;
  box-shadow: 0 0 8px rgba(245,197,24,0.6);
}

/* ============================================
   CONTROLS
   ============================================ */
.controls {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 30;
}

.ctrl-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.ctrl-btn:hover {
  background: rgba(200,16,46,0.7);
  border-color: var(--red);
  transform: scale(1.1);
}

.pause-btn {
  width: 48px;
  height: 48px;
  font-size: 12px;
  background: rgba(200,16,46,0.6);
  border-color: var(--red);
}

/* ============================================
   DOTS
   ============================================ */
.dots {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--gold);
  transform: scale(1.4);
  box-shadow: 0 0 6px var(--gold);
}

/* ============================================
   SLIDE COUNTER
   ============================================ */
.slide-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 2px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
}

#current-slide {
  color: var(--gold);
  font-size: 18px;
}

.counter-sep {
  color: rgba(255,255,255,0.3);
  margin: 0 2px;
}

/* ============================================
   WATERMARK
   ============================================ */
.watermark {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  z-index: 30;
}

/* ============================================
   OUTRO SCREEN
   ============================================ */
.outro-screen {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #0d0000 0%, #1a0505 40%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  animation: outroFadeIn 1s ease forwards;
}

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

.outro-content {
  text-align: center;
  padding: 40px 30px;
  animation: outroContentIn 1s ease 0.3s both;
}

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

.outro-icon {
  font-size: 56px;
  margin-bottom: 20px;
  animation: outroBounce 1s ease 0.8s both;
}

@keyframes outroBounce {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.outro-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(56px, 14vw, 80px);
  line-height: 0.9;
  color: var(--white);
  letter-spacing: 4px;
  text-shadow:
    0 0 40px rgba(200,16,46,0.7),
    0 0 80px rgba(200,16,46,0.3);
  margin-bottom: 16px;
}

.outro-sub {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 32px;
}

.outro-actions {
  margin-bottom: 24px;
}

.outro-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 12px 28px;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.outro-btn:hover {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 20px rgba(200,16,46,0.5);
}

.outro-tags {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
}

/* ============================================
   FILM GRAIN OVERLAY
   ============================================ */
.reel-container::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 60;
  opacity: 0.4;
  mix-blend-mode: overlay;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  .slide-title { font-size: 48px; }
  .intro-title { font-size: 80px; }
  .ctrl-btn { width: 36px; height: 36px; font-size: 14px; }
  .pause-btn { width: 44px; height: 44px; }
}

/* ============================================
   SCROLLBAR HIDE
   ============================================ */
::-webkit-scrollbar { display: none; }