/* ==========================================================================
   Base & Resets
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --midnight-blue: #0d1b3e;
  --twilight-blue: #1c3b70;
  --cyan-mist: #4ea8de;
  --pure-white: #ffffff;
  --warm-gold: #ffd166;
  --festive-crimson: #8b2626;
  --crimson-hover: #a83232;
  --font-display: 'Cinzel Decorative', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--midnight-blue);
  color: var(--pure-white);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Hero Container & Layering
   ========================================================================== */
.hero-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Background Layer with User's Winter Night Scene */
.background-layer {
  position: absolute;
  inset: 0;
  background-image: url('background.jpg');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  z-index: 1;
  filter: contrast(1.05) saturate(1.1);
  transform: scale(1.01);
  transition: transform 0.8s ease-out;
}

/* Cyan/Teal Mist & Twilight Vignette Overlay */
.mist-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: 
    radial-gradient(ellipse at 40% 50%, rgba(78, 168, 222, 0.18) 0%, rgba(28, 59, 112, 0.25) 45%, rgba(13, 27, 62, 0.55) 85%),
    linear-gradient(to bottom, rgba(13, 27, 62, 0.35) 0%, transparent 40%, rgba(13, 27, 62, 0.5) 100%);
  mix-blend-mode: soft-light;
}

/* Canvas Snowfall Particles Overlay */
#snowfall-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

/* ==========================================================================
   Sky Elements: Santa Sleigh & Christmas Tree Glow
   ========================================================================== */
.sky-elements {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* Santa Sleigh and Flying Reindeers Animation */
.santa-sleigh-container {
  position: absolute;
  top: 14%;
  right: -320px;
  width: 280px;
  height: 80px;
  pointer-events: none;
  animation: flyAcrossSky 28s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
  animation-delay: 2s;
  transform-origin: center;
}

.sleigh-silhouette {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.8));
}

.reindeer-glow {
  filter: drop-shadow(0 0 6px #ffd166);
}

/* Magical Stardust Trail Behind Sleigh */
.stardust-trail {
  position: absolute;
  right: 180px;
  top: 48px;
  width: 140px;
  height: 16px;
  background: radial-gradient(ellipse at right, rgba(255, 209, 102, 0.8), rgba(78, 168, 222, 0.5) 50%, transparent 90%);
  filter: blur(3px);
  opacity: 0.8;
  animation: pulseTrail 1.8s ease-in-out infinite alternate;
}

@keyframes flyAcrossSky {
  0% {
    right: -320px;
    top: 22%;
    transform: translateY(0) scale(0.65) rotate(-2deg);
    opacity: 0;
  }
  5% {
    opacity: 0.95;
  }
  50% {
    top: 9%;
    transform: translateY(-15px) scale(0.85) rotate(2deg);
    opacity: 1;
  }
  92% {
    opacity: 0.85;
  }
  100% {
    right: 108vw;
    top: 6%;
    transform: translateY(-25px) scale(0.6) rotate(-4deg);
    opacity: 0;
  }
}

@keyframes pulseTrail {
  0% { transform: scaleX(0.9); opacity: 0.6; }
  100% { transform: scaleX(1.3); opacity: 1; }
}

/* Illuminated Tree in Center Horizon */
.christmas-tree-glow {
  position: absolute;
  bottom: 22%;
  left: 45%;
  width: 110px;
  height: 130px;
  opacity: 0.85;
  filter: drop-shadow(0 0 16px rgba(255, 209, 102, 0.6));
  animation: softGlowPulse 4s ease-in-out infinite alternate;
}

.giant-tree-svg {
  width: 100%;
  height: 100%;
}

.tree-star-glow {
  filter: drop-shadow(0 0 12px #ffd166) drop-shadow(0 0 24px #fff);
  animation: starPulse 2.5s ease-in-out infinite alternate;
}

.twinkle-light {
  animation: twinkle 2s infinite ease-in-out alternate;
}
.twinkle-light.l1 { animation-delay: 0.3s; }
.twinkle-light.l2 { animation-delay: 0.9s; }
.twinkle-light.l3 { animation-delay: 1.5s; }

@keyframes starPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 1; }
}

@keyframes softGlowPulse {
  0% { filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.4)); }
  100% { filter: drop-shadow(0 0 25px rgba(255, 209, 102, 0.75)); }
}

@keyframes twinkle {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.3); }
}

/* ==========================================================================
   Header: Top Left Brand (EHC Logo + FPTU Ethical Hacker Club)
   ========================================================================== */
