/* ============================================
   GRADUATION INVITATION
   ============================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --cream: #FFF8F0;
  --cream-dark: #F5EDE3;
  --pink-light: #FFF0F5;
  --pink-mid: #F4B8C1;
  --pink-deep: #E8889A;
  --pink-dark: #D4697E;
  --sage-light: #E8F0E8;
  --sage-mid: #B8C9B0;
  --beige: #F5E6D3;
  --gold: #C9A96E;
  --gold-light: #E8D5A8;
  --gold-dark: #A8884E;
  --text-dark: #3A3A3A;
  --text-soft: #7A7A7A;
  --purple-soft: #EDE4F5;
  --white: #FFFFFF;

  --font-handwriting: 'Quicksand', 'Be Vietnam Pro', sans-serif;
  --font-elegant: 'Cormorant Garamond', 'Be Vietnam Pro', serif;
  --font-playful: 'Quicksand', 'Be Vietnam Pro', sans-serif;
  --font-body: 'Be Vietnam Pro', sans-serif;

  --font-display: clamp(2.5rem, 8vw, 5rem);
  --font-title: clamp(2rem, 6vw, 4rem);
  --font-subtitle: clamp(1.2rem, 3.5vw, 2rem);
  --font-body-size: clamp(1rem, 2.5vw, 1.3rem);
  --font-small: clamp(0.85rem, 2vw, 1rem);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background: #F0D6E8;
}

/* ---- Canvas Particles ---- */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* ---- Audio Button ---- */
.audio-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.audio-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.1);
}

.audio-icon {
  width: 22px;
  height: 22px;
}

.audio-btn .audio-off { display: none; }
.audio-btn.muted .audio-on { display: none; }
.audio-btn.muted .audio-off { display: block; }

/* ---- Scene Base ---- */
.scene {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.scene.active {
  opacity: 1;
  visibility: visible;
}

.scene-content {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.wishes-content,
.invitation-content,
.finale-content {
  justify-content: flex-start;
  padding-top: 2rem;
  padding-bottom: 3rem;
  min-height: auto;
}

/* ============================================
   SCENE 0: INTRO
   ============================================ */
#intro {
  background: linear-gradient(180deg, #E8D5F5 0%, #F0D6E8 25%, #F5E0EC 50%, #D5E8F5 75%, #E0F0F5 100%);
  overflow: hidden;
}

.stars-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Bokeh light orbs */
.bokeh {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.intro-badge {
  font-size: clamp(3rem, 10vw, 5rem);
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

.intro-text {
  font-family: var(--font-handwriting);
  font-size: var(--font-subtitle);
  color: var(--text-dark);
  text-align: center;
  line-height: 1.6;
  min-height: 2.5em;
  position: relative;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.5);
  white-space: pre-line;
}

.intro-text.typing::after {
  content: '|';
  animation: blink-cursor 0.7s step-end infinite;
  color: var(--pink-deep);
  margin-left: 2px;
}

.tap-prompt {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
}

.tap-circle {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(232, 136, 154, 0.4);
  border-radius: 50%;
  animation: pulse-ring 2s ease-in-out infinite;
  position: relative;
}

.tap-circle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--pink-deep);
  border-radius: 50%;
}

.tap-label {
  font-family: var(--font-body);
  font-size: var(--font-small);
  color: rgba(122, 122, 122, 0.8);
  letter-spacing: 2px;
}

/* ============================================
   SCENE 1: ENVELOPE
   ============================================ */
#envelope {
  background: linear-gradient(135deg, #FFF8F0 0%, #F5EDE3 30%, #E8F0E8 70%, #FFF0F5 100%);
}

.envelope-subtitle {
  font-family: var(--font-handwriting);
  font-size: var(--font-subtitle);
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  opacity: 0;
}

.envelope-wrapper {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  perspective: 800px;
}

.envelope-svg {
  width: min(85vw, 300px);
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.1));
  transform-style: preserve-3d;
  transition: width 0.3s ease;
}

.envelope-flap-group {
  transform-origin: 50% 23%;
  transform-style: preserve-3d;
}

.envelope-hint {
  font-family: var(--font-handwriting);
  font-size: var(--font-small);
  color: var(--text-soft);
  animation: float 3s ease-in-out infinite;
}

