@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

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

body {
  height: 100vh;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(to bottom, #091c32, #1b3a5f);
  color: #fff;
}

/* YENİ EKLENEN BAŞLIK STİLİ */
.page-title {
  /* Reverted to original styles */
  font-family: 'Great Vibes', cursive;
  font-size: 5rem;
  color: #ffeb3b;
  text-shadow: 0 0 10px rgba(255, 235, 59, 0.8),
    0 0 20px rgba(255, 235, 59, 0.5),
    0 2px 5px rgba(0, 0, 0, 0.5);
  z-index: 20;
  pointer-events: none;
  animation: floatTitle 3s ease-in-out infinite;
  background: none;
  /* Reset gradient */
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: initial;
  filter: none;
  text-transform: none;
  letter-spacing: normal;
}

.highlight-s {
  /* Reset highlight-s to inherit or just distinct color if desired, but user said revert */
  color: inherit;
  font-weight: normal;
  text-shadow: inherit;
  display: inline;
  font-size: inherit;
  transform: none;
  background: none;
  -webkit-text-fill-color: initial;
}

/* Floor Light Effect */
.floor-light {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 450px;
  height: 120px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.4) 40%, rgba(255, 255, 255, 0) 70%);
  z-index: 0;
  pointer-events: none;
  filter: blur(15px);
  opacity: 1;
}

/* Sleeping Cat Styles */
.cat-container {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sleeping-cat {
  width: 200px;
  height: auto;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

.zz-animation {
  position: absolute;
  top: -25px;
  right: 120px;
}

.zz-animation span {
  position: absolute;
  font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
  color: #fff;
  font-weight: bold;
  opacity: 0;
  animation: sleepZ 4s infinite linear;
  animation-delay: calc(var(--i) * 1.5s);
  display: block;
}

.zz-animation span:nth-child(1) {
  font-size: 24px;
  left: 20px;
}

.zz-animation span:nth-child(2) {
  font-size: 18px;
  left: 0px;
}

.zz-animation span:nth-child(3) {
  font-size: 14px;
  left: -15px;
}

@keyframes sleepZ {
  0% {
    transform: translateY(0) scale(0.5) rotate(0deg);
    opacity: 0;
  }

  20% {
    opacity: 0.8;
  }

  80% {
    opacity: 0;
  }

  100% {
    transform: translateY(-60px) scale(1.2) rotate(15deg);
    opacity: 0;
  }
}

@keyframes floatTitle {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Blur Efekti Veren Katman */
#backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}

.scene {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.tree-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tree {
  width: 450px;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.15));
}

/* MEKTUP İKONU */
.note {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(5deg);
  cursor: pointer;
  z-index: 100;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
  transform-origin: center center;
  transition: filter 0.3s ease;
  outline: none;
  /* Klavye odaklanınca çirkin çerçeveyi kaldır */
}

.note:focus-visible {
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
  /* Klavye ile seçilince parlasın */
}

.note:hover {
  filter: drop-shadow(0 6px 15px rgba(255, 215, 0, 0.4));
}

/* ZARF KAPAĞI */
.envelope-flap {
  transform-origin: 30px 25px;
  transition: transform 0.3s ease;
}

/* ZARF KAĞIDI */
.envelope-paper {
  transition: transform 0.3s ease;
}

/* Uyarı Mesajı */
#warning-toast {
  position: fixed;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(231, 76, 60, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: bold;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 200;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#warning-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.status {
  margin-top: 15px;
  text-align: center;
  font-size: 16px;
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#countdown {
  font-family: 'Courier New', monospace;
  /* İstersen burayı da Great Vibes yapabilirsin */
  font-size: 18px;
  letter-spacing: 1px;
}

/* OKUNACAK MEKTUP (MODAL) */
.letter-content {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
}

.letter-content.active {
  pointer-events: all;
}

.paper-texture {
  background: linear-gradient(to bottom, #fffdf8, #faf8f0);
  color: #333;
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  font-family: 'Georgia', serif;
  line-height: 1.8;
  transform: scale(0.8);
  position: relative;
  isolation: isolate;
}

.paper-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 24px,
      rgba(0, 0, 0, 0.03) 24px,
      rgba(0, 0, 0, 0.03) 25px);
  pointer-events: none;
  border-radius: 4px;
}

.paper-texture h3 {
  color: #c0392b;
  margin-bottom: 20px;
  font-size: 24px;
}

.paper-texture p {
  position: relative;
  z-index: 1;
}

.paper-texture button {
  margin-top: 20px;
  padding: 10px 24px;
  border: none;
  background: #c0392b;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.paper-texture button:hover {
  background: #a02d22;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Kar */
#snow-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Havai Fişek Canvas */
#fireworks-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}



/* Mobil Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 2.8rem;
    /* Good size for Mountains of Christmas */
    top: 30px;
    z-index: 20;
  }

  .tree-container {
    flex-shrink: 0;
    margin-top: 50px;
    /* Push tree down to fill bottom space */
  }

  .tree {
    width: 400px;
    max-width: none;
  }

  .note {
    transform: translate(-50%, -50%) rotate(5deg) scale(0.9);
  }

  .paper-texture {
    padding: 30px;
    width: 95%;
  }

  .paper-texture h3 {
    font-size: 20px;
  }

  .status {
    font-size: 14px;
    position: relative;
    z-index: 20;
  }

  /* Pet Styles inside media query */
  .pet {
    width: 60px;
    bottom: 20px;
    right: 15%;
  }
}