body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f8fafc;
  color: #222;
  margin: 0;
  padding: 0;
}
header {
  background: #0073aa;
  color: #fff;
  padding: 1em 0;
  text-align: center;
}
nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 0.5em;
  font-weight: bold;
}
nav a:hover {
  text-decoration: underline;
}
main {
  max-width: 700px;
  margin: 2em auto;
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
form label {
  font-weight: bold;
}
form input, form textarea {
  width: 100%;
  margin-bottom: 1em;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 4px;
}
form button {
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 0.75em 2em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
}
form button:hover {
  background: #005077;
}
.welcome-section {
  text-align: center;
  margin-bottom: 2em;
}
.quiz-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2em;
  margin: 1.5em 0;
}
.quiz-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #0073aa 60%, #005077 100%);
  color: #fff;
  padding: 1em 2.2em;
  border-radius: 2em;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin: 0.3em 0;
  cursor: pointer;
}
.quiz-link:hover {
  background: linear-gradient(90deg, #005077 60%, #0073aa 100%);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}
.quiz-section {
  background: #f0f8ff;
  border-radius: 10px;
  max-width: 520px;
  margin: 2em auto;
  padding: 2em 1em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.wordle-container {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}
.language-select label {
  font-weight: 500;
  margin-right: 0.5em;
}
.language-select select {
  border: 1px solid #0073aa;
  color: #0073aa;
  background: #f0f8ff;
  padding: 5px 10px;
  font-size: 1em;
  border-radius: 4px;
}
.board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  justify-content: center;
  margin: 1.5em 0 1em 0;
}
.tile {
  width: 48px;
  height: 48px;
  border: 2px solid #ccc;
  font-size: 1.5em;
  line-height: 48px;
  text-transform: uppercase;
  background: #e6f2f7;
  border-radius: 6px;
  font-family: inherit;
}
.correct { background-color: #0073aa; color: #fff; }
.present { background-color: #005077; color: #fff; }
.absent { background-color: #ccc; color: #fff; }
.wordle-container input[type="text"] {
  width: 60%;
  box-sizing: border-box;
  margin-bottom: 10px;
  border: 1px solid #0073aa;
  background: #f0f8ff;
  color: #005077;
  border-radius: 4px;
  padding: 8px;
  font-size: 1em;
}
.wordle-container button {
  background-color: #0073aa;
  color: #fff;
  border: none;
  padding: 10px 24px;
  font-size: 1em;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.5em;
  transition: background 0.3s;
  font-family: inherit;
}
.wordle-container button:hover {
  background-color: #005077;
}
#wordle-message {
  font-weight: bold;
  margin-top: 15px;
  color: #0073aa;
}
.quiz-container {
  max-width: 500px;
  margin: 2em auto;
  background: #f0f8ff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 2em 1em;
  text-align: center;
}
.quiz-q {
  font-size: 1.2em;
  margin-bottom: 1em;
  font-weight: bold;
}
.quiz-opt {
  background: linear-gradient(90deg, #0073aa 60%, #005077 100%);
  color: #fff;
  border: none;
  border-radius: 2em;
  padding: 0.7em 2em;
  margin: 0.5em 0.5em;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.quiz-opt:hover {
  background: linear-gradient(90deg, #005077 60%, #0073aa 100%);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}
.quiz-feedback {
  margin-top: 1em;
  font-size: 1.1em;
  font-weight: bold;
}
.quiz-container input[type="text"] {
  width: 60%;
  margin-bottom: 1em;
  padding: 0.5em;
  border: 1px solid #0073aa;
  border-radius: 4px;
  font-size: 1em;
  background: #f0f8ff;
  color: #005077;
}
/* Universal button styling for all buttons, including Quiz and Fill in the Blank */
button, .btn, input[type="button"], input[type="submit"] {
  display: inline-block;
  padding: 0.75em 2em;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--button-text, #fff);
  background: linear-gradient(90deg, #4f8cff 0%, #6c63ff 100%);
  border: none;
  border-radius: 2em;
  box-shadow: 0 2px 8px rgba(76, 110, 245, 0.08);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  margin: 0.5em 0.5em 0.5em 0;
  outline: none;
}

button:hover, .btn:hover, input[type="button"]:hover, input[type="submit"]:hover {
  background: linear-gradient(90deg, #6c63ff 0%, #4f8cff 100%);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 16px rgba(76, 110, 245, 0.15);
}

button:active, .btn:active, input[type="button"]:active, input[type="submit"]:active {
  background: linear-gradient(90deg, #3a6eea 0%, #4f8cff 100%);
  transform: scale(0.98);
}

/* For dark theme */
body.dark-theme button, body.dark-theme .btn, body.dark-theme input[type="button"], body.dark-theme input[type="submit"] {
  background: linear-gradient(90deg, #232946 0%, #4f8cff 100%);
  color: #fff;
}

body.dark-theme button:hover, body.dark-theme .btn:hover, body.dark-theme input[type="button"]:hover, body.dark-theme input[type="submit"]:hover {
  background: linear-gradient(90deg, #4f8cff 0%, #232946 100%);
}
body.dark-theme {
  background: #181c24;
  color: #e0e6ef;
}
body.dark-theme header {
  background: #23293a;
  color: #fff;
}
body.dark-theme nav a {
  color: #fff;
}
body.dark-theme main, body.dark-theme .main {
  background: #23293a;
  color: #e0e6ef;
}
body.dark-theme .quiz-container,
body.dark-theme .wordle-section {
  background: #23293a;
  color: #e0e6ef;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
body.dark-theme .quiz-link,
body.dark-theme .quiz-opt,
body.dark-theme .wordle-container button {
  background: linear-gradient(90deg, #23293a 60%, #005077 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
body.dark-theme .quiz-link:hover,
body.dark-theme .quiz-opt:hover,
body.dark-theme .wordle-container button:hover {
  background: linear-gradient(90deg, #005077 60%, #23293a 100%);
}
body.dark-theme .tile {
  background: #23293a;
  border-color: #444;
  color: #e0e6ef;
}
body.dark-theme .correct { background-color: #0073aa; color: #fff; }
body.dark-theme .present { background-color: #005077; color: #fff; }
body.dark-theme .absent { background-color: #444; color: #fff; }
body.dark-theme input, body.dark-theme textarea {
  background: #23293a;
  color: #e0e6ef;
  border: 1px solid #444;
}
body.dark-theme .language-select select {
  background: #23293a;
  color: #e0e6ef;
  border: 1px solid #444;
}
body.dark-theme #wordle-message, body.dark-theme .quiz-feedback {
  color: #7ecfff;
}
body.dark-theme .quiz-container input[type="text"] {
  background: #23293a;
  color: #e0e6ef;
  border: 1px solid #444;
}
footer {
  width: 100%;
  background: var(--footer-bg, #232946);
  color: var(--footer-text, #fff);
  text-align: center;
  padding: 1.5em 0 1em 0;
  margin-top: 2em;
  font-size: 1.05rem;
  box-shadow: 0 -2px 12px rgba(76, 110, 245, 0.05);
}

footer nav {
  display: inline-block;
  background: rgba(255,255,255,0.04);
  border-radius: 1.5em;
  padding: 0.5em 1.5em;
}

footer a {
  color: var(--footer-link, #a3bcf9);
  text-decoration: none;
  margin: 0 0.5em;
  font-weight: 500;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--footer-link-hover, #6c63ff);
  text-decoration: underline;
}

body.dark-theme footer {
  background: #151a2b;
  color: #fff;
}

.contact-form {
  max-width: 420px;
  margin: 2em auto;
  background: var(--form-bg, #f6f8ff);
  border-radius: 1.5em;
  box-shadow: 0 2px 12px rgba(76, 110, 245, 0.07);
  padding: 2em 2em 1.5em 2em;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.contact-form label {
  font-weight: 600;
  margin-bottom: 0.2em;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid #bfc9e0;
  border-radius: 0.7em;
  padding: 0.7em 1em;
  font-size: 1rem;
  background: #fff;
  color: #232946;
  transition: border 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border: 1.5px solid #6c63ff;
  outline: none;
}

body.dark-theme .contact-form {
  background: #232946;
  box-shadow: 0 2px 12px rgba(76, 110, 245, 0.13);
}

body.dark-theme .contact-form input,
body.dark-theme .contact-form textarea {
  background: #151a2b;
  color: #fff;
  border: 1px solid #4f8cff;
}

.contact-intro {
  text-align: center;
  margin-top: 2em;
  margin-bottom: 1.5em;
}

@media (max-width: 600px) {
  footer nav {
    padding: 0.5em 0.5em;
    font-size: 0.98rem;
  }
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin: 1em 0 0.5em 0;
}

#captcha-label {
  font-weight: 600;
}

#captcha {
  width: 4em;
  padding: 0.5em 0.7em;
  border-radius: 0.7em;
  border: 1px solid #bfc9e0;
  font-size: 1rem;
}

.captcha-error {
  color: #e74c3c;
  font-size: 0.98rem;
  min-height: 1.2em;
  margin-bottom: 0.5em;
}

body.dark-theme #captcha {
  background: #151a2b;
  color: #fff;
  border: 1px solid #4f8cff;
}