/* Letter content */
.letter-content {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.5rem;
  opacity: 0;
  visibility: hidden;
  background: rgba(255, 248, 240, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.letter-content.visible {
  opacity: 1;
  visibility: visible;
}

.letter-paper {
  background: white;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  border: 1px solid rgba(201, 169, 110, 0.2);
  text-align: center;
  margin: auto 0;
  flex-shrink: 0;
}

.letter-header {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.letter-text {
  font-family: var(--font-elegant);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text-dark);
  line-height: 1.6;
  text-align: left;
  white-space: pre-line;
  min-height: 120px;
}

.letter-text.typing::after {
  content: '|';
  animation: blink-cursor 0.7s step-end infinite;
  color: var(--gold);
  margin-left: 2px;
}

.letter-footer {
  margin-top: 0.75rem;
  text-align: right;
  visibility: hidden;
}

.letter-signature {
  font-family: var(--font-handwriting);
  font-size: var(--font-body-size);
  color: var(--gold-dark);
  font-weight: 700;
}

.letter-content .btn-continue {
  margin-top: 0.75rem;
  opacity: 0;
}

/* ============================================
   SCENE 2: INVITATION DETAILS
   ============================================ */
#invitation {
  background: linear-gradient(180deg, #FFF8F0 0%, #F5E6D3 50%, #FFF0F5 100%);
}

.invitation-card {
  background: var(--white);
  border-radius: 20px;
  padding: 1.5rem 1.5rem 1rem;
  max-width: 360px;
  width: 90%;
  height: 78vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 20px 60px rgba(201, 169, 110, 0.15),
    0 0 0 1px rgba(201, 169, 110, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.invitation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-light));
}

.invitation-badge {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.invitation-title {
  font-family: var(--font-playful);
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.invitation-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 0.75rem;
}

.invitation-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  overflow: hidden;
  border: 3px solid var(--gold-light);
  background: linear-gradient(135deg, var(--cream), var(--sage-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
}

.invitation-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invitation-name {
  font-family: var(--font-playful);
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.invitation-school {
  font-family: var(--font-handwriting);
  font-size: var(--font-small);
  color: var(--text-soft);
  margin-bottom: 0.25rem;
}

.invitation-degree {
  font-family: var(--font-handwriting);
  font-size: var(--font-small);
  color: var(--gold-dark);
  margin-bottom: 0.75rem;
}

.invitation-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--cream);
  border-radius: 10px;
  border: 1px solid rgba(201, 169, 110, 0.1);
}

.detail-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.detail-text {
  font-family: var(--font-handwriting);
  font-size: var(--font-small);
  color: var(--text-dark);
  text-align: left;
  white-space: pre-line;
}

.invitation-card .btn-continue {
  margin-top: 0.5rem;
  opacity: 0;
}

/* ============================================
   SCENE 3: POLAROID MEMORIES
   ============================================ */
#polaroid {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
}

.polaroid-content {
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
  position: relative;
}

.polaroid-title {
  font-family: var(--font-playful);
  font-size: var(--font-title);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.25rem;
  text-align: center;
}

.polaroid-subtitle {
  font-family: var(--font-handwriting);
  font-size: var(--font-small);
  color: rgba(201, 169, 110, 0.7);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ---- Slider ---- */
.polaroid-slider {
  width: 100%;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
}

.polaroid-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* ---- Polaroid Card ---- */
.polaroid-card {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
}

.polaroid-frame {
  background: white;
  padding: 0.75rem 0.75rem 2.5rem 0.75rem;
  border-radius: 3px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: rotate(var(--rotation, 0deg));
  transition: transform 0.4s ease;
  max-width: 280px;
  width: 100%;
}

.polaroid-frame:hover {
  transform: rotate(0deg) scale(1.02);
}

.polaroid-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f0e6ff 0%, #ffe6f0 50%, #e6f0e8 100%);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.polaroid-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.polaroid-placeholder {
  font-size: 3rem;
  opacity: 0.5;
  user-select: none;
}

.polaroid-caption {
  font-family: var(--font-handwriting);
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  color: var(--text-dark);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.5;
  min-height: 1.5em;
}

.polaroid-date {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-soft);
  text-align: center;
  margin-top: 0.3rem;
  letter-spacing: 1px;
}

/* ---- Dots ---- */
.polaroid-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.polaroid-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.polaroid-dot.active {
  background: var(--gold);
  transform: scale(1.3);
}

/* ---- Arrows ---- */
.polaroid-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
  backdrop-filter: blur(5px);
}

.polaroid-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}

.polaroid-prev { left: 0.5rem; }
.polaroid-next { right: 0.5rem; }

.polaroid-next-btn {
  margin-top: 1.5rem;
  opacity: 0;
  pointer-events: none;
}

.polaroid-next-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   SCENE 4: WISH CARDS
   ============================================ */
#wishes {
  background: linear-gradient(180deg, #e8f4f8 0%, #b8d8e8 40%, #7cb8d0 70%, #5a9bb5 100%);
}

.wishes-title {
  font-family: var(--font-playful);
  font-size: var(--font-title);
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  text-align: center;
}