.top-brand {
  position: fixed;
  top: 2rem;
  left: 2.5rem;
  z-index: 50;
  pointer-events: none;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  user-select: none;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: none;
  box-shadow: none;
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 15px rgba(78, 168, 222, 0.5);
  white-space: nowrap;
}

/* ==========================================================================
   Header: Corner Action Button ("Register My Gift")
   ========================================================================== */
.top-nav {
  position: fixed;
  top: 2rem;
  right: 2.5rem;
  z-index: 50;
}

.register-gift-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000000;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  padding: 6px 22px 6px 7px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.register-gift-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75);
  background: #111116;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.65);
}

.register-gift-btn:active {
  transform: translateY(0) scale(1);
}

.ehc-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: none;
  box-shadow: none;
}

.register-gift-btn .btn-text {
  display: inline-block;
  line-height: 1;
}

/* ==========================================================================
   Main Hero Content (Right-Aligned Asymmetric Layout)
   ========================================================================== */
.hero-content {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Align content-wrapper to the right */
}

.content-wrapper {
  max-width: 620px;
  text-align: center;
  padding: 2.5rem 2.8rem;
  background: rgba(13, 27, 62, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px rgba(7, 14, 33, 0.55);
}

/* Eyebrow text */
.eyebrow-text {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warm-gold);
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.6);
  margin-bottom: 0.9rem;
}

/* Main Display Serif Heading */
.main-heading {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.8vw, 4.1rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pure-white);
  text-shadow: 
    0 0 20px rgba(78, 168, 222, 0.6),
    0 0 40px rgba(78, 168, 222, 0.3),
    0 4px 12px rgba(13, 27, 62, 0.8);
  margin-bottom: 1.4rem;
}

/* Club Subtitle */
.club-subtitle {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--warm-gold);
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.65);
  margin-top: -12px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
}

/* Subtitle & Dynamic Location Line */
.subtitle-container {
  display: inline-block;
}

.subtitle-text {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.interactive-location-span {
  display: inline-block;
  margin-top: 4px;
  border-bottom: 2px dashed var(--warm-gold);
  padding-bottom: 2px;
  font-weight: 600;
  color: var(--warm-gold);
  text-shadow: 0 0 14px rgba(255, 209, 102, 0.7);
  transition: all 0.3s ease;
}

.interactive-location-span.is-christmas {
  border-bottom-style: solid;
  color: #80ffdb;
  text-shadow: 0 0 16px rgba(128, 255, 219, 0.85);
  animation: revealPulse 2s infinite alternate;
}

@keyframes revealPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(128,255,219,0.5)); }
  100% { transform: scale(1.02); filter: drop-shadow(0 0 18px rgba(128,255,219,0.9)); }
}

/* ==========================================================================
   Bottom Left Music Player Display
   ========================================================================== */
.music-player-widget {
  position: fixed;
  bottom: 1.5rem;
  left: 1.8rem;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 27, 62, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  padding: 8px 16px 8px 8px;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(78, 168, 222, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.music-player-widget:hover {
  background: rgba(28, 59, 112, 0.9);
  border-color: rgba(255, 209, 102, 0.55);
  box-shadow: 
    0 10px 28px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(255, 209, 102, 0.35);
}

.music-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd166 0%, #f3a812 100%);
  border: none;
  color: #0d1b3e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  outline: none;
}

.music-toggle-btn:hover {
  transform: scale(1.08);
}

.disc-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* Vinyl / Disc rotation when playing */
.music-player-widget.is-playing .disc-icon {
  animation: spin 3.5s linear infinite;
}

.music-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 108px;
}

.music-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.music-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.music-badge {
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.music-player-widget.is-playing .music-badge {
  background: rgba(128, 255, 219, 0.25);
  color: #80ffdb;
}

/* Animated Equalizer Bars */
.equalizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 12px;
}

.equalizer-bars .bar {
  width: 3px;
  background-color: var(--warm-gold);
  border-radius: 2px;
  height: 3px;
  transition: height 0.2s ease;
}

.music-player-widget.is-playing .equalizer-bars .bar1 {
  animation: eqBounce 0.8s infinite ease-in-out alternate;
}
.music-player-widget.is-playing .equalizer-bars .bar2 {
  animation: eqBounce 0.6s 0.2s infinite ease-in-out alternate;
}
.music-player-widget.is-playing .equalizer-bars .bar3 {
  animation: eqBounce 0.9s 0.4s infinite ease-in-out alternate;
}
.music-player-widget.is-playing .equalizer-bars .bar4 {
  animation: eqBounce 0.7s 0.1s infinite ease-in-out alternate;
}

