html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Style for the 'Fuzzy' part of the logo */
.logo-fuzzy {
  /* This applies a blur effect */
  filter: blur(1.5px);

  /* This makes it slightly less prominent */
  opacity: 0.9;
}

/* Increase the font size for the main plot description */
.puzzle-container .lead {
  font-size: 1.5rem; /* The default is 1.25rem, so this is a nice bump up */
  font-weight: 400; /* A slightly heavier font weight can also improve focus */
}

/* --- Mobile-Specific Fixes --- */

/* On smaller screens (like phones), set form inputs to 16px to prevent auto-zoom */
@media (max-width: 767px) {
  .game-interaction-area .form-control {
    font-size: 16px;
  }
}

/* --- Dark Mode Styles --- */

body.dark-mode {
  background-color: #212529;
  color: #e9ecef;
}

/* --- Navbar Overrides --- */
body.dark-mode .navbar {
  background-color: #343a40 !important;
  border-color: #454d55 !important;
}

body.dark-mode .navbar .nav-link.text-dark {
  color: #f8f9fa !important;
}

body.dark-mode .navbar-toggler-icon {
  filter: invert(1);
}

/* --- Alert Box Overrides (High Contrast) --- */

body.dark-mode .alert-success {
  background-color: #a3e3b7; /* Light green background */
  color: #0f5126; /* Dark green text (from the original border color for good contrast) */
  border-color: #0f5126;
}

body.dark-mode .alert-danger {
  background-color: #f1b5c0; /* Light red background */
  color: #842029; /* Dark red text */
  border-color: #842029;
}

body.dark-mode .alert-warning {
  background-color: #ffda6a; /* Light yellow background */
  color: #664d03; /* Dark yellow/brown text */
  border-color: #997404;
}

/* --- Modal Overrides --- */
.dark-mode .modal-content {
  background-color: #2b3035;
  color: #f8f9fa;
  border-color: #454d55;
}

.dark-mode .modal-header {
  border-bottom-color: #454d55;
}

.dark-mode .modal-footer {
  border-top-color: #454d55;
}

.dark-mode .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* --- Brand Color Overrides --- */
.dark-mode .navbar-brand {
  color: #4dabf7;
}

.dark-mode h1.display-5 {
  color: #4dabf7;
}

/* --- Styles for the Theme Toggle Switch --- */
.theme-switch-wrapper {
  /* This uses the flexbox classes from the HTML, but you can add more styles here if needed */
}

/* Optional: A slightly darker background for the 'off' state of the toggle switch */
.dark-mode .theme-switch .slider {
  background-color: #555;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px; /* Smaller width */
  height: 28px; /* Smaller height */
}

/* Hide the default checkbox */
.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider track */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
}

/* The slider nub */
.slider:before {
  position: absolute;
  content: "";
  height: 20px; /* Adjusted size */
  width: 20px; /* Adjusted size */
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
}

/* The "on" state when the checkbox is checked */
input:checked + .slider {
  background-color: #0d6efd; /* A standard blue, change as you like */
}

input:checked + .slider:before {
  transform: translateX(22px); /* Adjusted movement */
}

/* Rounded corners for the slider and nub */
.slider.round {
  border-radius: 28px;
}

.slider.round:before {
  border-radius: 50%;
}