.wishes-subtitle {
  font-family: var(--font-handwriting);
  font-size: var(--font-small);
  color: var(--text-soft);
  margin-bottom: 1rem;
  text-align: center;
}

.wishes-progress {
  margin-bottom: 1rem;
  text-align: center;
}

.wishes-count {
  font-family: var(--font-handwriting);
  font-size: var(--font-small);
  color: #2a6e85;
  background: rgba(255, 255, 255, 0.5);
  padding: 0.3rem 1rem;
  border-radius: 20px;
}

/* ---- Bottle Sea ---- */
.bottle-sea {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 400px;
}

.bottle-item {
  width: 150px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease;
}

.bottle-item:hover {
  transform: translateY(-4px);
}

.bottle-item.opened {
  pointer-events: none;
}

.bottle-icon {
  font-size: 4.5rem;
  display: block;
  animation: bottle-float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.bottle-item:nth-child(2) .bottle-icon { animation-delay: -0.75s; }
.bottle-item:nth-child(3) .bottle-icon { animation-delay: -1.5s; }
.bottle-item:nth-child(4) .bottle-icon { animation-delay: -2.25s; }

.bottle-label {
  font-family: var(--font-handwriting);
  font-size: var(--font-small);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.35rem;
}

@keyframes bottle-float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

/* ---- Message Overlay ---- */
.bottle-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1.5rem;
}

.bottle-message {
  background: #fdf6e3;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  background-image:
    repeating-linear-gradient(
      transparent, transparent 27px, rgba(201, 169, 110, 0.15) 28px
    );
}

.bottle-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #d4a574, #c9a96e, #d4a574);
  border-radius: 8px 8px 0 0;
}

