@font-face {
  font-family: "mountains_of_christmasregular";
  src: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/35984/mountainsofchristmas-webfont.woff2")
      format("woff2"),
    url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/35984/mountainsofchristmas-webfont.woff")
      format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Merry';
  src: url('./Merry.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;600;700&display=swap');
body {
  background: radial-gradient(circle at center,
    #d5684f 0%,      /* Bright center (reduced brightness) */
    #d5684f 20%,     /* Keep bright zone */
    #c55643 35%,     /* Transition */
    #b84d41 50%,     /* Getting darker */
    #a04732 70%,     /* Dark outer */
    #8f3d2a 90%,     /* Darker corners */
    #7a3322 100%     /* Very dark edges/corners */
  );
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Add subtle texture overlay to mimic the photo */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(160, 71, 50, 0.4) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Ensure other content is above the overlay */
body > *:not(style) {
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  body {
    background: radial-gradient(circle at center,
      #d5684f 0%,
      #d5684f 25%,
      #c55643 40%,
      #b84d41 55%,
      #a04732 75%,
      #8f3d2a 92%,
      #7a3322 100%
    );
  }
}

body,
html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

svg {
  width: 60%;
  height: 60%;
  visibility: hidden;
  margin-top: 50px;
}

@media (max-width: 768px) {
  svg {
    margin-top: 35px;
    width: 80%;
    height: 65%;
  }

  .whole {
    transform: scale(1.15);
    transform-origin: center;
  }
}

@media (max-width: 480px) {
  svg {
    margin-top: 25px;
    width: 90%;
    height: 70%;
  }

  .whole {
    transform: scale(1.25);
    transform-origin: center;
  }
}

foreignObject {
  font-family: mountains_of_christmasregular;
  font-size: 2rem;
  text-anchor: middle;
  text-align: center;
  fill: #ffffff;
  color: #ffffff;
  opacity: 0;
  letter-spacing: 1px;
}

/* a {
  text-decoration: underline dotted #ffffff;
}

a:visited {
  color: red;
} */

#musicToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  padding: 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#musicToggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#musicToggle img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

#musicToggle.playing img {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

#santaContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 998;
  overflow: hidden;
}

#santaParticlesSVG {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 997;
  pointer-events: none;
}

#santaGif {
  position: absolute;
  width: 400px;
  height: auto;
  opacity: 0;
  visibility: visible;
  will-change: transform, opacity;
  z-index: 2;
}

#santaGif.active {
  /* Opacity is handled by GSAP animation */
  visibility: visible;
}

@media (max-width: 768px) {
  #santaGif {
    width: 250px;
  }
}

@media (max-width: 480px) {
  #santaGif {
    width: 200px;
  }
}

.christmas-message {
  font-size: 80px;
  font-family: "Merry";
  color: rgb(241, 60, 60);
  font-weight: bold;
  text-align: center;
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  animation: glow 1.5s ease-in-out infinite;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
  transition: opacity 1s, visibility 1s;
  display: block;
}

@media (max-width: 768px) {
  .christmas-message {
    font-size: 60px;
    top: 40px;
  }
}

@media (max-width: 480px) {
  .christmas-message {
    font-size: 45px;
    top: 30px;
  }
}

@keyframes glow {
  20% {
    text-shadow: 0 0 5px #f7b3b3, 0 0 10px #f7b3b3, 0 0 20px #f7b3b3;
  }
  50% {
    text-shadow: 0 0 10px #f7b3b3, 0 0 15px #f7b3b3, 0 0 30px #ff0000;
  }
  80% {
    text-shadow: 0 0 5px #f7b3b3, 0 0 10px #f7b3b3, 0 0 20px #f7b3b3;
  }
}

/* Snowflakes Effect */
.snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 996;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -10px;
  background-color: #ffffff;
  border-radius: 50%;
  opacity: 0;
  animation: snow 10s linear infinite;
  box-shadow: 0 0 3px #ffffff, 0 0 1px #ffffff;
}

