/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
}

.container {
  max-width: 1200px;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

/* Intro Section with Hero Image */
.intro-section {
  position: relative;
  min-height: 70vh;
}

.hero-image-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-image {
  width: 100%;
  height: 70vh;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
}

.main-title {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 700;
  color: white;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
  animation: fadeInUp 1s ease-out;
}

.subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 10px;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.event-info {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out 0.4s both;
}

.start-btn {
  position: relative;
  padding: 18px 36px;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  background: linear-gradient(45deg, #ff6b6b, #ffd93d);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s ease-out 0.6s both;
}

.start-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.btn-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.5s;
  transform: rotate(45deg) translateX(-100%);
}

.start-btn:hover .btn-shine {
  transform: rotate(45deg) translateX(100%);
}

/* Credits and License Information */
.credits-info {
  margin-top: 40px;
  text-align: center;
  animation: fadeInUp 1s ease-out 0.8s both;
}

.developer-credits {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  line-height: 1.4;
}

.license-info {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  line-height: 1.4;
}

.credits-info a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  padding-bottom: 1px;
}

.credits-info a:hover {
  color: #ffd93d;
  border-bottom-color: #ffd93d;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Game Section */
.game-section {
  padding: 30px;
  animation: fadeIn 0.5s ease-out;
}

.game-header {
  margin-bottom: 40px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
  transition: width 0.5s ease;
  width: 0%;
}

.score-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #333;
  background: rgba(255, 255, 255, 0.7);
  padding: 15px 20px;
  border-radius: 10px;
  backdrop-filter: blur(5px);
}

/* Side-by-side Game Layout */
.game-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 500px;
}

.question-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.question-content {
  text-align: center;
}

.question-text {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 30px;
  line-height: 1.3;
  animation: slideInUp 0.5s ease-out;
}

.feedback {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 30px 0;
  padding: 20px;
  border-radius: 15px;
  transition: all 0.3s ease;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.4;
}

.feedback.correct {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: white;
  animation: bounceIn 0.5s ease-out;
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3);
}

.feedback.incorrect {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: white;
  animation: shakeX 0.5s ease-out;
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.answer-btn {
  padding: 20px 35px;
  font-size: 1.3rem;
  font-weight: 600;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 140px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.moth-btn {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
}

.not-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.answer-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.answer-btn:active {
  transform: translateY(-1px);
}

.next-btn {
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Image Side */
.image-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-wrapper {
  position: relative;
  width: 100%;
  max-width: 450px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.image-wrapper:hover {
  transform: scale(1.02);
}

.image-wrapper img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

/* Final Results Section */
.final-section {
  padding: 60px 40px;
  text-align: center;
  animation: fadeIn 0.5s ease-out;
}

.results-content {
  max-width: 600px;
  margin: 0 auto;
}

.results-icon {
  font-size: 5rem;
  margin-bottom: 30px;
  animation: bounceIn 1s ease-out;
}

#results-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#results-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.5;
}

.score-summary {
  margin: 40px 0;
}

.final-score {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b6b, #ffd93d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.play-again-btn {
  padding: 18px 36px;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 30px;
}

.play-again-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.event-footer {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-top: 30px;
}

.event-footer small {
  color: #888;
  font-size: 0.85rem;
}

/* Confetti Canvas */
#confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  pointer-events: none;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0%, 20%, 40%, 60%, 80% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

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

/* Responsive Design */
@media (max-width: 968px) {
  .game-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .question-text {
    font-size: 1.8rem;
  }
  
  .image-wrapper img {
    height: 300px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .main-title {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1.2rem;
  }
  
  .hero-overlay {
    padding: 20px;
  }
  
  .hero-image {
    height: 60vh;
  }
  
  .game-section {
    padding: 20px;
  }
  
  .question-text {
    font-size: 1.5rem;
  }
  
  .button-row {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  
  .answer-btn {
    width: 100%;
    max-width: 250px;
  }
  
  .score-display {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .final-section {
    padding: 40px 20px;
  }
  
  #results-title {
    font-size: 2rem;
  }
  
  .question-text {
    font-size: 1.3rem;
  }
  
  .image-wrapper img {
    height: 250px;
  }
}