/* ==========================================================================
   Design Tokens & Core Elements
   ========================================================================== */
:root {
  --primary-color: #ff85a1;
  --secondary-color: #ffb3c6;
  --accent-color: #ff477e;
  --bg-glow: #fff0f3;
  --gold-accent: #d4af23;
  --gold-light: rgba(212, 175, 35, 0.2);
  --text-dark: #4a3e41;
  --text-light: #8a7a7e;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-shadow: 0 15px 40px rgba(255, 133, 161, 0.18);
  --soft-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --elastic-transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: #ffccd5;
}

body {
  font-family: 'Comfortaa', sans-serif;
  color: var(--text-dark);
  background: radial-gradient(circle, var(--bg-glow) 0%, #ffe5ec 60%, #ffccd5 100%) no-repeat fixed;
  background-color: #ffccd5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Fallback background canvas for petals */
#petalCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   Floating Music Button (Vinyl Style)
   ========================================================================== */
.music-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #111;
  border: 2px solid #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 100;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--elastic-transition);
}

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

.vinyl-disk {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: 
    radial-gradient(circle, #ff85a1 24%, transparent 26%),
    radial-gradient(circle, #222 30%, #111 60%, #000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.vinyl-disk::before {
  content: '';
  position: absolute;
  width: 80%;
  height: 80%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.vinyl-center {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

/* Rotate animation for Vinyl */
.rotating {
  animation: spinVinyl 3.5s linear infinite;
}

@keyframes spinVinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Intro Screen: Envelope Design
   ========================================================================== */
.intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, var(--bg-glow) 0%, #ffccd5 100%);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.envelope-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  z-index: 55;
  perspective: 1000px;
}

.envelope {
  position: relative;
  width: 300px;
  height: 190px;
  background-color: var(--secondary-color);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 15px 35px rgba(255, 71, 126, 0.15);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.envelope:hover {
  transform: translateY(-5px);
}

.flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 150px solid transparent;
  border-right: 150px solid transparent;
  border-top: 105px solid var(--primary-color);
  transform-origin: top;
  z-index: 3;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), z-index 0.2s;
  border-radius: 4px 4px 0 0;
}

.pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 150px solid #ff758f;
  border-right: 150px solid #ff758f;
  border-bottom: 95px solid #ff5c7d;
  border-top: 95px solid transparent;
  border-radius: 0 0 12px 12px;
  z-index: 4;
}

.letter-preview {
  position: absolute;
  bottom: 10px;
  left: 15px;
  width: 270px;
  height: 140px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  z-index: 2;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.letter-line {
  height: 8px;
  background: #f0e2e5;
  border-radius: 4px;
  width: 100%;
}

.letter-line.short {
  width: 60%;
}

.seal {
  position: absolute;
  top: 85px;
  left: calc(50% - 25px);
  width: 50px;
  height: 50px;
  background-color: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(255, 71, 126, 0.4);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--elastic-transition);
}

.heart-seal {
  font-size: 26px;
  color: #fff;
  line-height: 1;
  animation: pulseSeal 1.8s infinite;
}

/* Opening Envelope States */
.envelope.open .flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope.open .letter-preview {
  transform: translateY(-80px) scale(1.02);
  z-index: 5;
  transition-delay: 0.35s;
}

.envelope.open .seal {
  transform: scale(0) rotate(-45deg);
  opacity: 0;
  pointer-events: none;
}

.intro-hint {
  font-size: 14px;
  color: #9c6c77;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.5px;
  animation: floatHint 2s infinite ease-in-out;
}

@keyframes pulseSeal {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes floatHint {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

/* ==========================================================================
   Main Postcard Card Component
   ========================================================================== */
.card-container {
  position: relative;
  width: 90%;
  max-width: 440px;
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  padding: 30px 24px;
  z-index: 10;
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.card-container.reveal {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.card-border {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1.5px solid rgba(212, 175, 35, 0.35);
  border-radius: 18px;
  pointer-events: none;
}

.card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 12;
}

/* Decorative Badge */
.top-badge {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1.5px dashed rgba(255, 133, 161, 0.7);
  border-radius: 50%;
  animation: spinRing 25s linear infinite;
}

.badge-ring::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border: 1.5px solid rgba(255, 182, 193, 0.45);
  border-radius: 50%;
}

.badge-number {
  font-size: 22px;
  font-weight: 700;
  color: #ff5c7d;
  text-shadow: 0 1px 3px rgba(255, 92, 125, 0.15);
  animation: floatBadgeNumber 2s infinite ease-in-out;
}

@keyframes floatBadgeNumber {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

.badge-heart {
  font-size: 26px;
  color: var(--accent-color);
  animation: heartBeat 1.4s infinite ease-in-out;
}

.main-title {
  font-size: 21px;
  font-weight: 700;
  color: #7b4f57;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
  line-height: 1.4;
}

.corrected-number {
  position: relative;
  display: inline-block;
  margin: 0 4px;
}

.original-number {
  position: relative;
  display: inline-block;
}

.original-number::after {
  content: '';
  position: absolute;
  left: -2px;
  width: calc(100% + 4px);
  top: 48%;
  height: 2.5px;
  background-color: #ff4757;
  transform: rotate(-22deg);
  border-radius: 1.5px;
}

.correction {
  position: absolute;
  top: -24px;
  left: -2px;
  font-family: 'Caveat', cursive;
  font-size: 28px;
  color: #ff4757;
  font-weight: 700;
  transform: rotate(-10deg);
  white-space: nowrap;
}

.main-intro {
  font-size: 13.5px;
  color: var(--text-light);
  text-align: center;
  max-width: 90%;
  margin-bottom: 18px;
  line-height: 1.5;
}

.gold-divider {
  width: 82%;
  height: 1px;
  border-top: 1.5px dotted rgba(212, 175, 35, 0.45);
  margin-bottom: 22px;
}

/* ==========================================================================
   Polaroid Photo System
   ========================================================================== */
.polaroid-wrapper {
  perspective: 1000px;
  margin-bottom: 22px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.polaroid-card {
  position: relative;
  width: 250px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  transform: rotate(0deg);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.15),
              background-color 0.4s ease,
              padding 0.4s ease,
              box-shadow 0.4s ease,
              border 0.4s ease;
  transform-style: preserve-3d;
}

.polaroid-card.polaroid-active {
  background: #fff;
  padding: 12px 12px 20px 12px;
  border-radius: 2px;
  box-shadow: 
    0 1px 3px rgba(0,0,0,0.05),
    0 10px 25px rgba(255, 133, 161, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transform: rotate(-1.5deg);
}

.polaroid-card.polaroid-active:hover {
  transform: scale(1.03) rotate(0.5deg);
}

.polaroid-image-container {
  position: relative;
  width: 100%;
  height: 226px;
  background-color: transparent;
  overflow: hidden;
  border: none;
  transition: background-color 0.4s ease, border 0.4s ease;
}

.polaroid-card.polaroid-active .polaroid-image-container {
  background-color: #f7eff1;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.polaroid-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
}

.polaroid-card.polaroid-active .polaroid-image-container img {
  object-fit: cover;
}

.polaroid-image-container img.fade {
  opacity: 0;
}

/* Loading spinner inside polaroid */
.polaroid-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.polaroid-loader.loading {
  opacity: 1;
}

.loader-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--secondary-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

.polaroid-caption {
  font-family: 'Caveat', cursive;
  font-size: 23px;
  color: #3b2c30;
  text-align: center;
  margin-top: 14px;
  min-height: 35px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}

.polaroid-card.polaroid-active .polaroid-caption {
  display: flex;
}

/* Photo Switch Transitions */
.card-rotate-left {
  transform: scale(0.9) rotate(-10deg) translate(-30px, -10px);
  opacity: 0.5;
}

.card-rotate-right {
  transform: scale(0.9) rotate(10deg) translate(30px, -10px);
  opacity: 0.5;
}

/* ==========================================================================
   Interactive Control Buttons
   ========================================================================== */
.controls-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  width: 100%;
}

.emoji-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid rgba(255, 133, 161, 0.25);
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(255, 133, 161, 0.08);
  transition: var(--elastic-transition);
}

.btn-emoji {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.emoji-btn:hover {
  transform: translateY(-3px);
  border-color: var(--primary-color);
}

.emoji-btn:hover .btn-emoji {
  transform: scale(1.15);
}

/* Active control button style */
.emoji-btn.active {
  transform: scale(1.15);
  border: 2px solid var(--gold-accent);
  box-shadow: 0 4px 12px var(--gold-light), 0 0 0 3px rgba(212, 175, 35, 0.15);
}

.emoji-btn.active .btn-emoji {
  animation: pulseActiveEmoji 1s infinite ease-in-out;
}

/* Indicator line under selected button */
.emoji-btn.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  width: 8px;
  height: 8px;
  background-color: var(--gold-accent);
  border-radius: 50%;
}

/* ==========================================================================
   Bottom Dynamic Wish Box
   ========================================================================== */
.wish-box {
  width: 100%;
  background: rgba(255, 240, 243, 0.55);
  border: 1.5px dashed rgba(212, 175, 35, 0.32);
  border-radius: 16px;
  padding: 16px 20px;
  box-sizing: border-box;
  text-align: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.wish-title {
  font-size: 15px;
  font-weight: 700;
  color: #7b4f57;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wish-text {
  font-size: 12.5px;
  color: var(--text-dark);
  line-height: 1.6;
}

#wishExtraImgContainer {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}

#wishExtraImg {
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(255, 133, 161, 0.15));
  animation: floatExtraImg 3s infinite ease-in-out;
}

@keyframes floatExtraImg {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */
@keyframes spinRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  70% { transform: scale(1); }
}

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

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

/* Responsive adjustments for Mobile & iPhone devices */
@media (max-width: 430px) {
  .card-container {
    width: 92%;
    padding: 18px 16px;
    border-radius: 20px;
  }
  
  .top-badge {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }
  
  .badge-number {
    font-size: 18px;
  }
  
  .main-title {
    font-size: 17px;
    margin-bottom: 8px;
  }
  
  .main-intro {
    font-size: 12.5px;
    margin-bottom: 14px;
    max-width: 95%;
  }
  
  .gold-divider {
    margin-bottom: 16px;
  }
  
  .polaroid-card {
    width: 210px;
  }
  
  .polaroid-image-container {
    height: 180px;
  }
  
  .polaroid-caption {
    font-size: 19px;
    min-height: 30px;
    margin-top: 10px;
  }
  
  .controls-row {
    gap: 6px;
    margin-bottom: 16px;
  }
  
  .emoji-btn {
    width: 34px;
    height: 34px;
  }
  
  .btn-emoji {
    font-size: 15px;
  }
  
  .wish-box {
    padding: 10px 14px;
    border-radius: 12px;
  }
  
  .wish-title {
    font-size: 13.5px;
    margin-bottom: 6px;
  }
  
  .wish-text {
    font-size: 11.5px;
  }
  
  #wishExtraImg {
    max-width: 80px;
    max-height: 80px;
  }
}

/* Height-based responsive scaling (critical for Safari on iPhone) */
@media (max-height: 745px) {
  .card-container {
    padding: 14px 16px;
    border-radius: 18px;
  }
  
  .top-badge {
    width: 44px;
    height: 44px;
    margin-bottom: 6px;
  }
  
  .badge-number {
    font-size: 16px;
  }
  
  .main-title {
    font-size: 16px;
    margin-bottom: 6px;
  }
  
  .main-intro {
    font-size: 12px;
    margin-bottom: 8px;
  }
  
  .gold-divider {
    margin-bottom: 10px;
  }
  
  .polaroid-wrapper {
    margin-bottom: 12px;
  }
  
  .polaroid-card {
    width: 170px;
  }
  
  .polaroid-card.polaroid-active {
    padding: 8px 8px 12px 8px;
  }
  
  .polaroid-image-container {
    height: 140px;
  }
  
  .polaroid-caption {
    font-size: 16px;
    min-height: 24px;
    margin-top: 6px;
  }
  
  .instructions-overlay {
    margin-bottom: 6px;
    height: 24px;
  }
  
  .instructions-text {
    font-size: 17px;
  }
  
  .controls-row {
    margin-bottom: 10px;
    gap: 5px;
  }
  
  .emoji-btn {
    width: 28px;
    height: 28px;
  }
  
  .btn-emoji {
    font-size: 13px;
  }
  
  .wish-box {
    padding: 8px 12px;
  }
  
  .wish-title {
    font-size: 13px;
    margin-bottom: 4px;
  }
  
  .wish-text {
    font-size: 11px;
    line-height: 1.5;
  }
  
  #wishExtraImgContainer {
    margin-top: 8px;
  }
  
  #wishExtraImg {
    max-width: 60px;
    max-height: 60px;
  }
  
  .envelope-wrapper {
    gap: 15px;
  }
  
  .envelope {
    width: 280px;
    height: 177px;
  }
  
  .flap {
    border-left-width: 140px;
    border-right-width: 140px;
    border-top-width: 98px;
  }
  
  .pocket {
    border-left-width: 140px;
    border-right-width: 140px;
    border-bottom-width: 88px;
    border-top-width: 88px;
  }
  
  .letter-preview {
    width: 250px;
    height: 130px;
    left: 15px;
  }
  
  .seal {
    top: 75px;
  }
}


