:root {
  --holiday-red: #d42426;
  --holiday-green: #2f5233;
  --snow-white: #fff;
  --gold: #ffd700;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a472a, #2f5233);
  font-family: "Mountains of Christmas", cursive;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 20px;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.calendar-container {
  background: var(--holiday-red);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  position: relative;
  width: 95%;
  max-width: 800px;
  border: 4px solid var(--gold);
  margin-bottom: 40px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.top-emoji-left {
  content: "🎄";
  position: absolute;
  top: -40px;
  left: 20px;
  font-size: 40px;
  animation: bounce 2s infinite;
  cursor: pointer;
}

.top-emoji-right {
  content: "🎅";
  position: absolute;
  top: -40px;
  right: 20px;
  font-size: 40px;
  animation: bounce 2s infinite 1s;
  cursor: pointer;
}

.bottom-emoji-left {
  content: "🦌";
  position: absolute;
  bottom: -40px;
  left: 20px;
  font-size: 40px;
  animation: bounce 2s infinite 0.5s;
}

.bottom-emoji-right {
  content: "🎁";
  position: absolute;
  bottom: -40px;
  right: 20px;
  font-size: 40px;
  animation: bounce 2s infinite 1.5s;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.title {
  text-align: center;
  color: var(--snow-white);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  display: inline-block;
  width: 100%;
}

.title::after {
  content: "✨";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.title::before {
  content: "✨";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.door {
  aspect-ratio: 1;
  background: var(--snow-white);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
  color: var(--holiday-green);
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  border: 2px solid var(--holiday-green);
}

.door:hover {
  box-shadow: 0 0 15px var(--gold);
  transform: scale(1.05);
}

.door.opened {
  background: linear-gradient(45deg, var(--gold), #ffeb99);
  border: 2px solid var(--holiday-red);
  animation: openDoor 0.5s ease forwards;
}

@keyframes openDoor {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.snowflake {
  position: fixed;
  color: var(--snow-white);
  font-size: 1em;
  animation: fall linear infinite;
  pointer-events: none;
}

@keyframes fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
  }

  100% {
    transform: translateY(100vh) rotate(360deg);
  }
}

@media screen and (max-width: 768px) {
  .calendar-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .top-emoji-left,
  .top-emoji-right,
  .bottom-emoji-left,
  .bottom-emoji-right {
    font-size: 30px;
  }
}

@media screen and (max-width: 480px) {
  .calendar-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .calendar-container {
    padding: 10px;
  }

  .door {
    font-size: 0.8rem;
  }

  .top-emoji-left,
  .top-emoji-right,
  .bottom-emoji-left,
  .bottom-emoji-right {
    font-size: 25px;
    bottom: -30px;
  }
}

.top-emoji-left,
.top-emoji-right,
.bottom-emoji-left,
.bottom-emoji-right {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.top-emoji-left:hover,
.top-emoji-right:hover,
.bottom-emoji-left:hover,
.bottom-emoji-right:hover {
  transform: scale(1.2);
}

.instructions-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--holiday-green);
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-family: "Mountains of Christmas", cursive;
  font-size: 1.2rem;
  border: 2px solid var(--holiday-green);
  transition: all 0.3s ease;
  z-index: 1000;
}

.instructions-btn:hover {
  background: var(--holiday-green);
  color: var(--gold);
  border-color: var(--gold);
  transform: translateX(-50%) scale(1.05);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: linear-gradient(135deg, var(--holiday-red), #8b0000);
  padding: 30px;
  border-radius: 15px;
  max-width: 80%;
  width: 500px;
  position: relative;
  color: var(--snow-white);
  border: 3px solid var(--gold);
  font-family: Arial, sans-serif;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--snow-white);
}

.close-modal:hover {
  color: var(--gold);
}

.modal-content h2 {
  margin-top: 0;
  color: var(--gold);
  font-family: "Mountains of Christmas", cursive;
}

.modal-content ul {
  margin-bottom: 0;
  line-height: 1.6;
}

.falling-gift {
  position: fixed;
  font-size: 30px;
  pointer-events: none;
  z-index: 1000;
  animation: giftFall linear forwards;
}

@keyframes giftFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes shine {
  0% {
    filter: brightness(100%);
  }
  50% {
    filter: brightness(150%);
  }
  100% {
    filter: brightness(100%);
  }
}