/* ===== Shared Styles (Header, Navbar, Footer) ===== */

header {
  border-bottom: 2px solid black;
  background-color: white;
  margin-bottom: 1.5rem;
}

.navbar {
  border-bottom: none !important;
  background-color: white;
}

.navbar .dropdown-menu .dropdown-item {
  font-size: 0.85rem;
  font-weight: 400;
  color: #0d6efd;
  padding: 0.5rem 1rem;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.navbar .dropdown-menu .dropdown-item:hover {
  color: #0a58ca;
  background-color: #f8f9fa;
}

.navbar-nav .nav-link {
  font-size: 0.85rem;
  color: #000;
}

.navbar .dropdown-toggle {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.navbar .dropdown-toggle:focus,
.navbar .dropdown-toggle:active,
.navbar .dropdown-toggle:hover {
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border: none !important;
}

.dropdown:hover > .dropdown-menu {
  display: block;
  margin-top: 0;
}

.dropdown-menu {
  transition: all 0.2s ease;
}

footer {
  border-top: 2px solid #000 !important;
  border-bottom: 2px solid #ccc !important;
  background-color: #f8f9fa;
  padding: 0.75rem 1rem;
}

footer p {
  font-size: 0.8rem;
  margin-bottom: 0;
}

footer .container {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

footer .d-flex {
  gap: 1rem;
}

.d-flex.gap-3 > a img {
  width: 24px;
  height: 24px;
  display: block;
}

h3 {
  text-align: center;
  font-weight: bold;
  font-size: 1rem;        
  color: #0b3d91;       
}

main.container p {
  text-align: left;
}


/* ===== Home Page Styles ===== */

h3.mb-4.home-main-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0b3d91;
  text-align: center;
  margin-bottom: 1.5rem;
}

section.home-games-section h3.mb-4 {
  font-size: 1rem;
  color: #000;
}

.gameBox {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
  background-color: #fff;
  display: flex;
  flex-direction: column;
}

.gameBox h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0a3d75;
  margin-bottom: 0.75rem;
  text-align: center;
}

.gameBox p {
  font-size: 0.85rem;
}

.playButton {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background-color: #198754;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  align-self: flex-end;
}

.playButton:hover {
  background-color: #146c43;
  color: white;
  text-decoration: none;
}

#quote-display {
  font-style: italic;
}

main.container {
  margin-bottom: 1rem;
}

/* ===== About Page Styles ===== */

h3.mb-4.about-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #0b3d91;
  text-align: center;
}

main.about-content p {
  font-size: 0.875rem;
  line-height: 1.4;
}

/* ===== Contact Us Page Styles ===== */

h3.contact-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #0b3d91;
  text-align: center;
  margin-bottom: 1.5rem;
}


button.btn {
  font-size: 0.9rem;
  padding: 0.375rem 0.75rem;
}

/* ===== Login/Register and Account Page Styles ===== */

h3.login-register-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #0b3d91;
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-fields {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.form-group {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0.85rem;
}

.form-group label {
  width: 100px;
  margin-bottom: 0;
  text-align: left;
  padding-right: 0.75rem;
  font-weight: 500;
  font-size: 0.85rem;
}

.form-group input {
  width: 100%;
  flex-shrink: 0;
}

#ageCheck {
  margin-right: 0.3rem;
  font-size: 0.5rem;
}

.age-label {
  font-size: 0.5rem;
}

.small-text {
  font-size: 0.875rem;
}

form {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

#loginForm button[type="submit"],
#registerForm button[type="submit"] {
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
}

.form-toggle-link {
  color: #0d6efd;
  cursor: pointer;
  text-decoration: none;
}

.form-toggle-link:hover {
  text-decoration: underline;
}

input.form-control {
  font-size: 14px !important;
  height: 48px !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input.form-control {
  font-size: 14px !important;
  height: 48px !important;
}

input::placeholder {
  font-size: 14px;
}

label.col-form-label {
  font-size: 0.7rem;
}


/* ===== Game: Anagram Hunt & Math Facts ===== */

.game-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
  max-width: 700px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

main p {
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
}

main ul {
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: left;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  list-style-position: inside;
  margin-bottom: 1.5rem;
}

/* Game UI: Math Facts Practice */

#start-screen > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

#start-screen > div > div {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

#start-screen select,
#start-screen button {
  font-size: 1rem;
  padding: 0.35rem 0.6rem;
}

#game-screen {
  margin-top: 1rem;
  text-align: center;
}

#timer,
#score {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

#problem {
  font-size: 1.5rem;
  margin: 10px 0;
}

#answer {
  font-size: 1.2rem;
  padding: 0.4rem 0.6rem;
  width: 100%;
  max-width: 200px;
  text-align: center;
  margin-bottom: 1rem;
  border-radius: 5px;
  border: 1px solid #ced4da;
}

.buttons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 220px;
  margin: 0 auto 1rem auto;
}

.buttons-grid button {
  font-size: 1rem;
  padding: 0.5rem 0;
  border-radius: 5px;
  border: 1px solid #ced4da;
  background-color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.buttons-grid button:hover,
.buttons-grid button:focus {
  background-color: #e9ecef;
  outline: none;
}

#end-screen h3 {
  margin-bottom: 0.75rem;
}

#end-screen p {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

#end-screen button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #0d6efd;
  background-color: #0d6efd;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#end-screen button:hover,
#end-screen button:focus {
  background-color: #0a58ca;
  outline: none;
}

.hidden {
  display: none !important;
}

.contentBox {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.times-up-text {
  color: red;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 3rem; 

}

.calculator-grid button {
  height: 60px;
  font-size: 1.5rem;
  border-radius: 10px;
  border: none;
  background-color: #f0f0f0;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease;
}

.calculator-grid button:hover {
  background-color: #dbeafe;
}

.btn-clear {
  background-color: #fca5a5;
}

.btn-clear:hover {
  background-color: #f87171;
  color: white;
}

.btn-submit {
  background-color: #86efac;
}

.btn-submit:hover {
  background-color: #4ade80;
  color: white;
}
