/* ===================================================
   Lucian's Birthday — "Turning 26: The Clock Doesn't
   Lie" Theme. Dark terminal nerd vibes. ☠️🤓
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&family=Nunito:wght@400;600;700;800&display=swap');

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

:root {
  --green: #39ff14;
  --green-dim: #1a7a00;
  --green-glow: #39ff1466;
  --amber: #ffb300;
  --red-err: #ff3b3b;
  --bg: #060a06;
  --card-bg: rgba(0, 20, 0, 0.82);
  --glass-border: rgba(57, 255, 20, 0.22);
  --text: #c8f5c8;
  --text-dim: #5a8c5a;
  --mono: 'Share Tech Mono', monospace;
  --display: 'VT323', monospace;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--mono);
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ---- CRT scanlines overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.18) 2px,
      rgba(0, 0, 0, 0.18) 4px);
  pointer-events: none;
  z-index: 9999;
}

/* ---- Matrix rain overlay (CSS-only subtle version) ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(57, 255, 20, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Floating particles (reused as falling binary/symbols) ---- */
.balloons-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.balloon {
  position: absolute;
  bottom: -50px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--green-dim);
  white-space: nowrap;
  animation: floatUp linear infinite;
  text-shadow: 0 0 6px var(--green-glow);
  opacity: 0.7;
}

@keyframes floatUp {
  0% {
    transform: translateY(0);
    opacity: 0.7;
  }

  90% {
    opacity: 0.5;
  }

  100% {
    transform: translateY(-110vh);
    opacity: 0;
  }
}

/* ---- Confetti → styled as glowing pixels ---- */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: 3px;
  height: 12px;
  border-radius: 1px;
  animation: confettiFall linear infinite;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(110vh) rotate(180deg);
    opacity: 0.2;
  }
}

/* ---- Main card ---- */
.birthday-main {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  width: 100%;
  min-height: 100vh;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 3rem 3.5rem 2.5rem;
  max-width: 700px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 0 0 1px var(--green-dim),
    0 0 40px rgba(57, 255, 20, 0.12),
    0 0 90px rgba(57, 255, 20, 0.06),
    inset 0 0 60px rgba(57, 255, 20, 0.03);
  position: relative;
  animation: cardGlow 4s ease-in-out infinite;
}

@keyframes cardGlow {

  0%,
  100% {
    box-shadow: 0 0 0 1px var(--green-dim), 0 0 40px rgba(57, 255, 20, 0.12), 0 0 90px rgba(57, 255, 20, 0.06), inset 0 0 60px rgba(57, 255, 20, 0.03);
  }

  50% {
    box-shadow: 0 0 0 1px var(--green), 0 0 60px rgba(57, 255, 20, 0.22), 0 0 120px rgba(57, 255, 20, 0.1), inset 0 0 60px rgba(57, 255, 20, 0.06);
  }
}

/* Top-bar terminal decoration */
.card::before {
  content: '> system.birthday(lucian, age=26) // deprecated ⚠️';
  display: block;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--green-dim);
  text-align: left;
  margin-bottom: 1.8rem;
  padding: 0.4rem 0.6rem;
  background: rgba(57, 255, 20, 0.05);
  border-left: 2px solid var(--green-dim);
  border-radius: 2px;
  letter-spacing: 0.04em;
  animation: typingBlink 0.8s step-end infinite;
}

@keyframes typingBlink {

  0%,
  100% {
    border-left-color: var(--green);
  }

  50% {
    border-left-color: transparent;
  }
}

/* ---- Cake emoji ---- */
.cake-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 0.4rem;
  animation: glitchCake 5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px var(--green-glow));
}

