:root {
  /* Warm, appetizing colors */
  --primary: oklch(65% 0.2 30); /* Warm Orange */
  --primary-dark: oklch(55% 0.2 30);
  --secondary: oklch(85% 0.15 85); /* Fresh Yellow/Green */
  --accent: oklch(60% 0.2 340); /* Pinkish Red */
  --background: oklch(98% 0.02 90); /* Warm White */
  --surface: oklch(100% 0 0); /* White */
  --text-main: oklch(20% 0.05 30);
  --text-muted: oklch(50% 0.05 30);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --radius-lg: 1rem;
  --radius-full: 9999px;
  --nav-height: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--nav-height);
}

/* ===================== Navigation ===================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--surface);
  border-bottom: 1px solid oklch(90% 0.02 90);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: var(--primary);
  color: white;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-main);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid oklch(90% 0.02 90);
    box-shadow: var(--shadow-sm);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
  }
}

.app-container {
  width: 100%;
  max-width: 600px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 1;
}

header {
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

header p {
  color: var(--text-muted);
}

/* Filter Chips */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.filter-chip {
  background: var(--surface);
  border: 2px solid oklch(90% 0.02 90);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-chip:hover {
  border-color: var(--primary);
}

.filter-chip.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Result Area */
.result-area {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  perspective: 1000px;
}

/* Controls */
.controls {
  display: flex;
  justify-content: center;
  padding-bottom: 2rem;
}

.spin-button {
  background-color: var(--primary);
  color: white;
  border: none;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 1rem 3rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s;
}

.spin-button:hover {
  transform: scale(1.05);
  background-color: var(--primary-dark);
}

.spin-button:active {
  transform: scale(0.95);
}

.spin-button:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* ===================== Site Footer ===================== */
.site-footer {
  width: 100%;
  background: var(--text-main);
  color: oklch(85% 0.02 90);
  margin-top: auto;
  padding: 2.5rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand strong {
  font-size: 1.2rem;
  color: white;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: oklch(70% 0.02 90);
}

.footer-col h4 {
  color: white;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-col a {
  color: oklch(70% 0.02 90);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 900px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid oklch(35% 0.03 30);
  text-align: center;
  font-size: 0.8rem;
  color: oklch(55% 0.02 90);
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.section-divider {
  border: none;
  border-top: 2px solid oklch(90% 0.02 90);
  width: 100%;
}

.car-rental-section {
  background: var(--surface);
  border: 1px solid oklch(90% 0.02 90);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.car-rental-section h2 {
  color: var(--text-main);
  font-size: 1.35rem;
}

.car-rental-section p {
  color: var(--text-muted);
  line-height: 1.5;
}

.car-rental-btn {
  align-self: flex-start;
  background-color: var(--secondary);
  color: var(--text-main);
  font-weight: 700;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: filter 0.2s;
}

.car-rental-btn:hover {
  filter: brightness(0.97);
}

.car-rental-btn[aria-expanded="true"] {
  background-color: var(--primary);
  color: white;
}

.car-rental-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.5rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.car-rental-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.car-rental-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.car-rental-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.car-rental-chip {
  background: var(--background);
  border: 2px solid oklch(90% 0.02 90);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s ease;
  user-select: none;
}

.car-rental-chip:hover {
  border-color: var(--primary);
}

.car-rental-chip.selected {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.car-rental-summary {
  background: var(--background);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-align: center;
}

.review-section {
  background: var(--surface);
  border: 1px solid oklch(90% 0.02 90);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-section h2 {
  color: var(--text-main);
  font-size: 1.35rem;
}

.review-section p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 2px solid oklch(90% 0.02 90);
  font-family: inherit;
  font-size: 0.95rem;
  background-color: var(--background);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

.submit-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, background-color 0.2s;
  align-self: flex-start;
}

.submit-btn:hover {
  transform: translateY(-2px);
  background-color: var(--primary-dark);
}

.submit-btn:active {
  transform: translateY(0);
}

.ai-section {
  background: var(--surface);
  border: 1px solid oklch(90% 0.02 90);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.ai-section h2 {
  color: var(--text-main);
  font-size: 1.35rem;
}

.ai-section p {
  color: var(--text-muted);
}

.ai-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.ai-btn {
  background-color: var(--accent);
  color: white;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, background-color 0.2s;
}

.ai-btn:hover {
  transform: scale(1.05);
  background-color: oklch(50% 0.2 340);
}

.webcam-view canvas {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.ai-labels {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 300px;
}

.ai-labels div {
  background-color: var(--background);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
  border: 1px solid oklch(90% 0.02 90);
}

/* Placeholder state for the card */
lunch-card:empty::before {
  content: 'Hit the button to get hungry!';
  display: block;
  color: var(--text-muted);
  font-size: 1.1rem;
  text-align: center;
  width: 100%;
}

/* ===================== Info Sections (main page) ===================== */
.info-section {
  background: var(--surface);
  border: 1px solid oklch(90% 0.02 90);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-section h2 {
  color: var(--text-main);
  font-size: 1.35rem;
}

.info-section h3 {
  color: var(--primary-dark);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.info-section p,
.info-section li {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.info-section ul,
.info-section ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.tip-card {
  background: var(--background);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
}

.tip-card .tip-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.tip-card h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.tip-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 400px) {
  .tip-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================== Content Pages ===================== */
.page-container {
  width: 100%;
  max-width: 800px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

.page-container h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.page-container h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 1rem;
}

.page-container h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.page-container p {
  line-height: 1.7;
  color: var(--text-muted);
}

.page-container ul,
.page-container ol {
  padding-left: 1.5rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.page-container a {
  color: var(--primary);
  text-decoration: underline;
}

.page-container a:hover {
  color: var(--primary-dark);
}

.content-card {
  background: var(--surface);
  border: 1px solid oklch(90% 0.02 90);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.content-card p {
  margin-top: 0.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.feature-item {
  background: var(--surface);
  border: 1px solid oklch(90% 0.02 90);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.feature-item .feature-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.feature-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feature-item p {
  font-size: 0.85rem;
}

@media (max-width: 500px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.last-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}
