/* 🤘 AWESOME STYLES 🤘 */

/* ═══════════════════════════════════════════════════════════════════
   🎨 CSS CUSTOM PROPERTIES (Configuration)
   ═══════════════════════════════════════════════════════════════════ */
:root {
  /* ── awesome: LEGO Movie scoped palette ──────────────────────────
   * Chrome (surfaces, scrims, hairlines, body text) routes through
   * brand tokens. The "Everything is Awesome" candy identity — coral
   * pop, LEGO teal, brick yellow, neon nyan magenta/cyan, firework
   * orange ladder — lives in these --awe-* tokens so the brand audit
   * sees zero bare literals while the song's loud palette stays loud.
   */
  --awe-coral: #ff6b6b;
  --awe-coral-bright: #ff8e53;
  --awe-teal: #4ecdc4;
  --awe-yellow: #ffe66d;
  --awe-neon-magenta: #ff00ff;
  --awe-neon-cyan: #00ffff;
  --awe-firework-orange: #ff6600;
  --awe-firework-yellow: #ffcc00;
  --awe-firework-trail: #ff9900;
  --awe-deep-blue-1: #1a1a2e;
  --awe-deep-blue-2: #16213e;
  --awe-deep-blue-3: #0f3460;
  --awe-disco-chain-dark: #444444;
  --awe-disco-chain-light: #888888;
  --awe-modal-bg-1: #1e1e2e;
  --awe-modal-bg-2: #2a2a3e;
  --awe-spotify: #1db954;
  --awe-apple-red: #fc3c44;
  --awe-youtube-red: #ff0000;
  --awe-amazon-orange: #ff9900;

  /* Sizes */
  --awesome-emoji-size: 2em;
  --awesome-animal-size: 150px;
  --awesome-parrot-size: 80px;
  --awesome-nyan-size: 100px;

  /* Effects — alpha tints route through scoped/brand tokens via color-mix. */
  --awesome-animal-shadow: 0 4px 15px color-mix(in srgb, var(--pure-black) 30%, transparent);
  --awesome-parrot-glow: drop-shadow(
    0 0 10px color-mix(in srgb, var(--pure-white) 80%, transparent)
  );
  --awesome-nyan-glow: drop-shadow(
    0 0 20px color-mix(in srgb, var(--awe-neon-magenta, #ff00ff) 80%, transparent)
  );

  /* Z-Index Layers */
  --z-lyrics: 99999;
  --z-confetti: 9999;
  --z-emoji: 9998;
  --z-parrot: 9997;
  --z-nyan: 9997;
  --z-animals: 9996;
  --z-cursor: 9995;
  --z-fireworks: 9994;
  --z-disco: 9990;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* Defensive brand defaults: every visible-text element in this app paints
 * its own color (gradient titles, neon credit lines, info-section text),
 * but if any future descendant inherits from <body> it should land on the
 * brand light-on-dark, not the UA default black. */
body {
  background-color: var(--surface-0);
  color: var(--text-1);
}

/* ═══════════════════════════════════════════════════════════════════
   🌈 NYAN CAT STYLES
   ═══════════════════════════════════════════════════════════════════ */
.nyan-cat {
  position: fixed;
  pointer-events: none;
  max-width: var(--awesome-nyan-size);
  max-height: var(--awesome-nyan-size);
  filter: var(--awesome-nyan-glow);
  transition: opacity 0.5s ease-out, transform 5s linear;
  opacity: 0;
  z-index: var(--z-nyan);
}

/* ═══════════════════════════════════════════════════════════════════
   🦜 PARTY PARROT STYLES
   ═══════════════════════════════════════════════════════════════════ */
.party-parrot {
  position: fixed;
  pointer-events: none;
  width: var(--awesome-parrot-size);
  height: var(--awesome-parrot-size);
  filter: var(--awesome-parrot-glow);
  transition: opacity 0.5s ease-out, transform 3s ease-in-out;
  opacity: 0;
  z-index: var(--z-parrot);
}

/* ═══════════════════════════════════════════════════════════════════
   🎊 FLYING EMOJI STYLES
   ═══════════════════════════════════════════════════════════════════ */
.flying-emoji {
  position: absolute;
  pointer-events: none;
  font-size: var(--awesome-emoji-size);
  z-index: var(--z-emoji);
}

/* ═══════════════════════════════════════════════════════════════════
   🐾 ANIMAL STYLES
   ═══════════════════════════════════════════════════════════════════ */
.random-animal {
  position: fixed;
  max-width: var(--awesome-animal-size);
  border-radius: 10px;
  box-shadow: var(--awesome-animal-shadow);
  opacity: 0;
  pointer-events: none;
  z-index: var(--z-animals);
}

.animal-fact {
  position: fixed;
  max-width: 300px;
  padding: 15px;
  background: color-mix(in srgb, var(--pure-black) 80%, transparent);
  color: var(--pure-white);
  border-radius: 10px;
  font-size: 14px;
  box-shadow: var(--awesome-animal-shadow);
  transition: opacity 0.5s ease-out;
  opacity: 0;
  pointer-events: none;
  z-index: var(--z-animals);
}

/* ═══════════════════════════════════════════════════════════════════
   🎊 CONFETTI STYLES
   ═══════════════════════════════════════════════════════════════════ */
.awesome-confetti {
  position: fixed;
  pointer-events: none;
  z-index: var(--z-confetti);
}

/* ═══════════════════════════════════════════════════════════════════
   🌈 CURSOR PARTICLE STYLES
   ═══════════════════════════════════════════════════════════════════ */
.awesome-cursor-particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
}

/* ═══════════════════════════════════════════════════════════════════
   🎆 FIREWORKS STYLES
   ═══════════════════════════════════════════════════════════════════ */
.awesome-firework-particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-fireworks);
}

