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

body {
  font-family: "Funnel Sans", sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 50%, #1a472a 100%);
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
      2px 2px at 20px 30px,
      rgba(255, 255, 255, 0.8),
      transparent
    ),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(
      2px 2px at 130px 80px,
      rgba(255, 255, 255, 0.5),
      transparent
    ),
    radial-gradient(
      1px 1px at 160px 120px,
      rgba(255, 255, 255, 0.8),
      transparent
    );
  background-size: 200px 150px;
  animation: snowfall 8s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes snowfall {
  0% {
    transform: translateY(-150px);
  }
  100% {
    transform: translateY(0);
  }
}

.container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3),
    2px 2px 0 #b8860b;
  margin-bottom: 10px;
  letter-spacing: -1px;
}

.subtitle {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: #a8d5ba;
  font-weight: 500;
}

.calendar-frame {
  background: linear-gradient(145deg, #8b0000, #a52a2a, #8b0000);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.1), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  border: 4px solid #ffd700;
  position: relative;
}

.calendar-frame::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 2px dashed rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  pointer-events: none;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  .calendar-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .calendar-frame {
    padding: 15px;
  }
  .lang-icon {
    font-size: 28px !important;
  }
}

.door {
  aspect-ratio: 1;
  perspective: 1000px;
  cursor: pointer;
}

.door-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.door.open .door-inner {
  transform: rotateY(-180deg);
}

.door-front,
.door-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.door-front {
  background: linear-gradient(145deg, #2e7d32, #1b5e20);
  border: 3px solid #4caf50;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.door:hover .door-front {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.door-number {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.door-star {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 14px;
  animation: twinkle 2s ease-in-out infinite;
}

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

.ribbon {
  position: absolute;
  bottom: 8px;
  width: 60%;
  height: 8px;
  background: linear-gradient(
    90deg,
    transparent,
    #c41e3a,
    #ff6b6b,
    #c41e3a,
    transparent
  );
  border-radius: 4px;
}

.door-back {
  background: linear-gradient(145deg, #fff9e6, #fff);
  border: 3px solid #ffd700;
  transform: rotateY(180deg);
  padding: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
}

.lang-icon {
  font-size: 42px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s;
  line-height: 1;
}

.door.open:hover .lang-icon {
  transform: scale(1.15);
}

.lang-name {
  font-size: clamp(0.5rem, 1.5vw, 0.75rem);
  font-weight: 700;
  color: #333;
  margin-top: 6px;
  text-align: center;
  line-height: 1.1;
}

.progress-section {
  margin-top: 25px;
  text-align: center;
}

.progress-bar-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  padding: 4px;
  margin: 15px 0;
}

.progress-bar {
  height: 20px;
  background: linear-gradient(90deg, #ffd700, #ffed4a, #ffd700);
  border-radius: 16px;
  width: 0%;
  transition: width 0.5s ease-out;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  color: #ffd700;
  font-weight: 600;
  font-size: 0.95rem;
}

.completion-message {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(145deg, #ffd700, #ffed4a);
  border-radius: 12px;
  text-align: center;
  animation: celebrate 0.5s ease-out;
}

.completion-message.show {
  display: block;
}

@keyframes celebrate {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.completion-message h2 {
  color: #1a472a;
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.completion-message p {
  color: #2d5a3d;
}

.settings-btn {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 10;
  background: #ffd700;
  color: #1a472a;
  border: none;
  border-radius: 15px;
  height: 48px;
  padding: 10px;
  font-size: 20pt;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background 0.2s;
}
.settings-btn:hover {
  background: #ffed4a;
}
.settings-modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  justify-content: center;
  align-items: center;
}
.settings-modal .settings-content {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px 24px 24px;
  max-width: 350px;
  margin: 120px auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  position: relative;
  text-align: center;
}
.close-settings {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 2rem;
  color: #c41e3a;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
}
.close-settings:hover {
  color: #8b0000;
}

footer.page-footer {
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-text {
  color: #ffd700;
  font-size: 0.9rem;
}

.footer-link {
  color: #ffed4a;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
