/********************************************
 * CELESTIAL PUP CUISINE – STYLES
 ********************************************/

/* Default theme variables — Dark Cosmic to match suite */
:root {
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --highlight-color: #14b8a6;
  --button-text-color: #ffffff;
  --card-bg: #1e293b;
  --card-border: rgba(56, 189, 248, 0.2);
  /* TEAL color + box-shadow for buttons */
  --teal-button-bg: #0d9488;
  --teal-button-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-color);
  color: var(--text-color);
}

/* Visually hidden utility (for screen readers) */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Animated neon focus outline (ADA) */
@keyframes neonFocus {
  0%   { outline-color: #ff00ff; }
  25%  { outline-color: #00ffff; }
  50%  { outline-color: #ffff00; }
  75%  { outline-color: #00ff00; }
  100% { outline-color: #ff00ff; }
}

:focus {
  outline: 4px solid #ff00ff;
  animation: neonFocus 2s infinite;
}

/********************************************
 * Header
 ********************************************/
header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--text-color);
  padding: 20px;
  text-align: center;
  border-bottom: 2px solid rgba(20, 184, 166, 0.4);
}

.header-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.05);
  padding: 8px 15px;
  border-radius: 30px;
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
}

.control-group:hover {
  border-color: var(--highlight-color);
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.control-group label {
  font-weight: bold;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.control-group select {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-weight: bold;
  cursor: pointer;
  outline: none;
}

.control-group option, select option {
  background: var(--bg-color);
  color: var(--text-color);
}

#voice-search-btn {
  background: var(--teal-button-bg);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--teal-button-shadow);
  transition: transform 0.2s ease;
}

#voice-search-btn:hover {
  transform: scale(1.05);
}

#voice-search-btn i {
  font-size: 1.1rem;
}

/********************************************
 * Main Container
 ********************************************/
#app-container {
  max-width: 1000px;
  margin: 20px auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 20px;
  position: relative;
}

/* Utility class to hide elements */
.hidden {
  display: none;
}

/********************************************
 * Filter Section
 ********************************************/
#filters {
  margin-bottom: 20px;
}

#filters select,
#filters button {
  margin: 5px;
  padding: 5px 10px;
  font-size: 14px;
}

/* "Apply Filters" stays orange */
#apply-filters-btn {
  background: var(--highlight-color);
  color: var(--button-text-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/********************************************
 * Recipe Selection List
 ********************************************/
.recipe-selection button {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 15px;
  background: var(--teal-button-bg);
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: var(--teal-button-shadow);
}

.recipe-selection button:hover {
  opacity: 0.9;
}

/********************************************
 * Recipe Card Display
 ********************************************/
.recipe-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.recipe-card h2 {
  margin-top: 0;
}

.recipe-image {
  max-width: 100%;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  margin-bottom: 15px;
}

.card-section {
  margin-bottom: 10px;
  border-left: 4px solid var(--highlight-color);
  padding-left: 10px;
}

.card-section h3 {
  margin-top: 0;
}

.card-section p,
.card-section ul {
  margin: 5px 0;
}

.card-section ul {
  list-style: disc;
  margin-left: 20px;
}

/********************************************
 * Times Section
 ********************************************/
#recipe-times p {
  margin: 3px 0;
  font-weight: bold;
}

/********************************************
 * STEM Lesson (renamed "Canine Science Lesson")
 ********************************************/
#stem-lesson {
  margin-top: 15px;
  border-left: 4px solid #7f00ff;
  padding-left: 10px;
  background: transparent;
  color: var(--text-color);
  font-size: 1rem;
}

#stem-lesson h3 {
  margin-top: 0;
  font-weight: bold;
  color: var(--text-color);
}

#stem-lesson-content {
  margin: 5px 0;
  color: var(--text-color);
}

/********************************************
 * Navigation Buttons
 ********************************************/
.navigation-buttons {
  margin-top: 20px;
  text-align: center;
}

.navigation-buttons button {
  padding: 10px 20px;
  font-size: 16px;
  margin: 5px 5px;
  border: none;
  border-radius: 4px;
  background: var(--teal-button-bg);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  box-shadow: var(--teal-button-shadow);
}

.navigation-buttons button:hover {
  opacity: 0.9;
}

/* Home Page link styled similarly */
.navigation-buttons .home-link {
  display: inline-block;
  margin: 5px 5px;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  background: var(--teal-button-bg);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--teal-button-shadow);
}

.navigation-buttons .home-link:hover {
  opacity: 0.9;
}

/********************************************
 * THEME VARIATIONS
 ********************************************/
.theme-high-contrast {
  --bg-color: #000000;
  --text-color: #ffffff;
  --highlight-color: #ffdd00;
  --button-text-color: #000000;
  --card-bg: #000000;
  --card-border: #ffffff;
  --teal-button-bg: #008b8b;
}

.theme-blue {
  --bg-color: #eaf3ff;
  --text-color: #000033;
  --highlight-color: #003399;
  --button-text-color: #ffffff;
  --card-bg: #ffffff;
  --card-border: #90caf9;
  --teal-button-bg: #008080;
}

.theme-dark {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --highlight-color: #ff6f00;
  --button-text-color: #000000;
  --card-bg: #1e1e1e;
  --card-border: #333333;
  --teal-button-bg: #006766;
}

.theme-light {
  --bg-color: #ffffff;
  --text-color: #000000;
  --highlight-color: #ee4b2b;
  --button-text-color: #ffffff;
  --card-bg: #ffffff;
  --card-border: #ccc;
  --teal-button-bg: #008080;
}

.theme-neon {
  --bg-color: #0f001f;
  --text-color: #f0f0f0;
  --highlight-color: #00ffdd;
  --button-text-color: #0f001f;
  --card-bg: rgba(0, 255, 221, 0.05);
  --card-border: rgba(0, 255, 221, 0.4);
  --teal-button-bg: #00c0a0;
}

.theme-teal-orange {
  --bg-color: #004d40;
  --text-color: #e0f2f1;
  --highlight-color: #ff9800;
  --button-text-color: #000000;
  --card-bg: rgba(0, 105, 92, 0.2);
  --card-border: rgba(255, 152, 0, 0.3);
  --teal-button-bg: #ff9800;
}

.theme-cosmic {
  --bg-color: #312e81;
  --text-color: white;
  --highlight-color: #22d3ee;
  --button-text-color: white;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(56, 189, 248, 0.3);
  --teal-button-bg: #059669;
}

/********************************************
 * Responsive Design
 ********************************************/
@media screen and (max-width: 768px) {
  #filters,
  .recipe-selection button,
  .navigation-buttons {
    text-align: center;
  }

  .recipe-selection button {
    font-size: 14px;
    padding: 10px;
  }

  /* Prevent iOS zoom on focused inputs/selects */
  #filters select,
  #filters button,
  .navigation-buttons button,
  select, input[type="text"], input[type="search"] {
    font-size: 16px;
  }
  .header-controls { gap: 10px; flex-wrap: wrap; justify-content: center; }
  #app-container { margin: 12px auto; padding: 14px; }
  header { padding: 14px 10px; }
  header h1 { font-size: 1.5rem; line-height: 1.2; }
}

@media screen and (max-width: 480px) {
  .header-controls { gap: 8px; }
  .control-group { width: 100%; justify-content: center; }
  #filters select { width: 100%; margin: 4px 0; }
  .recipe-card { padding: 12px; }
  .navigation-buttons button { width: 100%; margin: 4px 0; }
  .navigation-buttons .home-link { display: block; width: 100%; box-sizing: border-box; }
  header h1 { font-size: 1.25rem; }
}