/* Instructions Overlay */
.instructions-overlay {
  margin-top: -6px;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 38px;
  max-height: 38px;
  opacity: 1;
  transition: opacity 0.4s ease, max-height 0.4s ease, margin-bottom 0.4s ease, margin-top 0.4s ease;
  z-index: 10;
}

.instructions-overlay.fade-out {
  opacity: 0;
  max-height: 0;
  height: 0;
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.instructions-text {
  color: #ff4757;
  font-family: 'Caveat', cursive;
  font-size: 21px;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 3px 14px;
  border-radius: 16px;
  text-shadow: 0 1px 2px rgba(255, 71, 126, 0.1);
  animation: bounceText 1.4s infinite ease-in-out;
  pointer-events: none;
  white-space: nowrap;
  border: 1.5px solid rgba(255, 133, 161, 0.22);
  box-shadow: 0 4px 10px rgba(255, 133, 161, 0.08);
}

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

/* ==========================================================================
   Auth Modal & Overlay Styles
   ========================================================================== */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 229, 236, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.5s ease;
  will-change: opacity;
}

.auth-modal {
  width: 90%;
  max-width: 360px;
  background: var(--card-bg);
  border: 1.5px solid rgba(255, 133, 161, 0.3);
  border-radius: 24px;
  padding: 30px 24px;
  box-shadow: var(--card-shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: transform, opacity;
}

@keyframes modalPop {
  from {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.auth-heart {
  font-size: 40px;
  margin-bottom: 12px;
  animation: heartBeat 1.5s infinite ease-in-out;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: #7b4f57;
  margin-bottom: 8px;
}

.auth-desc {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.5;
}

.auth-input-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 8px;
}

.auth-input-wrapper input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 133, 161, 0.3);
  background: rgba(255, 255, 255, 0.8);
  font-family: 'Comfortaa', sans-serif;
  font-size: 16px;
  text-align: center;
  color: var(--text-dark);
  outline: none;
  transition: var(--soft-transition);
}

