body, html {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, #f2f2f2, #d9e2ec);
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: var(--vh, 100vh);
  overflow-x: hidden;
}

.site-header {
  background-color: #fff7f7;
  color: #222;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 40px 20px 20px 20px;
  font-size: clamp(2rem, 6vw, 4rem); 
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.site-subtitle {
  font-size: clamp(1rem, 3vw, 1.8rem);
  font-weight: 500;
  margin-top: 10px;
  color: #555;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.main-btn {
  font-size: clamp(1.2rem, 4vw, 2rem);
  padding: 15px 30px;
  border-radius: 12px;
  border: none;
  background-color: #ff4d4d;
  color: white;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.main-btn:hover {
  transform: scale(1.05);
}

.calendar {
  position: relative;
  width: 220px;
  height: 240px;
  background: #fff;
  border: 5px solid #222;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: scale(1);
  z-index: 1;
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin-top: 20px;
}

.month {
  background: #ff4d4d;
  color: white;
  font-weight: bold;
  font-size: 1.2em;
  padding: 8px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  width: 100%;
  text-align: center;
}

.date {
  font-size: 5em;
  font-weight: bold;
  margin: 25px 0 10px 0;
}

.weekday {
  font-size: 1.2em;
  color: #555;
}

@keyframes zoomIn {
  0% {
    transform: scale(1);
  }
  70% {
    transform: scale(5) translateY(-10%);
  }
  100% {
    transform: scale(5) translateY(-10%);
    opacity: 0;
  }
}

.result {
  text-align: center;
  opacity: 0;
  font-size: 2rem;
  margin-top: 20px;
  max-width: 90%;
  transition: opacity 0.6s ease;
}

.emoji {
  font-size: 5em;
  display: block;
  margin-bottom: 10px;
}

.joke {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  font-size: clamp(1rem, 4vw, 1.4rem);
  font-style: italic;
  margin-top: 20px;
  width: 80%;
  max-width: 900px;
  color: #222;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  transition: opacity 0.5s ease;
  margin-left: auto;
  margin-right: auto;
}

.site-footer {
  background-color: #f8f8f8;
  color: #555;
  padding: 30px 20px;
  text-align: center;
  font-family: 'Segoe UI', sans-serif;
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
}

.social-icons {
  margin-bottom: 15px;
}

.social-icon {
  width: 32px;
  height: 32px;
  margin: 0 8px;
  vertical-align: middle;
  filter: grayscale(100%) brightness(130%);
  transition: filter 0.3s;
}

.social-icon:hover {
  filter: grayscale(0%) brightness(100%);
}

.footer-link {
  color: #4ea1ff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-link:hover {
  color: #ff4d4d;
}

.footer-author,
.footer-powered {
  margin: 8px 0;
}

@media (max-width: 768px) {

  main {
    padding: 10px 15px;
  }
  .site-footer {
    padding: 15px 10px;
  }

  .site-header {
    font-size: clamp(2rem, 5vw, 2.5rem);
    padding: 15px 10px 10px 10px;
  }

  .site-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  .main-btn {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    padding: 10px 20px;
  }

  .calendar {
    width: 170px;
    height: 190px;
    margin-top: 10px;
  }

  .date {
    font-size: 3em;
    margin: 15px 0 5px 0;
  }

  .weekday {
    font-size: 0.9rem;
  }

  .emoji {
    font-size: 5em;
    margin-bottom: 5px;
  }

  .joke {
    width: 90%;
    font-size: 1.4rem;
    margin-top: 15px;
  }
}