* {
  margin: 0; padding: 0; box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif; user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh; display: flex; justify-content: center; align-items: center;
  background: radial-gradient(circle at top, #0a1a3a, #000);
  overflow: hidden; color: white;
}

.stars { position: absolute; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.star { position: absolute; width: 2px; height: 2px; background: white; border-radius: 50%; animation: twinkle 3s infinite alternate; }

@keyframes twinkle { from { opacity: 0.2; } to { opacity: 1; transform: scale(1.5); } }

.container {
  z-index: 5; width: 90%; max-width: 500px; padding: 25px;
  border-radius: 24px; background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px); text-align: center;
  position: absolute; opacity: 0; pointer-events: none;
  transform: translateY(40px) scale(0.9);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.container.page-active {
  opacity: 1; pointer-events: auto;
  transform: translateY(0px) scale(1);
  position: relative;
}

.container.page-exit {
  opacity: 0; transform: translateY(-40px) scale(0.9);
  filter: blur(10px);
}

h1 { font-size: 32px; margin-bottom: 20px; color: #38bdf8; text-shadow: 0 0 15px rgba(56, 189, 248, 0.5); }

.menu-btn, .tab-btn, .answer-btn {
  cursor: pointer; border: none; transition: 0.3s; color: white;
}

.menu-btn {
  width: 100%; padding: 14px; margin: 10px 0; border-radius: 15px;
  background: rgba(255, 255, 255, 0.1); font-size: 16px;
}
.menu-btn:active { transform: scale(0.95); }

.tab-container { display: flex; gap: 10px; margin-bottom: 15px; }
.tab-btn { flex: 1; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.tab-btn.active { background: #1d4ed8; }

.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.back-btn-icon { background: rgba(255, 255, 255, 0.1); padding: 8px 15px; border-radius: 12px; color: white; }

.question-box { text-align: left; padding: 18px; background: rgba(255, 255, 255, 0.05); border-radius: 18px; margin-bottom: 15px; font-size: 16px; line-height: 1.4; white-space: pre-line; }

.answers { display: flex; flex-direction: column; gap: 10px; }
.answer-btn { padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); text-align: left; font-size: 14px; }
.answer-btn.correct { background: rgba(34, 197, 94, 0.3) !important; border: 1px solid #22c55e; }
.answer-btn.wrong { background: rgba(239, 68, 68, 0.3) !important; border: 1px solid #ef4444; }

.iq-box { margin-top: 15px; font-weight: bold; color: #facc15; font-size: 18px; }
.search-input { width: 100%; padding: 12px; border-radius: 12px; border: none; background: rgba(255, 255, 255, 0.1); color: white; margin-bottom: 15px; }
.animal-list { max-height: 45vh; overflow-y: auto; text-align: left; }
.animal-item { padding: 12px; background: rgba(255, 255, 255, 0.05); border-radius: 12px; margin-bottom: 8px; }

.modal-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: none; justify-content: center; align-items: center; z-index: 100; }
.modal-box { width: 85%; max-width: 400px; background: #111; padding: 25px; border-radius: 25px; }
