
:root { --primary: #3b82f6; --text: #000; }
* { box-sizing: border-box; }
body { 
  margin: 0; min-height: 100vh; display: flex; justify-content: center; 
  font-family: "Trebuchet MS", sans-serif; 
  background: linear-gradient(120deg, #a0d8f1, #f9f4e3); color: var(--text); 
}
.container { width: min(900px, 96vw); padding: 2rem 1rem; text-align: center; }
.card-box { width: 100%; background: #fff; border-radius: 20px; padding: 1.2rem; box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.hidden { display: none !important; }

/* --- ENVELOPE & CARD ANIMATIONS --- */
.viewer-body { display: flex; align-items: center; justify-content: center; padding: 20px; }

.card-container {
  perspective: 1000px;
  cursor: pointer;
  margin: 0 auto;
  width: min(100%, 400px);
}

.card-inner {
  position: relative;
  width: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card-container.flipped .card-inner { transform: rotateY(180deg); }

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  background: white;
  overflow: hidden;
}

.card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  background: #fff;
}

/* --- THEMES --- */
.theme-blue { --theme-bg: #eff6ff; }
.theme-pink { --theme-bg: #fdf2f8; }
.theme-green { --theme-bg: #f0fdf4; }
.theme-yellow { --theme-bg: #fefce8; }
.theme-sunset { --theme-bg: #fff7ed; }
.viewer-body[class*="theme-"] { background: var(--theme-bg); }

/* --- SHAPES --- */
.shape-rectangle .card-inner { height: 500px; }
.shape-square .card-inner { height: 350px; width: 350px; margin: 0 auto; }
.shape-tall .card-inner { height: 620px; }

/* --- FOOTER & UI --- */
.snoopy-signature {
  border-top: 2px dashed #cbd5e1;
  padding-top: 15px;
  font-size: 14px;
  font-weight: bold;
  color: #1e3a8a;
}
.message-content { font-size: 1.2rem; line-height: 1.5; color: #333; overflow-y: auto; }
.tap-hint { position: absolute; bottom: 10px; width: 100%; text-align: center; font-weight: bold; color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

/* Copy-paste the rest of your original button/input styles here */
.next-btn { background: #2563eb; color: #fff; padding: 0.8rem 1.2rem; border-radius: 10px; border:none; cursor:pointer; font-weight:700; width: 100%; }
.bubble-row { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.bubble span { width: 35px; height: 35px; border-radius: 50%; display: block; cursor: pointer; border: 2px solid transparent; }
.bubble input:checked + span { border-color: black; }