@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Plus+Jakarta+Sans:wght@700;800&display=swap');

:root {
  --glow-start: #ff0055;
  --glow-end: #ffcc00;
  --glow-rgb: 255, 0, 85;
  --bg-color: #ffeef2;
}

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

body {
  background-color: var(--bg-color);
  color: #222222;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Canvas - soft liquid color blur */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  filter: blur(70px);
  opacity: 0.95;
  pointer-events: none;
  transform: translate3d(0, 0, 0); /* Force GPU acceleration */
}

/* Foreground Canvas - sharp, high-tech grid of dots */
#dots-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Content Layout Wrapper */
#content-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 40px 20px;
  text-align: center;
  transition: justify-content 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header greeting animation and sizing */
#greeting {
  margin-top: 0;
  transform: translateY(0);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

#greeting.shifted {
  transform: translateY(-20px);
}

h1.birthday-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--glow-start), var(--glow-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 15px rgba(var(--glow-rgb), 0.35));
  transition: filter 0.8s ease;
  animation: titlePulse 6s ease-in-out infinite alternate;
}

.birthday-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(15px);
  animation: slideUpFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

/* Glassmorphic Video Wrapper */
#video-container {
  width: 50%;
  aspect-ratio: 16 / 9;
  max-width: 850px;
  min-width: 320px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1), 0 0 40px rgba(var(--glow-rgb), 0.06);
  opacity: 0;
  transform: scale(0.9) translateY(40px);
  pointer-events: none;
  transition: 
    opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), 
    transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), 
    box-shadow 0.8s ease, 
    border-color 0.8s ease;
  margin-top: 20px;
  will-change: transform, opacity;
}

#video-container.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

#video-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Sub-card/Hint text below video */
.video-hint {
  margin-top: 15px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease 1s, transform 1s ease 1s;
}

.video-hint.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animations */
@keyframes titlePulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.02);
  }
}

@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 1200px) {
  #video-container {
    width: 65%;
  }
}

@media (max-width: 768px) {
  h1.birthday-title {
    font-size: 3.5rem;
    letter-spacing: -1px;
  }
  
  .birthday-subtitle {
    font-size: 1.2rem;
  }
  
  #video-container {
    width: 85%;
    margin-top: 25px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  h1.birthday-title {
    font-size: 2.8rem;
  }
  
  .birthday-subtitle {
    font-size: 1rem;
    padding: 0 10px;
  }
  
  #video-container {
    width: 95%;
    margin-top: 20px;
  }
}

/* Track Package link on main page */
.track-link {
  font-family: 'Plus Jakarta Sans', sans-serif;
  margin-top: 22px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0077ff;
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
  pointer-events: none;
  display: inline-block;
  cursor: pointer;
}

.track-link.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.track-link:hover {
  color: #ff0055;
  text-shadow: 0 0 10px rgba(255, 0, 85, 0.15);
}

/* Tracking Card for track.html */
.tracking-card {
  width: 90%;
  max-width: 520px;
  padding: 35px 30px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08), 0 0 45px rgba(var(--glow-rgb), 0.04);
  color: #333333;
  text-align: left;
  animation: cardFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tracking-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.tracking-header h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #111111;
  letter-spacing: -0.5px;
}

.tracking-status-badge {
  display: inline-block;
  background: rgba(0, 119, 255, 0.08);
  color: #0066cc;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tracking-num-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 12px 18px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0;
}

.tracking-num {
  font-family: monospace;
  font-size: 0.95rem;
  color: #444444;
  font-weight: 600;
}

.btn-copy {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #555555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: #f8f9fa;
  border-color: rgba(0, 0, 0, 0.15);
  color: #222222;
}

/* Timeline Components */
.timeline {
  position: relative;
  padding-left: 24px;
  border-left: 2px solid rgba(0, 0, 0, 0.05);
  margin: 22px 0 26px;
}

.timeline-item {
  position: relative;
  margin-bottom: 22px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  border: 2px solid #fff;
  z-index: 2;
  transition: background 0.3s ease;
}

.timeline-item.completed::before {
  background: #4caf50;
}

.timeline-item.active::before {
  background: #0077ff;
  box-shadow: 0 0 0 4px rgba(0, 119, 255, 0.15);
  animation: pulseDot 2s infinite alternate;
}

@keyframes pulseDot {
  0% { transform: scale(1); }
  100% { transform: scale(1.18); }
}

.timeline-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #222222;
}

.timeline-desc {
  font-size: 0.8rem;
  color: #666666;
  margin-top: 2px;
}

.timeline-time {
  font-size: 0.75rem;
  color: #999999;
  margin-top: 1px;
}

/* Action buttons */
.button-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--glow-start), #ff0077);
  color: #ffffff;
  border: none;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: block;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(255, 0, 85, 0.12);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 0, 85, 0.2);
}

.btn-back {
  background: rgba(0, 0, 0, 0.04);
  color: #555555;
  border: none;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: block;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-back:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #333333;
}
