@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
@import url('shared.css');

.back-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.back-link:hover {
  background: rgba(0, 0, 0, 0.8);
}

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

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

::selection {
  color: #fff;
  background: hsl(349deg, 100%, 74%);
}

h1,
h2,
h3,
h4,
h5 p {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  align-self: center;
}

a, a:hover {
  text-decoration: none;
}

.flow-content > * + * {
  margin-top: 2rem;
}

li {
  list-style-type: none;
}

body {
  font-family: Bahnschrift, "DIN Alternate", "Franklin Gothic Medium", "Nimbus Sans Narrow", sans-serif-condensed, sans-serif;
  min-height: 100vh;
  display: grid;
  position: relative;
}

/* CRT Scanlines overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 100;
}

/* Subtle screen flicker */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
  z-index: 99;
  animation: flicker 0.1s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.98; }
}
@media (min-width: 600px) {
  body {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }
}

p {
  font-size: 1rem;
  max-width: 43ch;
  justify-self: center;
  line-height: 1.6;
}

/* Small caps style for subtitles */
section:nth-child(2) p:first-child,
section:nth-child(3) p:first-child {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}

h1 {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.4;
  letter-spacing: 0.05em;
}

button {
  cursor: pointer;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  justify-self: center;
  transition: all 200ms ease-in-out;
  position: relative;
  z-index: 10;
}
button.btn-dark {
  background: #8C0264;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 0 20px rgba(140, 2, 100, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.1);
}
button.btn-dark:hover {
  background: #fff;
  color: #8C0264;
  border: 3px solid #8C0264;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 60px rgba(140, 2, 100, 0.6);
  transform: scale(1.05);
  animation: shake 0.3s ease-in-out;
}
button.btn-light {
  background: #F7E49C;
  color: #212529;
  border: 3px solid #212529;
  box-shadow: 0 0 20px rgba(247, 228, 156, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.3);
}
button.btn-light:hover {
  background: #fff;
  color: #212529;
  border: 3px solid #212529;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 60px rgba(247, 228, 156, 0.8);
  transform: scale(1.05);
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: scale(1.05) translateX(0); }
  25% { transform: scale(1.05) translateX(-4px); }
  75% { transform: scale(1.05) translateX(4px); }
}

section {
  text-align: center;
}
section:nth-child(2), section:nth-child(3) {
  font-weight: 300 !important;
  color: #F2F2F2;
  display: grid;
  place-content: center;
  position: relative;
  padding: 1rem 0;
}
@media (min-width: 600px) {
  section:nth-child(2), section:nth-child(3) {
    padding: 0;
  }
}
section:nth-child(2):before, section:nth-child(2):after, section:nth-child(3):before, section:nth-child(3):after {
  font-family: "Font Awesome 6 Duotone";
  font-weight: 900;
  position: absolute;
  display: grid;
  place-content: center;
  font-size: 14vmin;
  width: 10vmin;
  height: 10vmin;
  top: calc(50% - 5vmin);
}
section:nth-child(2):before, section:nth-child(3):before {
  --fa-primary-color: black;
  color: var(--fa-primary-color, inherit);
  opacity: var(--fa-primary-opacity, 1);
  box-shadow: 0px 0px 0px 25px transparent;
}
@media (min-width: 600px) {
  section:nth-child(2):before, section:nth-child(3):before {
    content: "\f434";
  }
}
section:nth-child(2):after, section:nth-child(3):after {
  --fa-secondary-color: orange;
  color: var(--fa-secondary-color, inherit);
  opacity: var(--fa-secondary-opacity, 1);
}
@media (min-width: 600px) {
  section:nth-child(2):after, section:nth-child(3):after {
    content: "\f434\f434";
  }
}
section:nth-child(2) {
  background: #8C0264;
  animation: fireGlow 1.5s ease-in-out infinite alternate;
}

/* HE'S ON FIRE! glow effect using box-shadow */
@keyframes fireGlow {
  0% {
    box-shadow: inset 0 0 60px rgba(255, 100, 0, 0.3), inset 0 0 120px rgba(255, 50, 0, 0.15);
  }
  100% {
    box-shadow: inset 0 0 100px rgba(255, 150, 0, 0.5), inset 0 0 200px rgba(255, 80, 0, 0.25);
  }
}

/* Animated embers */
section:nth-child(2) h1 {
  text-shadow: 
    0 0 10px rgba(255, 100, 0, 0.8),
    0 0 20px rgba(255, 50, 0, 0.6),
    0 0 40px rgba(255, 0, 0, 0.4);
  animation: fireText 0.5s ease-in-out infinite alternate;
}

@keyframes fireText {
  0% {
    text-shadow: 
      0 0 10px rgba(255, 100, 0, 0.8),
      0 0 20px rgba(255, 50, 0, 0.6),
      0 0 40px rgba(255, 0, 0, 0.4);
  }
  100% {
    text-shadow: 
      0 0 15px rgba(255, 150, 0, 1),
      0 0 30px rgba(255, 100, 0, 0.8),
      0 0 50px rgba(255, 50, 0, 0.6);
  }
}
section:nth-child(2):before, section:nth-child(2):after {
  left: -5vmin;
  animation: spin 6s linear infinite;
}

@keyframes spin {
  to { rotate: 360deg; }
}

section:nth-child(3) {
  background: #F7E49C;
  color: #212529;
}
section:nth-child(3) h1 {
  font-size: clamp(1.2rem, 3vw, 2rem);
}
section:nth-child(3):before, section:nth-child(3):after {
  right: -5vmin;
  animation: spin-reverse 6s linear infinite;
}

@keyframes spin-reverse {
  to { rotate: -360deg; }
}
section:first-child {
  background: url("/images/Nbajam.jpg") right bottom/cover no-repeat;
  transition: all 1s ease-in-out;
  height: 25vh;
}
@media (min-width: 600px) {
  section:first-child {
    height: auto;
  }
}
section:first-child:hover {
  background-position: left center;
}
section:nth-child(4) {
  background: url("/images/nba-jam.jpg") right center/cover no-repeat;
  transition: all 1s ease-in-out;
  height: 25vh;
}
@media (min-width: 600px) {
  section:nth-child(4) {
    height: auto;
  }
}
section:nth-child(4):hover {
  background-position: left center;
}