<style>
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  background-color: #f0f4f8;
  color: #333;
}

h1 {
  text-align: center;
  margin: 30px 0 15px;
  font-size: 2rem;
  color: #1f3c88;
}

.button-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

select, button {
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
}

select {
  background: white;
  border: 2px solid #1f3c88;
}

button {
  background-color: #1f3c88;
  color: white;
  cursor: pointer;
}

button:hover {
  background-color: #3757b2;
}

#questions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  font-size: 24px;
  gap: 25px;
  max-width: 1200px;
  margin: auto;
}

.question-box {
  background: white;
  border-radius: 12px;
  padding: 25px 40px;
  min-height: 200px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  position: relative;
  cursor: pointer;
  text-align: center;
}

.question-header {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.solution {
  display: none;
  margin-top: 15px;
  color: #006400;
}

.marks {
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-weight: 700;
}

/* Base style for both refresh buttons */
.refresh-btn,
.refresh-same {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Top button - random question */
.refresh-btn {
  top: 10px;
  right: 10px;
  background: #e0e7ff;
  color: #1f3c88;
}

.refresh-btn:hover {
  background: #1f3c88;
  color: white;
}

/* Bottom button - same topic */
.refresh-same {
  top: 50px; /* lower than top button */
  right: 10px;
  background: #d0f0ff; /* different colour for distinction */
  color: #0077aa;
}

.refresh-same:hover {
  background: #0077aa;
  color: white;
}



hr {
  margin: 40px auto 20px;
  max-width: 1000px;
  border: none;
  border-top: 2px solid #ccc;
}

.topic-toolbar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  max-width: 1200px;
  margin: 20px auto;
  background: #e3eaf4;
  padding: 15px;
  border-radius: 12px;
}

.topic-wrapper {
  text-align: center;
  min-width: 180px;
}


.topic-wrapper select {
  width: 100%;
  width: 160px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}




.topic-wrapper label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

.topic-wrapper select {
  padding: 6px 10px;
  border-radius: 6px;
}
.nav-bar {
  display: flex;
  justify-content: center;
  background: #1f3c88;
  padding: 10px 0;
  list-style: none;
  margin: 0;
}

.nav-bar li {
  margin: 0 12px;
}

.nav-bar a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
}

.nav-bar a:hover, .nav-bar a.active {
  background: #3757b2;
}

nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 12px;
  background-color: #1f3c88;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
}

nav a.active {
  background-color: #3757b2;
}

.practice-topic {
  top: 90px; /* below the same-topic refresh */
  right: 10px;
  background: #ffe0b2; /* soft orange */
  color: #b35f00;
}

.practice-topic:hover {
  background: #b35f00;
  color: white;
}



</style>