@keyframes glitchCake {

  0%,
  90%,
  100% {
    transform: translateY(0) skew(0deg);
    filter: drop-shadow(0 0 10px var(--green-glow));
  }

  91% {
    transform: translateY(-2px) skew(-2deg);
    filter: drop-shadow(3px 0 8px #39ff14) hue-rotate(40deg);
  }

  92% {
    transform: translateY(2px) skew(2deg);
    filter: drop-shadow(-3px 0 8px #f0f);
  }

  93% {
    transform: translateY(0) skew(0);
    filter: drop-shadow(0 0 10px var(--green-glow));
  }
}

/* ---- Title ---- */
.birthday-title {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--green);
  text-shadow:
    0 0 10px var(--green),
    0 0 30px var(--green-glow);
  letter-spacing: 0.04em;
}

.name-highlight {
  color: var(--amber);
  text-shadow: 0 0 12px rgba(255, 179, 0, 0.6), 0 0 30px rgba(255, 179, 0, 0.3);
  animation: amberPulse 2s ease-in-out infinite alternate;
}

@keyframes amberPulse {
  from {
    text-shadow: 0 0 12px rgba(255, 179, 0, 0.6), 0 0 30px rgba(255, 179, 0, 0.3);
  }

  to {
    text-shadow: 0 0 20px rgba(255, 179, 0, 0.9), 0 0 50px rgba(255, 179, 0, 0.5);
  }
}

/* ---- Subtitle ---- */
.subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

.subtitle em {
  color: var(--red-err);
  font-style: normal;
}

/* ---- Countdown ---- */
.countdown-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(57, 255, 20, 0.05);
  border: 1px solid var(--green-dim);
  border-radius: 2px;
  padding: 0.9rem 1.2rem;
  min-width: 80px;
  transition: transform 0.1s ease;
  position: relative;
  overflow: hidden;
}

.countdown-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(57, 255, 20, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

.countdown-box:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

.count-number {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  line-height: 1;
  color: var(--green);
  text-shadow: 0 0 14px var(--green-glow);
  transition: all 0.15s ease;
  letter-spacing: 0.04em;
}

.count-number.tick {
  animation: tickFlash 0.25s ease;
}

@keyframes tickFlash {
  0% {
    color: #fff;
    text-shadow: 0 0 24px #fff, 0 0 40px var(--green);
    transform: scale(1.06);
  }

  100% {
    color: var(--green);
    text-shadow: 0 0 14px var(--green-glow);
    transform: scale(1);
  }
}

.count-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  margin-top: 0.3rem;
  font-family: var(--mono);
}

.countdown-separator {
  font-family: var(--display);
  font-size: 2.2rem;
  color: var(--green-dim);
  padding-bottom: 1.4rem;
  animation: separatorBlink 1s step-end infinite;
  text-shadow: 0 0 8px var(--green-glow);
}

@keyframes separatorBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.1;
  }
}

/* ---- Warning bar below countdown ---- */
.warning-bar {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--red-err);
  background: rgba(255, 59, 59, 0.08);
  border: 1px solid rgba(255, 59, 59, 0.3);
  border-radius: 2px;
  padding: 0.35rem 0.8rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.06em;
  animation: warnBlink 2.5s step-end infinite;
}

@keyframes warnBlink {

  0%,
  80%,
  100% {
    opacity: 1;
  }

  85% {
    opacity: 0.2;
  }
}

/* ---- Birthday celebration message ---- */
.celebrate-msg {
  animation: celebratePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  margin-bottom: 1.5rem;
}

@keyframes celebratePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.celebrate-msg p {
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--green);
  text-shadow: 0 0 20px var(--green), 0 0 50px var(--green-glow);
  margin-bottom: 0.4rem;
}

.celebrate-sub {
  font-size: 0.9rem !important;
  color: var(--text-dim) !important;
  font-family: var(--mono) !important;
  text-shadow: none !important;
}

/* ---- Until text ---- */
.until-text {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 1.6rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
}

/* ---- Sound button ---- */
.sound-btn {
  background: transparent;
  border: 1px solid var(--green-dim);
  border-radius: 2px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.65rem 1.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sound-btn:hover {
  background: rgba(57, 255, 20, 0.1);
  border-color: var(--green);
  box-shadow: 0 0 16px var(--green-glow), inset 0 0 16px rgba(57, 255, 20, 0.06);
  text-shadow: 0 0 8px var(--green);
}

.sound-btn:active {
  transform: scale(0.97);
}

.sound-btn.muted {
  color: var(--text-dim);
  border-color: #2a2a2a;
  background: transparent;
  box-shadow: none;
  text-shadow: none;
}

/* ---- Responsive ---- */
@media (max-width: 520px) {
  .card {
    padding: 1.8rem 1.2rem 1.6rem;
  }

  .countdown-box {
    min-width: 62px;
    padding: 0.7rem 0.8rem;
  }

  .countdown-separator {
    font-size: 1.6rem;
  }
}