@keyframes snow {
  0% {
    top: -10px;
    opacity: 1;
  }
  100% {
    top: 100vh;
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .snowflake {
    box-shadow: 0 0 2px #ffffff;
  }
}

/* Gift Box under Christmas Tree */
#giftBox {
  position: fixed;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: auto;
  z-index: 999;
  opacity: 0;
  cursor: pointer;
  transition: transform 0.3s ease;
  animation: giftAppear 1s ease-out 12s forwards, giftShake 0.6s ease-in-out 13s infinite;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

#giftBox:hover {
  transform: translateX(-50%) scale(1.15);
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

@keyframes giftAppear {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(50px) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes giftShake {
  0%, 100% {
    transform: translateX(-50%) rotate(0deg);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-50%) rotate(-2deg);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(-50%) rotate(2deg);
  }
}

/* Gift Hint Text */
#giftHint {
  position: fixed;
  bottom: calc(5% + 150px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Merry', sans-serif;
  font-size: 24px;
  color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8),
               0 0 20px rgba(255, 215, 0, 0.5),
               2px 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  animation: hintAppear 1s ease-out 13.5s forwards, hintPulse 1.5s ease-in-out 14.5s infinite;
}

@keyframes hintAppear {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes hintPulse {
  0%, 100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1.1);
  }
}

@media (max-width: 768px) {
  #giftBox {
    width: 100px;
    bottom: 15%;
  }

  #giftHint {
    font-size: 20px;
    bottom: calc(15% + 110px);
  }
}

@media (max-width: 480px) {
  #giftBox {
    width: 85px;
    bottom: 18%;
  }

  #giftHint {
    font-size: 18px;
    bottom: calc(18% + 95px);
  }
}

/* Hanging Christmas Icons with Bounce */
.hanging-icons-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 995;
  overflow: visible;
}

