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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #1a1f36;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 600px;
  background: #1e2444;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

/* === SCENE === */
.scene {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  background: linear-gradient(180deg, #0f1730 0%, #1a2550 40%, #2a3a6e 70%, #3d5291 100%);
}

#snowCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

/* Moon */
.moon {
  position: absolute;
  top: 35px;
  right: 60px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #f5ecd7;
  box-shadow: 0 0 30px 10px rgba(245,236,215,0.3), 0 0 60px 20px rgba(245,236,215,0.15);
}

/* Stars */
.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}
.star-1 { top: 25px; left: 15%; animation-delay: 0s; }
.star-2 { top: 60px; left: 35%; animation-delay: 0.8s; }
.star-3 { top: 40px; left: 55%; animation-delay: 1.6s; }
.star-4 { top: 80px; left: 75%; animation-delay: 0.4s; }
.star-5 { top: 20px; left: 85%; animation-delay: 2.1s; }

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

/* Mountains */
.mountain {
  position: absolute;
  bottom: 90px;
  width: 0;
  height: 0;
  border-style: solid;
}
.mountain-1 {
  left: -40px;
  border-width: 0 180px 160px 180px;
  border-color: transparent transparent #222b4e transparent;
}
.mountain-2 {
  right: -60px;
  border-width: 0 200px 140px 200px;
  border-color: transparent transparent #1e2645 transparent;
}

/* Trees */
.tree {
  position: absolute;
  bottom: 80px;
  z-index: 3;
}
.tree::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  background: #3d2c1a;
}
.tree::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-style: solid;
  border-color: transparent transparent transparent transparent;
}

/* Far trees (smaller, darker) */
.tree-far-1, .tree-far-2, .tree-far-3 {
  z-index: 2;
}
.tree-far-1 { left: 5%; }
.tree-far-2 { left: 22%; }
.tree-far-3 { right: 8%; }

.tree-far-1::after, .tree-far-2::after, .tree-far-3::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 60px solid #1a3a2a;
}
.tree-far-1::before, .tree-far-2::before, .tree-far-3::before {
  height: 8px;
}

/* Near trees */
.tree-near-1 { left: -2%; z-index: 5; }
.tree-near-2 { left: 12%; z-index: 5; }
.tree-near-3 { right: 5%; z-index: 5; }
.tree-near-4 { right: 18%; z-index: 5; }

.tree-near-1::after, .tree-near-2::after, .tree-near-3::after, .tree-near-4::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 28px solid transparent;
  border-right: 28px solid transparent;
  border-bottom: 85px solid #1f4a32;
}
.tree-near-1::before, .tree-near-2::before, .tree-near-3::before, .tree-near-4::before {
  height: 12px;
}

/* Snow caps on trees */
.tree-near-1::after { border-bottom-color: #1f4a32; }
.tree-near-2::after { border-bottom-color: #1b4530; }
.tree-near-3::after { border-bottom-color: #1f4a32; }
.tree-near-4::after { border-bottom-color: #1b4530; }

/* Cabin */
.cabin {
  position: absolute;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
}

.cabin-body {
  position: relative;
}

.cabin-roof {
  width: 0;
  height: 0;
  border-left: 80px solid transparent;
  border-right: 80px solid transparent;
  border-bottom: 45px solid #5c3a1e;
  position: relative;
  z-index: 2;
}
.cabin-roof::after {
  content: '';
  position: absolute;
  top: 10px;
  left: -75px;
  right: -75px;
  height: 8px;
  background: #e8e0d8;
  border-radius: 4px;
}

.cabin-wall {
  width: 140px;
  height: 65px;
  background: linear-gradient(180deg, #7a4c28 0%, #6b3f1e 100%);
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Log lines */
.cabin-wall::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 8px,
    rgba(0,0,0,0.1) 8px,
    rgba(0,0,0,0.1) 9px
  );
}

.window {
  width: 24px;
  height: 24px;
  background: #ffeaa7;
  border: 2px solid #5c3a1e;
  position: relative;
  z-index: 1;
  border-radius: 2px;
}

.window-glow {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  background: radial-gradient(circle, rgba(255,234,167,0.4) 0%, transparent 70%);
  border-radius: 50%;
}

.window-pane {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}
.window-pane::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background: #5c3a1e;
}
.window-pane::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: #5c3a1e;
}

.door {
  width: 22px;
  height: 36px;
  background: #4a2e14;
  border: 2px solid #5c3a1e;
  border-radius: 10px 10px 0 0;
  position: relative;
  z-index: 1;
  align-self: flex-end;
}

.door-knob {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d4a754;
}

/* Chimney */
.chimney {
  position: absolute;
  top: -30px;
  right: 20px;
  width: 18px;
  height: 40px;
  background: #8b5e3c;
  z-index: 1;
  border-radius: 2px 2px 0 0;
}

.smoke {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(200,200,210,0.4);
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  animation: smokePuff 4s ease-out infinite;
}
.smoke-1 { animation-delay: 0s; top: -5px; }
.smoke-2 { animation-delay: 1.3s; top: -5px; }
.smoke-3 { animation-delay: 2.6s; top: -5px; }

@keyframes smokePuff {
  0% {
    opacity: 0.6;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateX(-30px) translateY(-60px) scale(3);
  }
}

/* Ground */
.ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(180deg, #d4dce8 0%, #e8ecf2 40%, #f0f2f6 100%);
  z-index: 3;
  border-radius: 60% 60% 0 0 / 30px 30px 0 0;
}

.ground-drift-1 {
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 50%;
  height: 100px;
  background: #e2e7ef;
  border-radius: 50% 80% 0 0;
  z-index: 3;
}

.ground-drift-2 {
  position: absolute;
  bottom: 0;
  right: -5%;
  width: 45%;
  height: 95px;
  background: #dfe4ed;
  border-radius: 70% 50% 0 0;
  z-index: 3;
}

/* === MESSAGE === */
.message {
  padding: 40px 32px 36px;
  text-align: center;
  background: linear-gradient(180deg, #1e2444 0%, #232a50 100%);
}

.message h1 {
  font-family: 'Caveat', cursive;
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 700;
  color: #f5ecd7;
  line-height: 1.2;
  margin-bottom: 4px;
}

.from-line {
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  color: #a0aec0;
  margin-bottom: 28px;
}

.greetings {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.greeting {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.greeting .name {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fbbf24;
}

.greeting .note {
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.closing {
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: #94a3b8;
  font-style: italic;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .scene { height: 300px; }
  .message { padding: 28px 20px 28px; }
  .cabin-roof {
    border-left-width: 60px;
    border-right-width: 60px;
    border-bottom-width: 35px;
  }
  .cabin-wall { width: 105px; height: 50px; }
}
