@import url('https://fonts.googleapis.com/css2?family=Bungee+Shade&family=Poppins:wght@400;700&display=swap');

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Add OpenDyslexic font */
@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/open-dyslexic/OpenDyslexic-Regular.otf');
}

/* Add Comic Sans font for dyslexic option */
.dyslexic-font {
  font-family: 'Comic Sans MS', cursive !important;
}

/* Add high contrast styles */
.high-contrast {
  background-color: #000 !important;
  color: #fff !important;
}

.high-contrast h1,
.high-contrast h2,
.high-contrast h3,
.high-contrast .subtitle,
.high-contrast .nav-btn,
.high-contrast button,
.high-contrast p,
.high-contrast li,
.high-contrast label {
  background-color: #000 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}

.high-contrast .dish-box,
.high-contrast .recipe,
.high-contrast main,
.high-contrast .tip-card,
.high-contrast .filter-sidebar,
.high-contrast .ingredient-question,
.high-contrast #result-container,
.high-contrast #recipe-container {
  background-color: #000 !important;
  border: 2px solid #fff !important;
}

.high-contrast #particles-js {
  background-color: #000 !important;
}

.high-contrast img {
  border: 2px solid #fff !important;
  filter: grayscale(100%) contrast(120%) !important;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: #003B5C;
  /* Dark blue background */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: -1;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #fff;
  text-align: center;
  font-size: 16px; /* Add base font size for scaling */
}

.content {
  position: relative;
  z-index: 1;
  padding: 20px;
}

header {
  margin-bottom: 30px;
  position: sticky;
  top: 0;
  /* Adjusted opacity to let grid show through */
  background-color: rgba(0, 59, 92, 0.5);
  padding: 20px;
  z-index: 2;
}

header a {
  text-decoration: none;
  color: inherit;
}

h1 {
  font-family: 'Bungee Shade', cursive;
  font-size: 4em;
  margin: 0;
  text-transform: uppercase;
  color: #FFC72C;
  text-shadow: 3px 3px 0px #CE0037;
}

.subtitle {
  font-size: 1.2em;
  color: #FFC72C;
  margin-top: 5px;
  margin-bottom: 20px;
  font-weight: 300;
  text-shadow: 1px 1px 0px #CE0037;
}

nav {
  margin-top: 20px;
}

nav ul {
  list-style-type: none;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav ul li {
  margin: 10px;
}

.nav-btn {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  background-color: #CE0037;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

.nav-btn:hover {
  background-color: #FFC72C;
  color: #003B5C;
  transform: scale(1.1);
}

main {
  max-width: 1200px;
  margin: 20px auto;
  /* Adjusted background to match header/result/recipe containers and lowered opacity */
  background-color: rgba(0, 59, 92, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.question {
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(20px);
}

.question h2 {
  color: #FFC72C;
  font-size: 1.5em;
  margin-bottom: 20px;
}

.options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

button {
  background-color: #FFC72C;
  border: none;
  color: #003B5C;
  padding: 12px 25px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 25px;
  font-weight: bold;
  text-transform: uppercase;
}

button:hover {
  background-color: #CE0037;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 15px;
  border-radius: 10px;
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
  transition: opacity .2s;
  margin: 20px 0;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #CE0037;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #CE0037;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

#result {
  font-size: 1.2em;
  margin-top: 20px;
  color: #FFC72C;
}

.done-btn {
  margin-top: 15px;
}

#recommended-dishes,
#recipe-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.dish-box {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.dish-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dish-box h3 {
  color: #FFC72C;
  margin-bottom: 10px;
}

.dish-box p {
  font-size: 0.9em;
  color: #fff;
}

.dish-box img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

#result-container,
#recipe-container {
  /* Adjusted opacity to let grid show through */
  background-color: rgba(0, 59, 92, 0.5);
  padding: 20px;
  margin-top: 30px;
  border-radius: 15px;
}

.recipe {
  text-align: left;
  margin-top: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
}

.recipe h3 {
  color: #FFC72C;
  margin-bottom: 10px;
}

.recipe ul,
.recipe ol {
  padding-left: 20px;
}

.recipe li {
  margin-bottom: 5px;
}

.back-btn {
  margin-top: 20px;
}

.arrow {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 30px solid #FFC72C;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-30px);
  }

  60% {
    transform: translateX(-50%) translateY(-15px);
  }
}

#search-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

#search-input {
  width: 80%;
  max-width: 500px;
  padding: 10px;
  font-size: 16px;
  border: none;
  border-radius: 25px;
}

