/* ==================================================
   MIMO DIGITAL — Cumpleaños V3: Unboxing de Regalo
   Desempaque de lujo con Tira de Fotocabina y Golden Ticket
   ================================================== */

:root {
  --bg-dark: #0b0914;
  --gold-primary: #f5c042;
  --gold-light: #fbe69e;
  --gold-dark: #b88619;
  --text-main: #f5f3ef;
  --text-muted: #9f9aab;
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-hand: 'Caveat', cursive, sans-serif;
  --font-mono: 'Space Mono', monospace;
}

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

body {
  background: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 20%, #201335 0%, var(--bg-dark) 75%);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-x: hidden;
  position: relative;
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100;
}

.unboxing-app {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 10;
}

/* ── FASE 1: La Caja de Regalo Cerrada ── */
.box-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.2rem;
  padding: 2.5rem 0;
  animation: fadeIn 0.6s ease;
}

.box-tag {
  display: inline-block;
  background: rgba(245, 192, 66, 0.15);
  border: 1px solid rgba(245, 192, 66, 0.4);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

.box-greeting {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.box-hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

/* Caja de Regalo 3D */
.gift-box-3d {
  width: 170px;
  height: 170px;
  position: relative;
  cursor: pointer;
  perspective: 600px;
  margin: 1rem 0;
  transition: transform 0.25s ease;
}

.gift-box-3d:hover {
  transform: scale(1.04);
}

.box-lid {
  position: absolute;
  top: 0;
  left: -5px;
  width: 180px;
  height: 48px;
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.2);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: top center;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
}

.ribbon-bow {
  font-size: 2.8rem;
  position: absolute;
  top: -32px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
  animation: bowBob 2.5s infinite ease-in-out;
}

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

.ribbon-vertical {
  width: 26px;
  height: 100%;
  background: linear-gradient(to right, #ffd54f, #ffb300, #ffd54f);
  box-shadow: 0 0 8px rgba(255, 213, 79, 0.4);
}

.box-base {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 170px;
  height: 130px;
  background: linear-gradient(145deg, #c62828, #8e0000);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ribbon-base-vert {
  position: absolute;
  width: 26px;
  height: 100%;
  background: linear-gradient(to right, #ffd54f, #ffb300, #ffd54f);
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.4);
}

.ribbon-base-horiz {
  position: absolute;
  width: 100%;
  height: 26px;
  background: linear-gradient(to bottom, #ffd54f, #ffb300, #ffd54f);
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.4);
}

.box-name-tag {
  position: absolute;
  bottom: 15px;
  right: 12px;
  background: #fffdf5;
  color: #2b1b08;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transform: rotate(-5deg);
  z-index: 4;
}

.open-box-btn {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #1b1202;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.95rem 2.2rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245, 192, 66, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.open-box-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(245, 192, 66, 0.5);
}

/* Animación de apertura de la tapa */
.gift-box-3d.opening .box-lid {
  transform: translateY(-90px) rotate(-22deg) scale(0.9);
  opacity: 0.3;
}


/* ── FASE 2: Objetos Desempacados ── */
.gift-unpacked-stage {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  animation: stageReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: 2rem;
}

@keyframes stageReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.unpacked-header {
  text-align: center;
  padding: 0.5rem 0;
}

.unpacked-badge {
  display: inline-block;
  background: rgba(245, 192, 66, 0.15);
  border: 1px solid rgba(245, 192, 66, 0.4);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.7rem;
}

.unpacked-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: #fff;
  line-height: 1.2;
}

.unpacked-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.unpacked-item {
  width: 100%;
  display: flex;
  justify-content: center;
}


/* ── OBJETO 1: Tarjeta de Felicitación Desplegable ── */
.greeting-card-wrapper {
  perspective: 800px;
}

.greeting-card {
  width: 100%;
  background: #fdfaf5;
  color: #241c10;
  border-radius: 12px;
  padding: 1.8rem 1.6rem;
  position: relative;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(220, 205, 180, 0.3);
  transform: rotate(-1deg);
  border: 1px solid #ebd9c0;
}

.card-pin {
  position: absolute;
  top: -12px;
  left: 24px;
  font-size: 1.4rem;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.3));
}

