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

body {
  font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 50%, #FFFFFF 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: #2C3E50;
}

/* Add winter ground */
body::before {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0F8FF 100%);
  z-index: 0;
}

/* Main container */
.container {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  text-align: center;
  margin: 20px 0 30px 0;
  animation: slideDown 1s ease-out;
}

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

.title {
  font-size: 4.5em;
  color: #FFFFFF;
  text-shadow:
    4px 4px 0px #DC143C,
    8px 8px 0px #8B0000,
    2px 2px 20px rgba(220, 20, 60, 0.5);
  margin: 0;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 8px;
}

.title-sub {
  font-size: 2.2em;
  color: #FFD700;
  text-shadow:
    2px 2px 0px #8B0000,
    4px 4px 10px rgba(0, 0, 0, 0.3);
  margin: 5px 0 15px 0;
  font-weight: 700;
  letter-spacing: 4px;
}

.subtitle {
  font-size: 1.3em;
  color: #FFFFFF;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  background: rgba(34, 139, 34, 0.8);
  display: inline-block;
  padding: 8px 20px;
  border-radius: 25px;
}

/* Two column layout */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  flex: 1;
}

/* Form section */
.form-section {
  animation: fadeIn 1.2s ease-out;
}

/* Instructions section */
.instructions-section {
  animation: fadeIn 1.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Instructions */
.instructions {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border: 4px solid #FFD700;
}

.instructions h3 {
  color: #DC143C;
  margin-bottom: 20px;
  font-size: 1.8em;
  text-align: center;
}

.instructions ul {
  list-style: none;
  padding: 0;
}

.instructions li {
  padding: 12px 0 12px 45px;
  position: relative;
  font-size: 1.3em;
  line-height: 1.6;
  color: #2C3E50;
}

.instructions li::before {
  content: '🎄';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8em;
  line-height: 1;
}

/* Form */
.guess-form {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border: 4px solid #32CD32;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-size: 1.4em;
  font-weight: bold;
  color: #2C3E50;
  margin-bottom: 10px;
}

.form-group input {
  width: 100%;
  padding: 15px;
  font-size: 1.2em;
  border: 3px solid #4169E1;
  border-radius: 15px;
  background: #FFFFFF;
  transition: all 0.3s ease;
  font-family: inherit;
}

/* Make the guess number input much larger */
.form-group.guess-input {
  margin-bottom: 35px;
}

.form-group.guess-input label {
  font-size: 2em;
  color: #DC143C;
  text-align: center;
  margin-bottom: 15px;
}

.form-group.guess-input input {
  padding: 25px;
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  border: 5px solid #FFD700;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.form-group.guess-input input:focus {
  outline: none;
  border-color: #DC143C;
  box-shadow: 0 0 25px rgba(220, 20, 60, 0.6);
  transform: scale(1.03);
}

.form-group input:focus {
  outline: none;
  border-color: #FFD700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  transform: scale(1.02);
}

.form-group input::placeholder {
  color: #95A5A6;
}

/* Form row for side-by-side inputs */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.form-row .form-group {
  margin-bottom: 0;
}

/* Submit button */
.submit-button {
  width: 100%;
  padding: 20px;
  font-size: 1.8em;
  font-weight: bold;
  color: #FFFFFF;
  background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(220, 20, 60, 0.4);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.submit-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(220, 20, 60, 0.6);
  background: linear-gradient(135deg, #FF1744 0%, #DC143C 100%);
}

.submit-button:active {
  transform: translateY(0) scale(0.98);
}

.submit-button:disabled {
  background: #95A5A6;
  cursor: not-allowed;
  transform: none;
}

/* Error message */
.error-message {
  margin-top: 20px;
  padding: 15px;
  background: #FFE4E1;
  border: 3px solid #DC143C;
  border-radius: 15px;
  color: #8B0000;
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Success modal */
.success-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInModal 0.3s ease;
}

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

.success-content {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border-radius: 30px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border: 6px solid #FFFFFF;
  max-width: 500px;
}

.santa-success {
  margin-bottom: 20px;
}

.success-title {
  font-size: 2.5em;
  color: #DC143C;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.success-message {
  font-size: 1.5em;
  color: #2C3E50;
  margin-bottom: 25px;
  font-weight: bold;
}

.close-button {
  padding: 15px 40px;
  font-size: 1.3em;
  font-weight: bold;
  color: #FFFFFF;
  background: #228B22;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.close-button:hover {
  background: #32CD32;
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Christmas trees on the ground */
.trees-container {
  position: fixed;
  bottom: 120px;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  height: 100px;
}

.tree {
  position: absolute;
  font-size: 80px;
  bottom: 0;
  animation: treeFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.tree:nth-child(2n) {
  font-size: 100px;
  animation-delay: 0.5s;
}

.tree:nth-child(3n) {
  font-size: 70px;
  animation-delay: 1s;
}

.tree:nth-child(4n) {
  font-size: 90px;
  animation-delay: 1.5s;
}

@keyframes treeFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Animated elements positioning */
.santa-sleigh {
  position: fixed;
  top: 80px;
  left: -500px;
  z-index: 5;
  pointer-events: none;
  font-size: 50px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

/* Sleigh container with Santa inside */
.santa-sleigh .sleigh-container {
  position: relative;
  display: flex;
  align-items: flex-end;
}

.santa-sleigh .sleigh {
  font-size: 80px;
  line-height: 1;
  transform: scaleX(-1) !important;
  display: inline-block;
}

/* Full-body CSS Santa */
.santa-full {
  position: absolute;
  bottom: 12px;
  left: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.santa-full::before {
  /* White pom-pom at tip of hat */
  content: '';
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6),
              0 0 0 4px rgba(255, 255, 255, 0.3);
  z-index: 20;
}

.santa-head {
  width: 28px;
  height: 28px;
  background: #FFE4C4;
  border-radius: 50%;
  position: relative;
  margin-bottom: -4px;
}

.santa-head::before {
  /* Red hat cone */
  content: '';
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 28px solid #DC143C;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.santa-head::after {
  /* White hat trim/band */
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 8px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.santa-body {
  width: 32px;
  height: 24px;
  background: #DC143C;
  border-radius: 4px;
  position: relative;
  margin-bottom: -2px;
}

.santa-body::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 18px;
  background: white;
  border-radius: 2px;
}

.santa-legs {
  display: flex;
  gap: 6px;
}

.santa-legs::before,
.santa-legs::after {
  content: '';
  width: 10px;
  height: 14px;
  background: #DC143C;
  border-radius: 2px;
}

/* Reindeer (middle) - MUST face right! */
.santa-sleigh .reindeer {
  animation: bounce 0.5s ease-in-out infinite alternate;
  transform: scaleX(-1) !important;
  display: inline-block;
}

.santa-sleigh .reindeer:first-of-type {
  animation-delay: 0.1s;
}

.santa-sleigh .reindeer:last-of-type {
  animation-delay: 0.2s;
}

/* Rudolph (front/right, with red nose) - MUST face right! */
.santa-sleigh .rudolph {
  animation: bounce 0.5s ease-in-out infinite alternate;
  animation-delay: 0.3s;
  position: relative;
  filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
  transform: scaleX(-1) !important;
  display: inline-block;
}

/* Make Rudolph's nose glow red - LEFT because parent is flipped! */
.santa-sleigh .rudolph::after {
  content: '🔴';
  position: absolute;
  font-size: 10px;
  left: -2px;
  top: 28%;
  animation: glow 1s ease-in-out infinite alternate;
}

.animal {
  position: fixed;
  bottom: 100px;
  left: -200px;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  font-size: 50px;
}

/* Santa success modal styles */
.santa-success {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.success-santa {
  position: relative;
  font-size: 150px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-santa .thumbs-up {
  position: absolute;
  font-size: 100px;
  bottom: -30px;
  right: -40px;
  animation: thumbsUpPop 1s ease-out infinite;
  transform-origin: bottom center;
}

.success-sparkles {
  font-size: 40px;
  animation: sparkle 1.5s ease-in-out infinite;
}

.success-subtitle {
  color: #2C3E50;
  font-size: 1.8em;
  margin: 10px 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .form-row .form-group {
    margin-bottom: 15px;
  }

  .title {
    font-size: 2.5em;
    letter-spacing: 4px;
  }

  .title-sub {
    font-size: 1.5em;
    letter-spacing: 2px;
  }

  .subtitle {
    font-size: 1em;
  }

  .instructions h3 {
    font-size: 1.4em;
  }

  .instructions li {
    font-size: 1.1em;
  }

  .form-group label {
    font-size: 1.2em;
  }

  .form-group input {
    font-size: 1em;
    padding: 12px;
  }

  .form-group.guess-input label {
    font-size: 1.6em;
  }

  .form-group.guess-input input {
    font-size: 1.8em;
    padding: 18px;
  }

  .submit-button {
    font-size: 1.4em;
    padding: 15px;
  }

  .success-title {
    font-size: 2em;
  }

  .success-message {
    font-size: 1.2em;
  }

  .santa-sleigh {
    font-size: 35px;
  }

  .tree {
    font-size: 50px;
  }

  .tree:nth-child(2n) {
    font-size: 60px;
  }

  .tree:nth-child(3n) {
    font-size: 45px;
  }

  .tree:nth-child(4n) {
    font-size: 55px;
  }
}