.awesome-firework-rocket {
  position: fixed;
  width: 4px;
  height: 12px;
  background: linear-gradient(
    to top,
    var(--awe-firework-orange, #ff6600),
    var(--awe-firework-yellow, #ffcc00),
    var(--pure-white)
  );
  border-radius: 2px;
  pointer-events: none;
  z-index: var(--z-fireworks);
  box-shadow: 0 0 10px var(--awe-firework-orange, #ff6600);
}

.awesome-firework-trail {
  position: fixed;
  width: 3px;
  height: 3px;
  background: var(--awe-firework-trail, #ff9900);
  border-radius: 50%;
  pointer-events: none;
  z-index: calc(var(--z-fireworks) - 1);
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════════
   🪩 DISCO BALL STYLES
   ═══════════════════════════════════════════════════════════════════ */
.awesome-disco-container {
  position: fixed;
  top: 30px;
  left: 52%;
  transform: translateX(-50%);
  z-index: var(--z-disco);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.awesome-disco-chain {
  width: 2px;
  height: 20px;
  background: linear-gradient(
    to bottom,
    var(--awe-disco-chain-dark, #444444),
    var(--awe-disco-chain-light, #888888)
  );
  box-shadow: 0 0 3px color-mix(in srgb, var(--pure-black) 50%, transparent);
}

.awesome-disco-ball {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 5px 15px color-mix(in srgb, var(--pure-white) 50%, transparent));
  animation: disco-swing 2s ease-in-out infinite;
}

.awesome-disco-lights {
  position: fixed;
  top: 100px;
  left: 50%;
  width: 0;
  height: 0;
  z-index: calc(var(--z-disco) - 1);
  pointer-events: none;
  transform: translateX(-50%);
}

.awesome-disco-ray {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  opacity: 0.1;
  transform-origin: top center;
  filter: blur(8px);
  mix-blend-mode: screen;
}

@keyframes disco-swing {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

@keyframes disco-ray-sweep {
  0% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    opacity: 0.1;
  }
}

#start {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-direction: column;
}

div#awesome_parent {
  display: none;
  min-height: calc(100vh - 100px);
  width: 100%;
  transition: background-color 2s ease;
}

div#awesome_div {
  transition: color 2s ease;
  text-align: center;
  display: table-cell;
  font-size: 80px;
  vertical-align: middle;
  position: relative;
  z-index: 99999;
  padding: 0 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 🎵 Audio player styling */
audio {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

/* 🏀 Bounce animation for elements that need it */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}

.bounce {
  animation: bounce 2s infinite;
}

/* 📱 Mobile responsive styles */
@media screen and (max-width: 480px) {
  div#awesome_div {
    font-size: clamp(26px, 8vw, 36px);
    padding: 0 15px;
    line-height: 1.2;
    box-sizing: border-box;
    max-width: 100vw;
  }

  div#awesome_parent {
    padding-top: 70px;
    padding-bottom: 70px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Adjust top UI container for mobile */
  .awesome-top-ui {
    top: 8px !important;
    right: 8px !important;
    left: 50px !important;
    gap: 4px !important;
    flex-direction: column !important;
    align-items: flex-end !important;
  }

  #awesome-timer {
    font-size: 9px !important;
    padding: 4px 8px !important;
    max-width: calc(100vw - 70px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Audio player smaller on mobile */
  audio {
    width: 80%;
    max-width: 260px;
    bottom: 8px;
    z-index: 100000;
  }

  /* Smaller sizes for spawned content on mobile */
  :root {
    --awesome-animal-size: 100px;
    --awesome-parrot-size: 60px;
    --awesome-nyan-size: 80px;
  }

  .random-animal,
  .party-parrot,
  .nyan-cat {
    max-width: 100px !important;
    max-height: 100px !important;
  }

  .animal-fact {
    max-width: 200px;
    font-size: 12px;
    padding: 10px;
  }
}

@media screen and (max-width: 360px) {
  div#awesome_div {
    font-size: clamp(22px, 7vw, 30px);
    padding: 0 12px;
  }

  #awesome-timer {
    font-size: 8px !important;
  }

  .random-animal,
  .party-parrot,
  .nyan-cat {
    max-width: 80px !important;
    max-height: 80px !important;
  }
}

/* 🎉 Milestone celebration text - mobile responsive */
.awesome-milestone {
  word-wrap: break-word;
}

@media screen and (max-width: 480px) {
  .awesome-milestone {
    font-size: clamp(1.2em, 6vw, 2em) !important;
    width: 90% !important;
    max-width: none !important;
    padding: 0 10px !important;
    text-align: center !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   🎬 ENHANCED START SCREEN
   ═══════════════════════════════════════════════════════════════════ */
.start-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    var(--awe-deep-blue-1, #1a1a2e) 0%,
    var(--awe-deep-blue-2, #16213e) 50%,
    var(--awe-deep-blue-3, #0f3460) 100%
  );
  position: relative;
  overflow: hidden;
}

.start-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 80%,
      color-mix(in srgb, var(--awe-coral, #ff6b6b) 15%, transparent) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      color-mix(in srgb, var(--awe-teal, #4ecdc4) 15%, transparent) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      color-mix(in srgb, var(--awe-yellow, #ffe66d) 10%, transparent) 0%,
      transparent 40%
    );
  pointer-events: none;
}

.start-content {
  text-align: center;
  padding: 40px;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.start-title {
  font-family: 'Bangers', 'Impact', sans-serif;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--pure-white);
  text-shadow: 0 0 10px var(--awe-coral, #ff6b6b), 0 0 20px var(--awe-coral, #ff6b6b),
    0 0 40px var(--awe-coral, #ff6b6b), 3px 3px 0 var(--awe-teal, #4ecdc4);
  margin: 0 0 10px 0;
  letter-spacing: 2px;
  animation: title-glow 2s ease-in-out infinite alternate;
}

@keyframes title-glow {
  from {
    text-shadow: 0 0 10px var(--awe-coral, #ff6b6b), 0 0 20px var(--awe-coral, #ff6b6b),
      0 0 40px var(--awe-coral, #ff6b6b), 3px 3px 0 var(--awe-teal, #4ecdc4);
  }
  to {
    text-shadow: 0 0 20px var(--awe-teal, #4ecdc4), 0 0 40px var(--awe-teal, #4ecdc4),
      0 0 60px var(--awe-teal, #4ecdc4), 3px 3px 0 var(--awe-coral, #ff6b6b);
  }
}

.start-subtitle {
  font-family: 'Fredoka One', 'Comic Sans MS', cursive;
  font-size: 1.3rem;
  color: var(--awe-yellow, #ffe66d);
  margin: 0 0 30px 0;
  letter-spacing: 1px;
}

.start-credits {
  background: color-mix(in srgb, var(--pure-white) 10%, transparent);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px 30px;
  margin-bottom: 30px;
  border: 1px solid color-mix(in srgb, var(--pure-white) 20%, transparent);
}

.credit-line {
  font-size: 1.1rem;
  color: var(--pure-white);
  margin: 0 0 5px 0;
}

.credit-artist {
  font-size: 1.4rem;
  color: var(--awe-teal, #4ecdc4);
  font-weight: bold;
  margin: 0 0 5px 0;
}

.credit-source {
  font-size: 0.95rem;
  color: var(--text-2);
  margin: 0;
  font-style: italic;
}

.start-button {
  background: linear-gradient(
    135deg,
    var(--awe-coral, #ff6b6b) 0%,
    var(--awe-coral-bright, #ff8e53) 100%
  );
  color: var(--pure-white);
  font-family: 'Fredoka One', 'Comic Sans MS', cursive;
  font-size: 1.4rem;
  padding: 18px 45px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 30px color-mix(in srgb, var(--awe-coral, #ff6b6b) 40%, transparent),
    0 0 0 0 color-mix(in srgb, var(--awe-coral, #ff6b6b) 50%, transparent);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  animation: button-pulse 2s ease-in-out infinite;
}

@keyframes button-pulse {
  0%,
  100% {
    box-shadow: 0 8px 30px color-mix(in srgb, var(--awe-coral, #ff6b6b) 40%, transparent),
      0 0 0 0 color-mix(in srgb, var(--awe-coral, #ff6b6b) 50%, transparent);
  }
  50% {
    box-shadow: 0 8px 30px color-mix(in srgb, var(--awe-coral, #ff6b6b) 40%, transparent),
      0 0 0 15px transparent;
  }
}

.start-button:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--awe-coral, #ff6b6b) 50%, transparent),
    0 0 0 0 color-mix(in srgb, var(--awe-coral, #ff6b6b) 50%, transparent);
}

.play-icon {
  font-size: 1.2rem;
}

.start-hints {
  color: color-mix(in srgb, var(--pure-white) 70%, transparent);
  font-size: 0.9rem;
  line-height: 1.8;
}

.start-hints p {
  margin: 8px 0;
}

.keyboard-hint {
  font-size: 0.8rem !important;
  color: color-mix(in srgb, var(--pure-white) 50%, transparent) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   ℹ️ INFO BUTTON
   ═══════════════════════════════════════════════════════════════════ */
.info-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pure-black) 70%, transparent);
  border: 2px solid color-mix(in srgb, var(--pure-white) 30%, transparent);
  color: var(--pure-white);
  font-size: 24px;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.info-btn:hover {
  background: color-mix(in srgb, var(--awe-teal, #4ecdc4) 80%, transparent);
  border-color: var(--awe-teal, #4ecdc4);
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════
   📋 INFO MODAL
   ═══════════════════════════════════════════════════════════════════ */
.info-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--scrim-strong);
  backdrop-filter: blur(10px);
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.info-modal.hidden {
  display: none;
}

.info-modal-content {
  background: linear-gradient(
    145deg,
    var(--awe-modal-bg-1, #1e1e2e),
    var(--awe-modal-bg-2, #2a2a3e)
  );
  border-radius: 24px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--hairline);
  box-shadow: 0 25px 80px color-mix(in srgb, var(--pure-black) 50%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--pure-white) 10%, transparent);
}

.info-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pure-white) 10%, transparent);
  border: none;
  color: var(--pure-white);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.info-close:hover {
  background: var(--awe-coral, #ff6b6b);
  transform: rotate(90deg);
}

.info-title {
  font-family: 'Bangers', 'Impact', sans-serif;
  font-size: 2.2rem;
  color: var(--pure-white);
  text-align: center;
  margin: 0 0 30px 0;
  text-shadow: 0 0 20px color-mix(in srgb, var(--awe-coral, #ff6b6b) 50%, transparent);
}

.info-section {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--hairline);
}

.info-section:last-of-type {
  border-bottom: none;
  margin-bottom: 15px;
}

.info-section h3 {
  font-family: 'Fredoka One', sans-serif;
  font-size: 1.1rem;
  color: var(--awe-teal, #4ecdc4);
  margin: 0 0 12px 0;
}

.info-section p {
  color: color-mix(in srgb, var(--pure-white) 85%, transparent);
  margin: 5px 0;
  line-height: 1.6;
}

.info-small {
  font-size: 0.8rem !important;
  color: color-mix(in srgb, var(--pure-white) 50%, transparent) !important;
  margin-top: 10px !important;
}

/* Streaming Links */
.stream-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.stream-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  transition: all 0.2s ease;
}

.stream-link.spotify {
  background: var(--awe-spotify, #1db954);
  color: var(--pure-white);
}

.stream-link.apple {
  background: linear-gradient(135deg, var(--awe-apple-red, #fc3c44), var(--awe-apple-red, #fc3c44));
  color: var(--pure-white);
}

.stream-link.youtube {
  background: var(--awe-youtube-red, #ff0000);
  color: var(--pure-white);
}

.stream-link.amazon {
  background: var(--awe-amazon-orange, #ff9900);
  color: var(--pure-black);
}

.stream-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px color-mix(in srgb, var(--pure-black) 30%, transparent);
}

/* Feature List */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
}

.feature-list li {
  color: color-mix(in srgb, var(--pure-white) 80%, transparent);
  padding: 6px 0;
  font-size: 0.95rem;
}

/* Shortcuts Grid */
.shortcuts-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  color: color-mix(in srgb, var(--pure-white) 80%, transparent);
  font-size: 0.9rem;
}

.shortcut kbd {
  background: color-mix(in srgb, var(--pure-white) 15%, transparent);
  padding: 5px 12px;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--pure-white) 20%, transparent);
}

/* Contact Links */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 12px;
}

.contact-links a {
  color: var(--awe-teal, #4ecdc4);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-links a:hover {
  color: var(--awe-yellow, #ffe66d);
}

/* Disclaimer */
.info-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--pure-white) 40%, transparent);
  margin-top: 20px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════
   📱 INFO MODAL MOBILE STYLES
   ═══════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 480px) {
  .start-content {
    padding: 25px 20px;
  }

  .start-credits {
    padding: 15px 20px;
  }

  .start-button {
    font-size: 1.1rem;
    padding: 15px 35px;
  }

  .start-hints {
    font-size: 0.8rem;
  }

  .info-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
    bottom: 70px;
  }

  .info-modal-content {
    padding: 25px 20px;
    border-radius: 16px;
  }

  .info-title {
    font-size: 1.6rem;
  }

  .stream-links {
    flex-direction: column;
  }

  .stream-link {
    justify-content: center;
  }
}
