/* === Root Variables === */
:root {
  --bg: #0b0c1a;
  --primary: #46c1f6;
  --accent: #ec4989;
  --text: #f1f1f5;
  --note-bg: #1c1e2d;
  --note-border: #46c1f6;
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-title: 'Orbitron', sans-serif;
}

/* === Base Layout === */
html, body {
  height: 100%;
  margin: 0;
  padding: 2rem;
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: hidden;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

/* === Twinkling Starry Sky === */
.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom, var(--bg) 0%, #000010 100%);
  overflow: hidden;
  z-index: -1;
}

.stars::before,
.stars::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    40vw 10vh white, 60vw 15vh white, 80vw 5vh white,
    20vw 30vh white, 75vw 40vh white, 50vw 70vh white,
    90vw 20vh white, 10vw 60vh white, 30vw 80vh white;
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.4; transform: scale(1); }
}

/* === Intro Splash Screen === */
#intro {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 1.5s ease;
  overflow: hidden;
}

#intro-title {
  display: block;
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-family: Orbitron;
  font-size: 2.5rem;
  letter-spacing: 3px;
  text-align: center;
  z-index: 10;
  padding: 0 1rem;
}

#meteor {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  box-shadow: 0 0 20px var(--primary);
  animation: fly 2s ease-out forwards;
  z-index: 5;
  position: absolute;
}
@keyframes disintegrate {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.4) rotate(15deg);
    filter: blur(6px);
  }
}

.disintegrate {
  animation: disintegrate 0.6s ease-out forwards;
}

@keyframes fly {
  0% { transform: translate(-200px, 200px) scale(1); opacity: 1; }
  100% { transform: translate(0, 0) scale(0.8); opacity: 0; }
}

#butterflies {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
  pointer-events: none;
  z-index: 6;
}

  #butterflies span {
    opacity: 0;
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    filter: drop-shadow(0 0 6px rgba(255, 200, 255, 0.7)); /* magic glow */
    transition: opacity 0.4s ease-in;
  }


@keyframes flyaway {
  to {
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r));
    opacity: 1;
  }
}


/* === Skip Link === */
.skip-link {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #000;
  color: #fff;
  padding: 10px 20px;
  z-index: 1000;
  font-family: var(--font-title);
  text-decoration: none;
  transition: top 0.3s ease;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transform: translateY(-100px);
  border: 2px solid;
  border-image: linear-gradient(to right, var(--accent), var(--primary)) 1;
}

.skip-link:focus {
  transform: translateY(0);
}

/* === Tabs === */
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem auto;
}

.tab {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab:hover,
.tab:focus {
  background-color: var(--accent);
  color: var(--bg);
  outline: none;
}

.tab.active {
  background-color: var(--accent);
  color: var(--bg);
}

.tab-content {
  display: none;
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(70, 193, 246, 0.15);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}


/* === Notes & Photos === */
.note {
  background: var(--note-bg);
  border-left: 5px solid var(--note-border);
  border-radius: 5px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-style: italic;
  color: var(--text);
}

.photo-block {
  margin-bottom: 2rem;
  text-align: center;
}

.photo-block img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 0 16px rgba(70, 193, 246, 0.3);
}

.photo-block p {
  font-style: italic;
  margin-top: 0.5rem;
}

/* === Rocket Launcher === */
.rocket-launcher {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
  gap: 1.5rem;
}

#launchBtn {
  font-size: 3rem;
  background: linear-gradient(135deg, #ff69b4, #87cefa);
  border: none;
  padding: 1rem;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease;
  color: white;
  outline: none;
}

/* Default font for launcher + note */
.rocket-launcher,
.note-box {
  font-family: 'Orbitron', sans-serif;
}

/* Readability Mode activated */
.readability .rocket-launcher,
.readability .note-box {
  font-family: 'Lexend', sans-serif !important;
}


#launchBtn:hover,
#launchBtn:focus {
  transform: scale(1.08);
  background-color: #222;
  outline: 3px solid #ffd700; /* Gold glow focus for accessibility */
}

/* Note Box Styling */
.note-box {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;

  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  line-height: 1.8;
  margin-top: 1.5rem;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #ffffff;
  max-width: 45ch;
  min-height: 200px; /* or however tall you want the card */
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

.toggle-wrapper {
  margin: 1rem 0;
  font-family: sans-serif;
  font-size: 1.1rem;
  color: white;
}

.toggle-wrapper {
  margin: 1rem 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-family: 'Lexend', sans-serif;
}

/* Hide native checkbox */
.switch-label input {
  display: none;
}

/* Label container */
.switch-label {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  color: #fff;
  font-size: 1.2rem;
}

.switch-text {
  margin-right: 1rem;
}

/* Slider background */
.slider {
  width: 3.2rem;
  height: 1.6rem;
  background-color: #333;
  border-radius: 999px;
  position: relative;
  transition: background-color 0.3s;
}

/* The toggle knob */
.slider::before {
  content: "🌌";
  position: absolute;
  left: 0.15rem;
  top: 0.15rem;
  width: 1.3rem;
  height: 1.3rem;
  background-color: #7F7CFF;
  border-radius: 50%;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* ON state */
.switch-label input:checked + .switch-text + .slider {
  background-color: #444;
}

.switch-label input:checked + .switch-text + .slider::before {
  transform: translateX(1.6rem);
  background-color: #48E5C2;
  content: "👓";
}



/* === Playlist === */
#playlist {
  padding: 2rem;
}

.playlist-embed {
  margin-top: 1rem;
}

.playlist li {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.tagline-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  max-width: 100%;
}

.tagline-card {
  background-color: #151d2f;
  color: #e4f0ff;
  font-style: italic;
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 0 12px #00c6ff33;
  transition: transform 0.2s ease;
}

.tagline-card:hover {
  transform: scale(1.02);
}


.tagline-card strong {
  min-width: 200px;
  flex-shrink: 0;
  margin-right: 1rem;
  font-weight: 600;
}


.tagline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* === Helpers === */
.hidden {
  display: none !important;
}

#main-content {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 5rem;
}
/* === Jeff Jar Birthday H1 === */

#main-content h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase; /* optional */
  margin-bottom: 1.5rem;

  /* 🧭 THIS IS THE MAGIC: */
  text-align: center;
}
#butterflies.butterflies-visible {
  display: flex;
}
/* TRANSITION IN! */
/* === Smooth Transition Between Splash and Main Content === */
#main-content {
  display: none;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

#main-content.visible {
  display: block;
  opacity: 1;
  transform: scale(1);
}

#intro.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}