.bottle-msg-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.bottle-msg-text {
  font-family: var(--font-elegant);
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  color: var(--text-dark);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.bottle-msg-close {
  background: linear-gradient(135deg, #7cb8d0, #5a9bb5);
  color: white;
  border: none;
  padding: 0.6rem 2rem;
  border-radius: 20px;
  font-family: var(--font-handwriting);
  font-size: var(--font-body-size);
  cursor: pointer;
  transition: transform 0.2s;
}

.bottle-msg-close:active {
  transform: scale(0.95);
}

.wishes-next-btn {
  margin-top: 1.25rem;
  opacity: 0;
  pointer-events: none;
}

.wishes-next-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   SCENE 5: FINALE
   ============================================ */
#finale {
  background: linear-gradient(180deg, #FFF0F5 0%, #FFF8F0 30%, #E8F0E8 60%, #FFF0F5 100%);
}

.finale-title {
  font-family: var(--font-playful);
  font-size: clamp(2rem, 7vw, 4rem);
  color: var(--gold-dark);
  text-align: center;
  text-shadow: 0 2px 10px rgba(201, 169, 110, 0.2);
  margin-bottom: 1.25rem;
}

/* ---- Countdown ---- */
.countdown-wrapper {
  text-align: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.countdown-title {
  font-family: var(--font-handwriting);
  font-size: var(--font-body-size);
  color: var(--text-soft);
  margin-bottom: 0.75rem;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.countdown-value {
  font-family: var(--font-playful);
  font-size: clamp(1.8rem, 6vw, 3rem);
  color: var(--gold-dark);
  background: var(--white);
  border: 2px solid var(--gold-light);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  min-width: 3.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(201, 169, 110, 0.1);
}

.countdown-label {
  font-family: var(--font-handwriting);
  font-size: var(--font-small);
  color: var(--text-soft);
}

.countdown-complete {
  font-family: var(--font-playful);
  font-size: var(--font-subtitle);
  color: var(--gold-dark);
  text-align: center;
  padding: 1rem;
}

/* ---- Final Message ---- */
.finale-message-wrapper {
  max-width: 400px;
  width: 100%;
  text-align: center;
  margin-bottom: 1.5rem;
}

.finale-text {
  font-family: var(--font-handwriting);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 60px;
  white-space: pre-line;
}

.finale-text.typing::after {
  content: '|';
  animation: blink-cursor 0.7s step-end infinite;
  color: var(--gold);
  margin-left: 2px;
}

/* ---- Action Cards ---- */
.finale-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  font-family: var(--font-body);
  font-size: inherit;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 169, 110, 0.15);
  border-color: var(--gold);
}

.action-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(201, 169, 110, 0.1);
}

.action-icon {
  font-size: 1.5rem;
}

.action-text {
  font-family: var(--font-handwriting);
  font-size: var(--font-small);
  color: var(--text-soft);
}

/* ---- Floating Hearts ---- */
.finale-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.btn-replay {
  margin-top: 1.5rem;
  background: transparent;
  border: 2px solid var(--gold-light);
  color: var(--gold-dark);
  font-family: var(--font-body);
  font-size: var(--font-small);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
}

.btn-replay:hover {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}

/* ---- Credit Badge ---- */
.credit-badge {
  position: fixed;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 50;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: rgba(122, 122, 122, 0.6);
  display: flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.credit-badge:hover {
  color: var(--gold-dark);
  transform: translateY(-1px);
}

.credit-badge svg {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.credit-badge:hover svg {
  opacity: 1;
}

.credit-badge strong {
  font-weight: 600;
}

/* ============================================
   SHARED COMPONENTS
   ============================================ */
.btn-continue {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: white;
  border: none;
  border-radius: 30px;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: var(--font-body-size);
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 48px;
  box-shadow: 0 4px 15px rgba(201, 169, 110, 0.3);
}

.btn-continue:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 169, 110, 0.4);
}

.btn-continue:active {
  transform: translateY(0);
}

.section-subtitle {
  text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ---- Small mobile (≤ 380px) ---- */
@media (max-width: 380px) {
  .scene-content {
    padding: 1.5rem 1rem;
  }

  .letter-paper {
    padding: 1.5rem 1rem;
  }

  .invitation-card {
    padding: 1.5rem 1rem;
  }

  .countdown-grid {
    gap: 0.5rem;
  }

  .countdown-value {
    min-width: 3rem;
    padding: 0.4rem 0.5rem;
  }
}

/* ---- Tablet (768px+) ---- */
@media (min-width: 768px) {
  .scene-content {
    max-width: 600px;
    padding: 3rem 2.5rem;
  }

  .envelope-svg {
    width: 360px;
  }

  .letter-paper {
    max-width: 500px;
    padding: 3rem 2.5rem;
  }

  .letter-text {
    font-size: 1.3rem;
  }

  .invitation-card {
    max-width: 460px;
  }

  .polaroid-frame {
    max-width: 360px;
    padding: 1rem 1rem 3rem 1rem;
  }

  .polaroid-caption {
    font-size: 1.15rem;
  }

  .polaroid-arrow {
    display: flex;
    width: 48px;
    height: 48px;
    font-size: 1.8rem;
  }

  .btn-continue {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
  }

  .finale-message-wrapper {
    max-width: 500px;
  }

  .finale-text {
    font-size: 1.3rem;
  }
}

/* ---- Desktop (1024px+) ---- */
@media (min-width: 1024px) {
  .scene-content {
    max-width: 700px;
    padding: 3rem;
  }

  .envelope-svg {
    width: 400px;
  }

  .envelope-subtitle {
    font-size: 1.8rem;
  }

  .letter-content {
    padding: 3rem;
  }

  .letter-paper {
    max-width: 560px;
    padding: 3.5rem 3rem;
  }

  .letter-text {
    font-size: 1.4rem;
  }

  .letter-header {
    font-size: 2.5rem;
  }

  .invitation-card {
    max-width: 460px;
  }

  .wishes-title {
    font-size: 2.8rem;
  }

  .polaroid-frame {
    max-width: 420px;
    padding: 1.25rem 1.25rem 3.5rem 1.25rem;
  }

  .polaroid-caption {
    font-size: 1.25rem;
    margin-top: 1rem;
  }

  .polaroid-date {
    font-size: 0.8rem;
  }

  .polaroid-prev { left: 1.5rem; }
  .polaroid-next { right: 1.5rem; }

  .intro-text {
    font-size: 1.8rem;
  }

  .finale-title {
    font-size: 4.5rem;
  }

  .finale-message-wrapper {
    max-width: 560px;
  }

  .finale-text {
    font-size: 1.4rem;
  }

  .btn-continue:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(201, 169, 110, 0.4);
  }

  .btn-replay:hover {
    transform: translateY(-2px);
  }
}

/* ---- Large Desktop (1440px+) ---- */
@media (min-width: 1440px) {
  .scene-content {
    max-width: 800px;
  }

  .envelope-svg {
    width: 440px;
  }

  .letter-paper {
    max-width: 620px;
  }

  .scratch-grid {
    max-width: 440px;
  }

  .polaroid-frame {
    max-width: 480px;
  }

  .invitation-card {
    max-width: 460px;
  }

  .finale-title {
    font-size: 5rem;
  }

  .finale-message-wrapper {
    max-width: 620px;
  }
}

/* ---- Landscape mobile hint ---- */
@media (max-height: 500px) and (orientation: landscape) {
  .scene-content::before {
    content: 'Vui lòng xoay dọc màn hình 📱';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    color: white;
    font-family: var(--font-body);
    font-size: 1.1rem;
    text-align: center;
    line-height: 100vh;
    z-index: 9999;
  }
}
