/* General Styles for the recipe website*/
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
}

/* Header */
header {
    background-color: #f8f8f8;
    border-bottom: 1px solid #eaeaea;
    padding: 10px 0;
}

header h1 {
    text-align: center;
    margin: 0;
}

/* Navigation Menu */
nav {
    text-align: center;
    margin-top: 10px;
}

nav a {
    margin: 0 10px;
    text-decoration: none;
    color: #333;
}

nav a:hover {
    color: #007bff;
}

/* Main Content Area */
main {
    width: 80%;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #f8f8f8;
    border-top: 1px solid #eaeaea;
}

footer p {
    margin: 0;
}

/* Responsive Design */
@media only screen and (max-width: 600px) {
    main {
        width: 90%;
        padding: 10px;
    }
}

/* Container for the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
  }
  
  /* Slider base styles */
  .switch input { 
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /* Slider styling */
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  /* Color changes when the slider is checked */
  input:checked + .slider {
    background-color: #2196F3;
  }
  
  /* Move the slider ball to the right when checked */
  input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
  }
  
  /* Rounded slider */
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }

/* ===== App styles migrated from inline index.html ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  line-height: 1.5;
}

#top-bar {
  position: sticky;
  top: 0;
  background: white;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  z-index: 10;
}

#home-button {
  padding: 0.5rem 1rem;
  background: #f0f0f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#home-button:hover { background: #e0e0e0; }

#recipe-search {
  flex-grow: 1;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Toggle (reuse existing .switch/.slider styles; ensure rounded slider) */
.slider { border-radius: 34px; }
.slider:before { border-radius: 50%; }

#screen-lock-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

#recipe-list a {
  display: block;
  padding: 0.5rem 0;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #eee;
}

#recipe-list a:hover { color: #666; background: #f9f9f9; }

#recipe-content { margin-top: 2rem; }

.load-more-button {
  display: block;
  margin: 20px auto;
  padding: 10px 15px;
  background: #f0f0f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.load-more-button:hover { background: #e0e0e0; }

.error-message {
  padding: 20px;
  background-color: #fff8f8;
  border-left: 4px solid #e74c3c;
  margin-bottom: 20px;
}

.error-message h3 { color: #c0392b; margin-top: 0; }

.error-message button {
  padding: 8px 16px;
  background: #f0f0f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
}

.loading { padding: 20px; text-align: center; color: #666; }

/* Print styles */
@media print {
  #top-bar, #recipe-list, .load-more-button { display: none !important; }
  body { padding: 0; font-size: 12pt; }
  #recipe-content { margin-top: 0; }
}

@media (max-width: 600px) { body { padding: 0.5rem; } }

/* Recipe content list styling */
#recipe-content ol li::marker { color: #2196F3; }
  