.filter-toggle {
  background-color: #FFC72C;
  border: none;
  color: #003B5C;
  padding: 10px;
  margin-right: 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-toggle:hover {
  background-color: #CE0037;
  color: #fff;
}

.filter-sidebar {
  position: fixed;
  top: 0;
  left: -350px;
  width: 350px;
  height: 100%;
  background-color: rgba(0, 59, 92, 0.95);
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  transition: left 0.3s ease;
}

.filter-sidebar.open {
  left: 0;
}

@media (max-width: 768px) {
  .filter-sidebar {
    width: 100%;
    left: -100%;
  }
  
  .filter-sidebar.open {
    left: 0;
  }
}

.close-sidebar {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #FFC72C;
  font-size: 30px;
  cursor: pointer;
}

.filter-section {
  margin-bottom: 20px;
}

.filter-section h4 {
  color: #FFC72C;
  margin-bottom: 10px;
}

.scrollable-checkboxes {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 5px;
}

.scrollable-checkboxes label {
  display: block;
  margin-bottom: 5px;
  color: #fff;
}

.apply-filters {
  width: 100%;
  padding: 10px;
  background-color: #FFC72C;
  color: #003B5C;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.apply-filters:hover {
  background-color: #CE0037;
  color: #fff;
}

#ingredient-checkboxes label {
  display: flex;
  align-items: center;
}

#ingredient-checkboxes input[type="checkbox"] {
  margin-right: 10px;
}

#documentation {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: rgba(0, 59, 92, 0.5);
  border-radius: 15px;
  margin-top: 30px;
}

#documentation iframe {
  max-width: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
}

#ddev-logs {
  background-color: #000;
  color: #00ff00;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

#questions-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
  margin-top: 20px;
}

.question-cube {
  width: 200px;
  height: 200px;
  perspective: 1000px;
  cursor: pointer;
}

.question-cube-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.question-cube:hover .question-cube-inner {
  transform: rotateY(180deg);
}

.question-cube-front,
.question-cube-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  border-radius: 10px;
}

.question-cube-front {
  background-color: rgba(255, 199, 44, 0.8);
  color: #003B5C;
}

.question-cube-back {
  background-color: rgba(206, 0, 55, 0.8);
  color: #fff;
  transform: rotateY(180deg);
}

@media (max-width: 1200px) {
  #recipe-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  #recipe-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  #recipe-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  #recipe-list {
    grid-template-columns: 1fr;
  }
}

.accessibility-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #FFC72C;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  border: none;
  font-weight: bold;
  font-size: 14px;
  color: #003B5C;
}

.accessibility-button:focus {
  outline: 3px solid #CE0037;
}

.accessibility-menu {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background-color: rgba(0, 59, 92, 0.95);
  padding: 20px;
  border-radius: 10px;
  z-index: 999;
  width: 250px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: none;
}

.accessibility-menu.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.accessibility-menu h3 {
  color: #FFC72C;
  margin-top: 0;
}

.accessibility-option {
  margin: 15px 0;
}

.accessibility-option label {
  color: #fff;
  display: block;
  margin-bottom: 5px;
}

.accessibility-option select,
.accessibility-option input[type="range"] {
  width: 100%;
  padding: 5px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #FFC72C;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #FFC72C;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.form-group textarea {
  height: 100px;
  resize: vertical;
}

#question-form {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.chef-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.chef-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.chef-card:hover {
  transform: translateY(-10px);
}

.chef-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: #FFC72C;
  padding: 3px;
}

.chef-avatar svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #003B5C;
  padding: 1rem;
}

.chef-name {
  color: #FFC72C;
  font-size: 1.5em;
  margin: 0.5rem 0;
}

.chef-title {
  color: #fff;
  font-size: 1em;
  opacity: 0.8;
}

.chef-bio {
  margin-top: 1rem;
  font-size: 0.9em;
  line-height: 1.4;
}

.language-selector {
  display: none; /* Hide the language selector */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.tips-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.tip-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.tip-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tip-card h3 {
  color: #FFC72C;
  margin-bottom: 10px;
}

.tip-card img,
.article-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 15px 0;
  height: auto;
  object-fit: cover;
}

.featured-article {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
}

.featured-article img {
  max-width: 100%;
  border-radius: 8px;
  margin: 15px 0;
  height: auto;
}

.article-content {
  text-align: left;
  max-width: 800px;
  margin: 0 auto;
}

.article-content h4 {
  color: #FFC72C;
  margin: 20px 0 10px;
}

.article-content p {
  margin-bottom: 15px;
  line-height: 1.6;
}

#ingredient-questions {
  max-width: 600px;
  margin: 0 auto;
}

.ingredient-question {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.ingredient-options {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.ingredient-next {
  margin-top: 15px;
}

#finder-results {
  max-width: 800px;
  margin: 0 auto;
}
