:root {
  --primary-color: #3da342;
  --primary-dark: #2e7d32;
  --primary-darker: #133415;
  --primary-light: #c3e9c5;
  --primary-lighter: #c3e9c5;
  --background-color: #f4f4f9;
  --text-color: #333;
  --white: #fff;
  --light-text: #f8f8f8;
  --gray-light: #ddd;
  --gray: #ccc;
  --gray-medium: #555;
  --gray-dark: #444;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --canvas-bg-color: #fff;
  --canvas-opacity: 0.4;
}

body.dark-mode {
  --primary-color: #2e7d32;
  --primary-dark: #1b5e20;
  --primary-darker: #0d3310;
  --primary-light: #419444;
  --primary-lighter: #388e3c;
  --background-color: #121212;
  --text-color: #e0e0e0;
  --white: #1e1e1e;
  --light-text: #f0f0f0;
  --gray-light: #2a2a2a;
  --gray: #3a3a3a;
  --gray-medium: #888;
  --gray-dark: #bbb;
  --shadow-color: rgba(0, 0, 0, 0.6);
  --canvas-bg-color: #000;
  --canvas-opacity: 0.5;
}

body {
  font-family: "Zain", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: var(--background-color);
  color: var(--text-color);
}

#overlay {
  background: var(--gray-dark);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: none;
  transition: all 0.5s ease;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  z-index: -1;
  opacity: var(--canvas-opacity);
}

h1 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1rem;
  font-family: "Sigmar";
  font-weight: 400;
  font-size: 3.5rem;
  transform: scaleY(1.3);
  -webkit-text-stroke: 2px;
  -webkit-text-stroke-color: var(--primary-darker);
}

a {
  text-decoration: none;
}

p {
  font-size: 1.8rem;
  margin-top: 0rem;
  text-align: center;
  max-width: 600px;
}

#start {
  padding: 0.5rem 1.2rem 0.5rem;
  font-size: 1.4rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--light-text);
  background: var(--primary-dark);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 1.1rem;
}

#start:hover {
  background: var(--primary-color);
  transform: scale(1.2);
}

.ques0,
.ques1,
.ques2,
.ques3,
.ques4,
.ques5,
.ques6,
.ques7 {
  display: none;
  margin-top: 1.3rem;
  padding: 1.3rem;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 8px var(--shadow-color);
  width: 90%;
  max-width: 500px;
  text-align: center;
}

h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.6rem;
  font-family: "Sigmar";
  font-weight: 300;
  transform: scaleY(1.2);
}

label {
  display: block;
  margin: 0.8rem 0;
  padding: 1rem;
  border: 1px solid var(--gray-light);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  font-size: 1.2rem;
}

label:hover {
  background: var(--primary-light);
  transform: scale(1.02);
}

input[type="radio"] {
  margin-right: 0.7rem;
  vertical-align: middle;
}

.button-container {
  display: flex;
  justify-content: flex-start;
}

.buttons-container {
  display: flex;
  justify-content: space-between;
}

button#submit {
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--light-text);
  background: var(--primary-dark);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.1s ease;
  margin-top: 1.7rem;
}

button.back {
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.1s ease;
  margin-top: 1.7rem;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  color: var(--gray-dark);
  background: var(--gray-light);
  border: 1px solid var(--gray);
}

button.back:hover {
  background: var(--gray);
  color: var(--text-color);
}

button#submit:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

#result {
  padding: 1.8px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 8px var(--shadow-color);
  width: 90%;
  max-width: 700px;
  display: none;
  align-items: center;
  flex-direction: column;
  margin: 2rem;
  margin-top: 3rem;
}

#result button {
  padding: 0.7rem 0.7rem;
  background: var(--primary-dark);
  color: var(--light-text);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.1s ease;
  position: relative;
  bottom: 10px;
  font-family: "Zain";
  font-weight: 800;
  letter-spacing: 0.8px;
  font-size: 1.4rem;
}

#result button:hover {
  background: var(--primary-color);
}

#result p {
  font-size: 1.5rem;
  margin: 1rem;
}

#note {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  padding: 1rem 2rem;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
  width: 85%;
  max-width: 500px;
  z-index: 10000;
}

#note h2 {
  font-size: 2.2rem;
  margin: 0;
  margin-bottom: 0.6rem;
}

#note p {
  font-size: 1.5rem;
}

#note span {
  background: var(--primary-lighter);
  border-radius: 5px;
  display: inline-block;
  line-height: 1.7rem;
  padding-inline: 0.5rem;
}

#note button {
  padding: 0.3rem 0.8rem;
  background: var(--primary-color);
  color: var(--light-text);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.1s ease;
  position: relative;
  bottom: 10px;
  font-family: "Zain";
  font-weight: 800;
  letter-spacing: 0.8px;
  font-size: 1.4rem;
}

#note button:hover {
  background: var(--primary-color);
}

#connect {
  display: none;
  margin: 1.5rem;
}

#connect a {
  font-weight: 900;
  color: #f0f0f0;
}

#connect a:hover {
  text-decoration: wavy underline;
  color: #ff9800;
}

#connect a:visited {
  color: #888;
}

footer {
  display: none;
  position: fixed;
  bottom: 5px;
  margin: 1rem;
}

#darkModeToggle {
  background: var(--button-bg, #f4f4f9);
  border: none;
  border-radius: 50%;
  padding: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 15px;
  right: 15px;
}

#darkModeToggle:hover {
  transform: scale(1.1);
}

#darkModeToggle svg {
  display: none;
}

#darkModeToggle svg:first-child {
  display: block;
}

#darkModeToggle.dark svg:first-child {
  display: none;
}

#darkModeToggle.dark svg:last-child {
  display: block;
}

#move {
  padding: 8px;
  border: none;
  border-radius: 50%;
  position: fixed;
  top: 70px;
  right: 15px;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1200px) {
  /* Adjustments for large desktops and smaller laptops */
  h1 {
    font-size: 3rem;
  }
}

@media (max-width: 992px) {
  /* Adjustments for tablets (portrait and landscape) */
  h1 {
    font-size: 2.8rem;
    -webkit-text-stroke-width: 1.5px;
  }

  p {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  label {
    font-size: 1.1rem;
    padding: 0.8rem;
  }

  #start,
  #submit {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  /* Adjustments for smaller tablets and larger phones */
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 2.5rem;
    -webkit-text-stroke-width: 1px;
  }

  p {
    font-size: 1.4rem;
  }

  .ques0,
  .ques1,
  .ques2,
  .ques3,
  .ques4,
  .ques5,
  .ques6,
  .ques7 {
    padding: 1rem;
  }

  label {
    font-size: 1rem;
    padding: 0.7rem;
  }

  #result p {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  /* Adjustments for mobile phones */
  h1 {
    font-size: 2rem;
    -webkit-text-stroke-width: 0.5px;
  }

  p {
    font-size: 1.2rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  label {
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  .button-container,
  .buttons-container {
    flex-direction: column;
    align-items: center;
  }

  button#submit {
    width: 100%;
    margin-top: 1rem;
  }

  button.back {
    width: 100%;
    margin-top: 0.5rem;
  }

  #note {
    width: 95%;
    padding: 0.8rem 1rem;
  }

  #note h2 {
    font-size: 1.8rem;
  }

  #note p {
    font-size: 1.2rem;
  }

  #note button {
    font-size: 1.2rem;
  }

  #darkModeToggle,
  #move {
    top: 10px;
    right: 10px;
    padding: 6px;
  }

  #move {
    top: 60px;
    right: 10px;
  }
}