@keyframes eqBounce {
  0% { height: 3px; }
  100% { height: 12px; }
}

.music-volume-btn {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s, transform 0.2s;
  outline: none;
}

.music-volume-btn:hover {
  color: #ffffff;
  transform: scale(1.1);
}

/* ==========================================================================
   Modal Dialog (Frosted Glassmorphism Card)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(13, 27, 62, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 2.2rem 2.4rem;
  color: var(--pure-white);
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.modal-close-btn:hover {
  color: var(--pure-white);
  background: rgba(255, 255, 255, 0.12);
}

/* Modal Headers */
.modal-header {
  text-align: center;
  margin-bottom: 1.6rem;
}

.modal-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--warm-gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.5);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--pure-white);
  text-shadow: 0 0 16px rgba(78, 168, 222, 0.5);
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.92rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.45;
}

/* Modal Form Controls */
.gift-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

/* Two-column row for Name + Email */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.02em;
}

.form-group label .req {
  color: var(--warm-gold);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  background: rgba(13, 27, 62, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: var(--pure-white);
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--cyan-mist);
  background: rgba(13, 27, 62, 0.65);
  box-shadow: 0 0 12px rgba(78, 168, 222, 0.4);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.field-error {
  font-size: 0.78rem;
  color: #ff8585;
  min-height: 1rem;
}

.form-status {
  padding: 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  background: rgba(139, 38, 38, 0.4);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: #ffcccc;
  text-align: center;
}

/* Submit Button ("Send to Santa") */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--festive-crimson);
  color: var(--pure-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 700;
  padding: 13px 24px;
  margin-top: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 38, 38, 0.5);
  transition: all 0.25s ease;
}

.submit-btn:hover:not(:disabled) {
  background: var(--crimson-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(168, 50, 50, 0.7);
}

.submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

/* Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success Confirmation State */
.success-section {
  text-align: center;
  padding: 1.5rem 0.5rem;
  animation: fadeIn 0.4s ease;
}

.success-sparkle {
  font-size: 3.2rem;
  margin-bottom: 0.8rem;
  animation: bounce 2s infinite ease-in-out;
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--warm-gold);
  margin-bottom: 0.8rem;
  text-shadow: 0 0 16px rgba(255, 209, 102, 0.6);
}

.success-message {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 1.8rem;
}

.modal-action-btn {
  background: var(--pure-white);
  color: var(--festive-crimson);
  border: none;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 11px 26px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.modal-action-btn:hover {
  background: #fff8f0;
  transform: translateY(-1px);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 992px) {
  .hero-content {
    padding: 0 2rem;
    justify-content: center;
  }
  .content-wrapper {
    max-width: 580px;
  }
  .top-brand {
    top: 1.4rem;
    left: 1.5rem;
  }
  .top-nav {
    top: 1.4rem;
    right: 1.5rem;
  }
}

@media (max-width: 640px) {
  .top-brand {
    top: 0.9rem;
    left: 0.9rem;
  }
  .brand-badge {
    padding: 0;
    gap: 8px;
  }
  .brand-logo-img {
    width: 32px;
    height: 32px;
  }
  .brand-title {
    font-size: 0.78rem;
  }
  .top-nav {
    top: 0.9rem;
    right: 0.9rem;
  }
  .register-gift-btn {
    padding: 4px 12px 4px 5px;
    font-size: 0.8rem;
    gap: 8px;
  }
  .ehc-logo-img {
    width: 32px;
    height: 32px;
  }
  .hero-content {
    padding: 0 1.2rem;
  }
  .content-wrapper {
    padding: 2rem 1.4rem;
    width: 100%;
  }
  .eyebrow-text {
    font-size: 0.82rem;
    letter-spacing: 0.16em;
  }
  .main-heading {
    font-size: 2.1rem;
    letter-spacing: 0.05em;
  }
  .club-subtitle {
    font-size: 0.92rem;
  }
  .subtitle-text {
    font-size: 0.96rem;
  }
  .modal-card {
    padding: 1.8rem 1.4rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .music-player-widget {
    bottom: 1rem;
    left: 1rem;
    padding: 6px 12px 6px 6px;
    gap: 8px;
  }
  .music-toggle-btn {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }
  .music-info {
    min-width: 85px;
  }
  .music-title {
    font-size: 0.76rem;
  }
}
