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

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(to bottom, #0f172a, #1e293b, #334155);
  min-height: 100vh;
  overflow-x: hidden;
  color: white;
  position: relative;
  padding: 30px;
}

.petal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.petal {
  position: absolute;
  top: -50px;
  width: 18px;
  height: 18px;
  background: pink;
  border-radius: 60% 40% 70% 30%;
  opacity: 0.8;
  animation: fall linear infinite;
}

@keyframes fall {
  0% {
    transform: translateY(-50px) rotate(0deg);
    opacity: 0.9;
  }
  100% {
    transform: translateY(110vh) translateX(80px) rotate(360deg);
    opacity: 0.2;
  }
}

@keyframes flipIn {
  0% {
    transform: rotateY(180deg) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes flipOut {
  0% {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: rotateY(-180deg) scale(0.8);
    opacity: 0;
  }
}

.box {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: auto;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: 0.3s;
  animation: flipIn 0.8s ease-out;
}

.box.flip-out {
  animation: flipOut 0.5s ease-in forwards;
  pointer-events: none;
}

.box:hover {
  transform: scale(1.01);
  box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.15);
}

h1 {
  margin-bottom: 10px;
  font-size: 36px;
  text-align: center;
}

h2 {
  margin-bottom: 12px;
}

.subtitle {
  text-align: center;
  margin-bottom: 20px;
  color: #e2e8f0;
}

.section {
  margin-top: 20px;
  padding: 20px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.15);
}

.search-area {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

input,
select,
textarea {
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
}

input {
  width: 60%;
  min-width: 220px;
}

.section input {
  width: 100%;
  margin-top: 10px;
}

.feedback-box textarea {
  width: 100%;
  height: 110px;
  margin-top: 10px;
  resize: none;
}

.button {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: #111827;
  color: white;
  cursor: pointer;
  font-size: 16px;
  transition: 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.button:hover {
  transform: scale(1.04);
  box-shadow: 0px 0px 15px gray;
  background: #2563eb;
}

  .mcq-options {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin: 15px 0;
  }

  .mcq-option {
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid #1e293b;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    text-align: center;
    font-weight: 600;
  }

  .mcq-option:hover {
    transform: scale(1.02);
    background: #2563eb;
  }

  .mcq-option.correct {
    background: #16a34a;
    border-color: #15803d;
  }

  .mcq-option.wrong {
    background: #dc2626;
    border-color: #b91c1c;
  }

    background: #3367d6;
  }


.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.link-btn {
  text-decoration: none;
}

.tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  background: #1e293b;
  color: white;
  font-size: 14px;
  margin-top: 5px;
}

.popular-searches {
  margin-top: 10px;
}

.popular-searches button {
  margin: 5px;
  padding: 8px 12px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  background: #f472b6;
  color: white;
}

#favoritesList {
  margin-top: 15px;
  padding-left: 20px;
}

#favoritesList li {
  margin-bottom: 8px;
}

#authMessage,
#userStatus,
#feedbackMsg,
#gameHint,
#gameMessage,
#gameScore,
#gameAnswer {
  margin-top: 10px;
}

@media (max-width: 700px) {
  input {
    width: 100%;
  }

  .search-area {
    flex-direction: column;
  }

  .button-row,
  .nav-links {
    flex-direction: column;
  }
}