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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  color: #2c1810;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://play.rosebud.ai/assets/christmas-background.webp?xZDU') center/cover no-repeat;
  z-index: -2;
}

.background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

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

.snowflake {
  position: absolute;
  top: -10%;
  color: white;
  font-size: 1.5em;
  opacity: 0.8;
  animation: fall linear infinite;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(360deg);
  }
}

.snowflake:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 2s; font-size: 2em; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 8s; animation-delay: 4s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 14s; animation-delay: 1s; font-size: 1.8em; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 3s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 9s; animation-delay: 5s; font-size: 2.2em; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: 2s; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 10s; animation-delay: 6s; font-size: 1.6em; }

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

header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding: 30px 0;
}

header h1 {
  font-size: 3em;
  color: #fff;
  text-shadow: 
    3px 3px 6px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(212, 175, 55, 0.6);
  letter-spacing: 2px;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 
      3px 3px 6px rgba(0, 0, 0, 0.8),
      0 0 20px rgba(212, 175, 55, 0.6);
  }
  to {
    text-shadow: 
      3px 3px 6px rgba(0, 0, 0, 0.8),
      0 0 30px rgba(212, 175, 55, 0.9),
      0 0 40px rgba(212, 175, 55, 0.6);
  }
}

.star-decoration {
  position: absolute;
  top: 10px;
  width: 60px;
  height: 60px;
  animation: rotate 4s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.star-left {
  left: 20%;
}

.star-right {
  right: 20%;
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.door-container {
  position: relative;
  aspect-ratio: 3/4;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.door-container:hover {
  transform: scale(1.05) translateY(-5px);
}

.door-container.unlocked:hover {
  filter: brightness(1.1);
}

.door-container.locked {
  cursor: not-allowed;
  filter: brightness(0.6) grayscale(0.3);
}

.door-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.5),
    inset 0 2px 10px rgba(255, 255, 255, 0.1);
}

.door-number {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.5em;
  font-weight: bold;
  color: #2c1810;
  text-shadow: 
    1px 1px 0px rgba(255, 255, 255, 0.8),
    2px 2px 4px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(255, 215, 0, 0.6);
  background: linear-gradient(135deg, rgba(255, 223, 128, 0.95) 0%, rgba(212, 175, 55, 0.9) 100%);
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  border: 4px solid rgba(139, 69, 19, 0.6);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.4),
    inset 0 2px 5px rgba(255, 255, 255, 0.3);
  font-family: 'Georgia', serif;
  line-height: 1;
}

.lock-icon {
  position: absolute;
  bottom: 15px;
  right: 15px;
  font-size: 2em;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
}

.prize-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 35px;
  height: 35px;
  background: url('https://play.rosebud.ai/assets/snowflake-decoration.webp?UM60') center/contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(135, 206, 250, 0.8));
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.admin-section {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.instructions-btn {
  background: linear-gradient(135deg, #2c5f2d 0%, #1a3d1a 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 1em;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  font-family: 'Georgia', serif;
  font-weight: bold;
}

.instructions-btn:hover {
  background: linear-gradient(135deg, #1a3d1a 0%, #0d2e0d 100%);
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.5);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: linear-gradient(135deg, #fff8dc 0%, #f5e6d3 100%);
  margin: 5% auto;
  padding: 30px;
  border: 3px solid #d4af37;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: slideDown 0.3s ease;
  position: relative;
}

@keyframes slideDown {
  from {
    transform: translateY(-100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  color: #8b0000;
  float: right;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
  transition: color 0.3s ease;
}

.close:hover {
  color: #c41e3a;
}

.modal-content h2 {
  color: #8b0000;
  margin-bottom: 20px;
  font-size: 2em;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.prize-display {
  padding: 20px;
  background: white;
  border-radius: 10px;
  margin-top: 20px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.prize-display h3 {
  color: #2c5f2d;
  margin-bottom: 10px;
  font-size: 1.3em;
}

.prize-display p {
  color: #2c1810;
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 10px;
}

.prize-display a {
  color: #0066cc;
  text-decoration: none;
  word-break: break-all;
  font-weight: bold;
}

.prize-display a:hover {
  text-decoration: underline;
}

.empty-prize {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 30px;
}

.prize-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.prize-form label {
  font-weight: bold;
  color: #2c1810;
  margin-bottom: 5px;
}

.prize-form input,
.prize-form textarea {
  padding: 12px;
  border: 2px solid #d4af37;
  border-radius: 8px;
  font-size: 1em;
  font-family: 'Georgia', serif;
  background: white;
}

.prize-form textarea {
  min-height: 100px;
  resize: vertical;
}

.prize-form button {
  background: linear-gradient(135deg, #2c5f2d 0%, #1a3d1a 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.1em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

.prize-form button:hover {
  background: linear-gradient(135deg, #1a3d1a 0%, #0d2e0d 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.instructions-content {
  max-height: 70vh;
  overflow-y: auto;
  text-align: left;
}

.instructions-content h3 {
  text-align: center;
  color: #c41e3a;
  font-size: 1.5em;
}

.instructions-content h4 {
  color: #2c5f2d;
  margin-top: 20px;
  margin-bottom: 10px;
}

.instructions-content code {
  background: #f0e6d2;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
  color: #8b0000;
}

.instructions-content pre {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9em;
  margin: 10px 0;
  border: 2px solid #d4af37;
}

.instructions-content ul {
  padding-left: 20px;
  line-height: 1.8;
}

@media (max-width: 1200px) {
  .calendar-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2em;
  }
  
  .star-decoration {
    width: 40px;
    height: 40px;
  }
  
  .calendar-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
  
  .door-number {
    font-size: 2em;
    width: 60px;
    height: 60px;
  }
  
  .admin-section {
    top: 10px;
    right: 10px;
  }
  
  .instructions-btn {
    padding: 10px 20px;
    font-size: 0.9em;
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .door-number {
    font-size: 1.8em;
    width: 50px;
    height: 50px;
  }
}
