* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  margin: 0;
  background: #f7f9fc;
  color: #222;
}

header {
  background: #0057b7;
  color: white;
  padding: 1.2rem;
  text-align: center;
}

#search {
  width: 80%;
  max-width: 600px;
  margin-top: 1rem;
  padding: 0.6rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
}

main {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.topic {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.15s;
}

.topic:hover {
  transform: translateY(-3px);
}

.topic h2 {
  color: #0057b7;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

footer {
  background: #eee;
  text-align: center;
  padding: 0.8rem;
  font-size: 0.9rem;
}

.unit {
  font-style: italic;
  color: #555;
  margin-bottom: 0.5em;
}
/* --- Navigation Bar --- */
.navbar {
  background: #0a0a23;
  color: #fff;
  padding: 0.8em 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  width: 90%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.3em;
  font-weight: bold;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5em;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

.nav-links a:hover {
  color: #4ad7d1;
}
/* === Games Section === */
.games-section {
  text-align: center;
  padding: 2em 1em;
}

.game-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
  margin-top: 1.5em;
}

.game-buttons button {
  background: #4ad7d1;
  color: #0a0a23;
  border: none;
  padding: 0.8em 1.5em;
  font-size: 1em;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.game-buttons button:hover {
  background: #3bb5b0;
  transform: scale(1.05);
}

.game-area {
  margin-top: 2em;
  max-width: 700px;
  margin-inline: auto;
  background: #fff;
  padding: 1.5em;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  min-height: 200px;
}

.quiz-option {
  display: block;
  margin: 0.5em 0;
  padding: 0.8em;
  background: #eee;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.quiz-option:hover {
  background: #d8f7f5;
}

.correct {
  background: #a8f0a5 !important;
}

.incorrect {
  background: #f6a5a5 !important;
}

.match-pair {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin: 0.5em 0;
}

.fill-input {
  width: 80%;
  padding: 0.6em;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 0.5em;
}

.drag-item {
  background: #d8f7f5;
  padding: 0.8em;
  margin: 0.5em;
  border-radius: 8px;
  cursor: grab;
}

.drop-zone {
  min-height: 50px;
  background: #f8f8f8;
  border: 2px dashed #ccc;
  border-radius: 8px;
  margin: 0.5em 0;
  padding: 0.5em;
}


.printables-container {
  padding: 2rem;
  text-align: center;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.resource-card {
  background: #f4f4f4;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: 0.3s;
}

.resource-card:hover {
  transform: translateY(-5px);
}

.resource-card button {
  background: #0078d7;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  margin: 0.3rem;
  cursor: pointer;
  transition: background 0.2s;
}

.resource-card button:hover {
  background: #005fa3;
}

.custom-section {
  margin-top: 3rem;
  background: #e8f1ff;
  padding: 2rem;
  border-radius: 15px;
}

#customForm {
  margin-top: 1rem;
}

footer {
  margin-top: 3rem;
  padding: 1rem;
  background: #222;
  color: white;
}