.auth-input-wrapper input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 133, 161, 0.15);
  background: #fff;
}

.auth-input-wrapper input::placeholder {
  color: rgba(74, 62, 65, 0.3);
}

.auth-error {
  font-size: 12px;
  color: #ff4757;
  margin-bottom: 16px;
  font-weight: 600;
  animation: fadeInError 0.3s ease;
}

@keyframes fadeInError {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-submit-btn {
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: #fff;
  font-family: 'Comfortaa', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(255, 71, 126, 0.3);
  transition: var(--elastic-transition);
  outline: none;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 71, 126, 0.4);
}

.auth-submit-btn:active {
  transform: translateY(1px);
}

/* Shake Animation for incorrect date entry */
.shake {
  animation: shakeModal 0.4s ease-in-out;
}

@keyframes shakeModal {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Performance Optimizations (Compositor Hints) */
.intro-screen {
  will-change: opacity, transform;
}
.envelope {
  will-change: transform;
}
.flap {
  will-change: transform;
}
.letter-preview {
  will-change: transform;
}
.seal {
  will-change: transform, opacity;
}
.card-container {
  will-change: opacity, transform;
}
.polaroid-card {
  will-change: transform, opacity;
}
.vinyl-disk {
  will-change: transform;
}
.auth-overlay {
  will-change: opacity;
}
.auth-modal {
  will-change: transform, opacity;
}