.card-stamp {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #b71c1c;
  border: 1.5px dashed #b71c1c;
  padding: 3px 7px;
  border-radius: 4px;
  transform: rotate(4deg);
}

.card-headline {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #63171b;
  margin-bottom: 1rem;
  margin-top: 0.4rem;
  line-height: 1.3;
}

.card-message-body {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.7;
  color: #3b3225;
  white-space: pre-line;
}

.card-signature-line {
  margin-top: 1.3rem;
  padding-top: 0.9rem;
  border-top: 1px dashed #d9cbba;
  text-align: right;
}

.card-sig-text {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  color: #7f1d1d;
  font-weight: 700;
}


/* ── OBJETO 2: Tira de Fotos de Fotocabina (Photo Booth Strip) ── */
.photo-strip-wrapper {
  margin: 0.5rem 0;
}

.photo-strip {
  width: 320px;
  max-width: 95%;
  background: #ffffff;
  color: #1a1a1a;
  padding: 1.2rem 1.1rem;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 2px 10px rgba(0, 0, 0, 0.2);
  transform: rotate(1.5deg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid #e5e5e5;
  position: relative;
}

.photo-strip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 40%);
  pointer-events: none;
  border-radius: 8px;
}

.strip-header {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-bottom: 0.4rem;
  border-bottom: 1.5px solid #222;
}

.strip-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #111;
}

.strip-star {
  color: #e53935;
  font-size: 0.7rem;
}

.strip-photos-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.strip-frame {
  background: #111;
  padding: 5px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}

.strip-img-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #2b2b2b;
  position: relative;
}

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

.strip-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #a0a0a0;
  font-size: 0.8rem;
  background: #1e1e1e;
}

.strip-frame-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #ddd;
  background: #111;
  padding: 6px 4px 2px;
  text-align: center;
  letter-spacing: 0.02em;
}

.strip-footer {
  text-align: center;
  padding-top: 0.6rem;
  border-top: 1px dashed #bbb;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.strip-barcode {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: #333;
}

.strip-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #777;
  letter-spacing: 0.08em;
}


/* ── OBJETO 3: Golden VIP Ticket / Voucher Troquelado ── */
.golden-ticket-wrapper {
  margin-top: 0.5rem;
}

.golden-ticket {
  width: 100%;
  background: linear-gradient(135deg, #f5d166 0%, #fff1b0 35%, #e0ab32 70%, #fae896 100%);
  color: #2b1d05;
  border-radius: 14px;
  padding: 1.5rem 1.6rem;
  position: relative;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 209, 102, 0.25);
  border: 1px solid #ffe89e;
  overflow: hidden;
}

/* Muescas troqueladas laterales */
.ticket-cutout {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  background: var(--bg-dark);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.7);
}

.ticket-cutout-left {
  left: -11px;
}

.ticket-cutout-right {
  right: -11px;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.8rem;
  border-bottom: 1.5px dashed rgba(43, 29, 5, 0.25);
  margin-bottom: 1rem;
}

.ticket-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: #2b1d05;
  color: #f5d166;
  padding: 3px 8px;
  border-radius: 4px;
}

.ticket-seal {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #573a0a;
}

.ticket-body {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.ticket-icon {
  font-size: 2.4rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.5);
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ticket-subtext {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #6e4a0d;
}

.ticket-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #2b1d05;
  font-weight: 700;
  margin: 0.2rem 0 0.4rem;
  line-height: 1.25;
}

.ticket-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #3f2c0c;
}

.ticket-footer {
  margin-top: 1.1rem;
  padding-top: 0.8rem;
  border-top: 1.5px dashed rgba(43, 29, 5, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #573a0a;
}

/* Pie final */
.unpacked-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