.hanging-ornament {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* String/rope line */
.ornament-string {
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  transform-origin: top center;
  animation: stringDrop 1s ease-out forwards;
}

/* Icon at the end of string */
.ornament-icon {
  width: 70px;
  height: auto;
  margin-top: -15px;
  display: block;
  line-height: 0;
  opacity: 0;
  transform: translateY(-20px);
  animation: iconBounce 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  position: relative;
  z-index: 1;
}

/* String drops down */
@keyframes stringDrop {
  0% {
    height: 0;
  }
  100% {
    height: var(--string-length);
  }
}

/* Icon bounces at the end like elastic */
@keyframes iconBounce {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  20% {
    opacity: 1;
  }
  40% {
    transform: translateY(20px);
  }
  55% {
    transform: translateY(-10px);
  }
  70% {
    transform: translateY(8px);
  }
  85% {
    transform: translateY(-4px);
  }
  95% {
    transform: translateY(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Different sizes */
.ornament-icon.small {
  width: 50px;
}

.ornament-icon.medium {
  width: 70px;
}

.ornament-icon.large {
  width: 90px;
}

@media (max-width: 768px) {
  .ornament-icon {
    width: 55px;
  }

  .ornament-icon.small {
    width: 40px;
  }

  .ornament-icon.medium {
    width: 55px;
  }

  .ornament-icon.large {
    width: 70px;
  }
}

@media (max-width: 480px) {
  .ornament-icon {
    width: 45px;
  }

  .ornament-icon.small {
    width: 35px;
  }

  .ornament-icon.medium {
    width: 45px;
  }

  .ornament-icon.large {
    width: 60px;
  }

  .ornament-string {
    width: 1.5px;
  }
}

/* Star Twinkle Effect */
.treeStar path[fill="#FFD700"] {
  animation: starTwinkle 2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px #FFD700) drop-shadow(0 0 20px #FFA500);
}

@keyframes starTwinkle {
  0%, 100% {
    opacity: 1;
    filter: drop-shadow(0 0 10px #FFD700) drop-shadow(0 0 20px #FFA500);
  }
  25% {
    opacity: 0.6;
    filter: drop-shadow(0 0 15px #FFD700) drop-shadow(0 0 30px #FFA500) drop-shadow(0 0 40px #FF8C00);
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 20px #FFD700) drop-shadow(0 0 40px #FFA500) drop-shadow(0 0 60px #FF8C00);
  }
  75% {
    opacity: 0.7;
    filter: drop-shadow(0 0 12px #FFD700) drop-shadow(0 0 25px #FFA500);
  }
}

/* Christmas Card Styles */
.card-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s 0.5s;
}

.card-container.show {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0s 0s;
}

.close-card-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 36px;
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  color: #c0392b;
  cursor: pointer;
  z-index: 10001;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.close-card-btn:hover {
  background-color: #c0392b;
  color: white;
  transform: rotate(90deg);
}

.christmas-card {
  color: #013243;
  position: relative;
  font-family: 'Dancing Script', cursive;
  letter-spacing: 1px;
  width: 300px;
  height: 400px;
  background: #e0e1dc;
  transform-style: preserve-3d;
  transform: perspective(2000px);
  box-shadow: inset 300px 0 50px rgba(0, 0, 0, 0.5), 20px 0 60px rgba(0, 0, 0, 0.5);
  transition: 1s;
}

.christmas-card:hover {
  transform: perspective(2000px) rotate(15deg) scale(1.1);
  box-shadow: inset 20px 0 50px rgba(0, 0, 0, 0.5), 0 10px 100px rgba(0, 0, 0, 0.5);
}

.christmas-card:before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 100%;
  height: 5px;
  background: #bac1ba;
  transform-origin: bottom;
  transform: skewX(-45deg);
}

.christmas-card:after {
  content: "";
  position: absolute;
  top: 0;
  right: -5px;
  width: 5px;
  height: 100%;
  background: #92a29c;
  transform-origin: left;
  transform: skewY(-45deg);
}

.christmas-card .imgBox {
  width: 100%;
  height: 100%;
  position: relative;
  transform-origin: left;
  transition: 0.7s;
}

.christmas-card .bark {
  position: absolute;
  background-image: url('./background_letter_2.jpeg');
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: 0.7s;
}

.christmas-card .imgBox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.christmas-card:hover .imgBox {
  transform: rotateY(-135deg);
}

.christmas-card:hover .bark {
  opacity: 1;
  transition: 0.6s;
  box-shadow: 300px 200px 100px rgba(0, 0, 0, 0.4) inset;
}

.christmas-card .card-details {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  padding: 0 0 0 10px;
  z-index: -1;
  margin-top: 70px;
  max-height: 330px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
}

/* Custom scrollbar for card */
.christmas-card .card-details::-webkit-scrollbar {
  width: 6px;
}

.christmas-card .card-details::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.christmas-card .card-details::-webkit-scrollbar-thumb {
  background: rgba(192, 57, 43, 0.5);
  border-radius: 3px;
}

.christmas-card .card-details::-webkit-scrollbar-thumb:hover {
  background: rgba(192, 57, 43, 0.7);
}

.christmas-card .card-details p {
  font-size: 15px;
  line-height: 1.6;
  transform: rotate(-10deg);
  padding: 0 15px 0 20px;
  margin: 8px 0;
  font-family: 'Dancing Script', cursive;
  font-weight: 600;
  word-wrap: break-word;
  text-align: left;
}

.christmas-card .card-details h4 {
  text-align: center;
  font-size: 24px;
  line-height: 1.2;
  margin: 10px 0;
  font-family: 'Merry', sans-serif;
  font-weight: bold;
}

/* Merry Christmas title in card - same style as header */
.christmas-card .card-details .christmas-message {
  position: static;
  font-family: "Merry";
  color: rgb(241, 60, 60);
  font-weight: bold;
  text-align: center;
  font-size: 32px;
  margin: 10px 0 15px 0;
  transform: rotate(-10deg);
  animation: none;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  display: block;
  z-index: auto;
  transition: none;
}

.card-color {
  color: #c0392b;
}

.card-margin {
  margin: 10px 0;
}

.card-text-right {
  text-align: right;
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  margin-top: 12px;
  padding-right: 25px;
}

@media (max-width: 768px) {
  .christmas-card {
    width: 250px;
    height: 350px;
  }

  .christmas-card .card-details {
    margin-top: 50px;
    padding: 0 0 0 8px;
    max-height: 280px;
  }

  .christmas-card .card-details p {
    font-size: 13px;
    line-height: 1.55;
    margin: 6px 0;
    padding: 0 12px 0 15px;
  }

  .christmas-card .card-details h4 {
    font-size: 22px;
    margin: 8px 0;
  }

  .christmas-card .card-details .christmas-message {
    font-size: 26px;
    margin: 8px 0 12px 0;
  }

  .close-card-btn {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .christmas-card {
    width: 220px;
    height: 320px;
  }

  .christmas-card .card-details {
    margin-top: 40px;
    padding: 0 0 0 5px;
    max-height: 260px;
  }

  .christmas-card .card-details p {
    font-size: 11.5px;
    line-height: 1.5;
    margin: 5px 0;
    padding: 0 10px 0 12px;
  }

  .christmas-card .card-details h4 {
    font-size: 20px;
    margin: 6px 0;
  }

  .christmas-card .card-details .christmas-message {
    font-size: 22px;
    margin: 6px 0 10px 0;
  }
}
