@font-face {
  font-family: "gliken";
  src: url("../fonts/Gliker-Black.woff");
  font-weight: bold;
}

@font-face {
  font-family: "roboto";
  src: url("../fonts/Roboto-Regular.ttf");
  font-weight: normal;
}

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

fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

:root {
  --LockIn-purple: #855af8;
  --LockIn-purple-light: #9e86ff;
  --LockIn-purple-blue: #5f70ee;
  --LockIn-blue: #468df2;
  --LockIn-blue-light: #50a5f8;
  --LockIn-blue-lighter: #56b0f0;
  --LockIn-background-cream: #fbf9f1;
  font-family: "gliken", sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background-color: #fff;
  font-family: "gliken", sans-serif;
  height: 100vh;
  overflow-y: auto;
  position: relative;
  background-color: var(--LockIn-background-cream);
}

button {
  color: white;
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  background-color: var(--LockIn-purple);
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 20px;
}

button:hover {
  background-color: var(--LockIn-purple-light);
}

button.hint-button {
  background-color: var(--LockIn-blue-light);
  color: white;
  font-weight: bold;
  font-size: 18px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  margin-top: 10px;
  transition: background-color 0.3s ease;
  font-family: "roboto";
}

button.hint-button:hover {
  background-color: var(--LockIn-blue);
}


label {
  display: inline-block;
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 6px;
  font-weight: bold;
  font-size: 18px;
}

#curriculum-label {
  background-color: var(--LockIn-purple);
}
#level-label {
  background-color: var(--LockIn-purple-light);
}
#subject-label {
  background-color: var(--LockIn-purple-blue);
}
#topic-label {
  background-color: var(--LockIn-blue);
}
#difficulty-label {
  background-color: var(--LockIn-blue-light)
}
#numQuestions-label {
  background-color: var(--LockIn-blue-lighter)
}

.main-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; 
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.logo-img {
  width: 60px;
  height: auto;
}

.logo-img-full {
  max-width: 175px;
  height: auto;
  object-fit: contain;
}

.logo-title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.mode-title {
  font-size: 60px;
  color: var(--LockIn-purple);
  margin: 20px 0 25px 0;
  font-weight: bold;
}

.mode-buttons {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 10px;
}

button.learn-button {
  background-color: var(--LockIn-blue-light);
  border: 2px solid black;
}

button.quiz-button {
  background-color: var(--LockIn-purple);
  border: 2px solid black;
}

button.learn-button:hover {
  background-color: var(--LockIn-blue);
}

button.quiz-button:hover {
  background-color: var(--LockIn-purple-light);
}

.mode-buttons button {
  border-radius: 14px;
  font-size: 18px;
  padding: 12px 27px;
  min-width: 180px;
  font-family: "gliken";
}

.bo-img {
  position: absolute;
  left: 3%;
  bottom: 0;
  height: 65%;
  max-width: 400px;
  object-fit: contain;
  z-index: 0;
}

#output {
  display: none;
  position: relative;
  max-width: 900px;
  margin: 40px auto;
  padding: 40px;
  background-color: #fdfdfd;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  font-size: 20px;
  color: #333;
  transition: all 0.3s ease;
  font-family: "roboto";
}

/* === Quiz Page Layout === */
.quiz-form-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 360px;
  margin-top: 40px;
  margin-bottom: 0px;
  max-width: 960px;
  padding: 0 20px;
}

/* Left column: Title + Bo image */
.form-left-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(-40px);
}

.quiz-title {
  font-size: 64px;
  color: var(--LockIn-purple);
  margin-bottom: 8px;
}

.bo-reading-img {
  max-height: 200px;
  width: auto;
}

/* Middle column: Curriculum, subject, topic, difficulty */
.form-middle {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 250px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}


/* Right column: IB level */
.form-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 150px;  
}

/* Button and number input row */
.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: -25px;
}

.quiz-actions button {
  flex-grow: 1;
  font-size: 22px;
  padding: 16px 32px;
}

.quiz-actions input[type="number"] {
  padding: 14px;
  font-size: 18px;
  width: 100px;
  border-radius: 10px;
  border: 2px solid var(--LockIn-purple-blue);
}

#quiz-page {
  padding: 40px 60px;
  box-sizing: border-box;
}

.form-middle,
.form-right {
  font-size: 20px;
  transform: scale(1.1); 
  transform-origin: top left; 
}

.form-left-left {
  width: 220px;
}
.form-middle {
  min-width: 340px;
  font-size: 22px;
  gap: 20px;
}
.form-right {
  min-width: 200px;
  font-size: 22px;
  gap: 20px;
}

.form-row select,
.form-row input[type="text"],
.form-right select {
  font-size: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  width: 100%;
}

label {
  font-size: 22px;
  padding: 12px 16px;
}

.quiz-form-container {
  gap: 60px;
  max-width: 1100px;
}

.bo-reading-img {
  max-height: 300px;
}

#output button {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#output button:hover {
  transform: scale(1.05);
  background-color: var(--LockIn-purple-light) !important;
  color: black;
}

#score {
  font-size: 22px;
  color: #333;
  text-align: center;
  margin-top: 30px;
}

#score strong {
  color: var(--LockIn-purple);
}

input[type="text"],
input[type="number"],
select {
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  outline: none;
}

/* Loading Indicator */

.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 40px auto;
  padding: 20px;
  background-color: #f6f6ff;
  border: 2px solid var(--LockIn-purple-light);
  border-radius: 16px;
  max-width: 400px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.spinner {
  border: 6px solid #e3dfff;
  border-top: 6px solid var(--LockIn-purple);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 18px;
  color: var(--LockIn-purple-blue);
  font-family: "roboto";
}

.page-fade {
  animation: fadeInPage 0.5s ease-in-out;
}

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

button:active {
  transform: scale(0.96);
  transition: transform 0.1s;
}

.top-right-logo-link {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 999;
}

.top-right-logo {
  width: 45px;
  height: auto;
  transition: transform 0.2s ease;
}

.top-right-logo:hover {
  transform: scale(1.1);
}
