/* ====== HOME PAGE ====== */
.hero {
  text-align: center;
  padding: 4rem 2rem 3rem;
  background: linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15)),
              url('/images/hero-bg.jpg') center/cover no-repeat;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  position: relative;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero h1 .highlight {
  color: var(--primary);
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 2rem 0;
}

.featured-section {
  margin-top: 3rem;
}

#featured-grid .grid-auto {
  grid-template-columns: repeat(2, 1fr) !important;
}

/* ====== QUIZ PAGES ====== */
.quiz-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem 20px 3rem;
}

.quiz-question {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--dark);
}

.quiz-subtitle {
  text-align: center;
  color: var(--gray);
  margin-top: -1.2rem;
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Time options */
.time-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
  margin: 0 auto;
}

.time-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--white);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.time-option:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.time-option.selected {
  border-color: var(--primary);
  background: rgba(255, 107, 53, 0.05);
}

.time-option .option-icon {
  font-size: 2rem;
  width: 50px;
  text-align: center;
}

.time-option .option-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.time-option .option-content p {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Mood grid */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 550px;
  margin: 0 auto;
}

.mood-card {
  padding: 24px 16px;
  background: var(--white);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.mood-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.mood-card.selected {
  border-color: var(--primary);
  background: rgba(255, 107, 53, 0.05);
}

.mood-card .mood-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.mood-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.mood-card p {
  font-size: 0.8rem;
  color: var(--gray);
}

/* Dietary page */
.dietary-section {
  max-width: 500px;
  margin: 0 auto;
}

.craving-input-wrapper {
  margin-top: 2rem;
}

.craving-input-wrapper .form-input {
  text-align: center;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

/* Quiz navigation */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ====== RESULTS PAGE ====== */
.results-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 20px 3rem;
}

.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.results-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.results-header p {
  color: var(--gray);
}

.quiz-recap {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.quiz-recap .recap-pill {
  padding: 6px 14px;
  background: var(--gray-lighter);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--gray);
}

.alternatives-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--dark);
}

.alternatives-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.results-actions {
  text-align: center;
  margin-top: 2.5rem;
}

/* Score breakdown tooltip */
.score-breakdown {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.score-item {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--gray-lighter);
  color: var(--gray);
}

/* ====== PROFILE PAGE ====== */
.profile-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 20px 3rem;
}

.profile-header {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-header h1 {
  font-size: 2rem;
  font-weight: 800;
}

.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

/* Sidebar */
.profile-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.profile-sidebar h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-lighter);
}

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

.profile-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--gray);
  margin-top: 4px;
}

/* History */
.history-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.history-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.history-list {
  list-style: none;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-lighter);
}

.history-item:last-child {
  border-bottom: none;
}

.history-item-image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.history-item-info {
  flex: 1;
}

.history-item-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.history-item-date {
  font-size: 0.85rem;
  color: var(--gray);
}

.history-item-rating {
  color: var(--warning);
  font-size: 1rem;
}

/* ====== PAGE HERO BANNERS ====== */
.page-hero {
  text-align: center;
  padding: 2.5rem 2rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--dark);
}

.page-hero p {
  font-size: 1rem;
  color: var(--gray);
  margin: 0;
}

.search-hero {
  background: linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.55)),
              url('/images/search-bg.jpg') center/cover no-repeat;
}

.camera-hero {
  background: linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.55)),
              url('/images/camera-bg.jpg') center/cover no-repeat;
}

/* ====== SEARCH PAGE ====== */
.search-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 20px 3rem;
}

.search-results-info {
  text-align: center;
  color: var(--gray);
  margin: 1.5rem 0;
}

/* ====== CAMERA PAGE ====== */
.camera-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem 20px 3rem;
  text-align: center;
}

.camera-page h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.upload-zone {
  border: 3px dashed var(--gray-light);
  border-radius: var(--radius);
  padding: 3rem;
  margin: 2rem 0;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
}

.upload-zone:hover {
  border-color: var(--primary-light);
  background: rgba(255, 107, 53, 0.02);
}

.upload-zone .upload-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.upload-zone p {
  color: var(--gray);
}

.upload-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 1.5rem;
}

.image-preview {
  max-width: 400px;
  margin: 1.5rem auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.image-preview img {
  width: 100%;
  display: block;
}

.dish-name-input {
  max-width: 400px;
  margin: 1rem auto;
}

/* ====== SNAP & SEARCH — IMAGE ANALYSIS ====== */
.model-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.6rem 1rem;
  margin: 0.5rem auto 0;
  max-width: 400px;
  color: var(--gray);
  font-size: 0.88rem;
  transition: opacity 0.3s;
}

.model-status.hidden {
  display: none;
}

.model-ready {
  color: var(--success, #27ae60);
  font-weight: 600;
  font-size: 0.88rem;
}

.analysis-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.8rem;
  margin: 1rem auto;
  max-width: 400px;
  color: var(--gray);
  font-size: 0.95rem;
}

.analysis-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid var(--gray-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.image-suggestions {
  max-width: 450px;
  margin: 0.5rem auto 1rem;
  text-align: center;
}

.suggestions-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.suggestions-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}

.color-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.1);
}

.suggestions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.suggestion-chip {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-light);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--dark);
}

.suggestion-chip:hover {
  border-color: var(--primary-light);
  background: rgba(255, 107, 53, 0.05);
}

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

.camera-results-header {
  text-align: center;
}

.match-keywords {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
  margin-bottom: 1rem;
}

.match-kw-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.78rem;
  border-radius: var(--radius-full);
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary);
  font-weight: 600;
}

/* ====== AUTH / LOGIN PAGE ====== */

/* Social Login Buttons */
.social-login-section {
  margin-bottom: 0.5rem;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
  color: var(--dark);
}

.social-btn:hover:not(:disabled) {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.social-btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.social-btn .social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.social-google:hover  { border-color: #4285f4; background: #f8faff; }
.social-facebook:hover { border-color: #1877f2; background: #f0f5ff; }

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.2rem 0;
  gap: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-light);
}

.auth-divider span {
  color: var(--gray);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0.5rem 0 0.3rem;
}

.auth-header p {
  font-size: 0.95rem;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-lighter);
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 0.7rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-tab:hover {
  color: var(--primary);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--dark);
}

.form-group input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

.auth-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.btn-block {
  width: 100%;
  padding: 0.8rem;
  font-size: 1.05rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ====== GUEST BANNER ====== */
.guest-banner {
  background: linear-gradient(135deg, #fff5f2 0%, #ffeee8 100%);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.guest-banner span {
  font-size: 0.95rem;
  color: var(--dark);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.guest-upgrade-prompt {
  text-align: center;
  padding: 1.5rem;
  margin-top: 1rem;
  background: var(--gray-lighter);
  border-radius: var(--radius);
}

.guest-upgrade-prompt a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.guest-upgrade-prompt a:hover {
  text-decoration: underline;
}

/* Header auth button */
.auth-nav-btn .user-badge {
  font-weight: 600;
  font-size: 0.85rem;
}

.auth-nav-btn .logout-label {
  color: #e74c3c;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.login-btn {
  background: var(--primary) !important;
  color: white !important;
  border-radius: var(--radius-sm) !important;
}

.login-btn:hover {
  background: var(--primary-dark) !important;
}

/* ====== RESTAURANTS PAGE ====== */
.restaurants-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 20px 3rem;
}

.restaurants-hero {
  background: linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.55)),
              url('/images/hero-bg.jpg') center/cover no-repeat;
}

.restaurant-search-form {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 2rem;
}

.restaurant-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.restaurant-input-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--dark);
}

.location-input-wrap {
  display: flex;
  gap: 6px;
}

.location-input-wrap .form-input {
  flex: 1;
}

.location-btn {
  font-size: 1.2rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.cuisine-chips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray);
  min-width: 60px;
}

.chip-dish {
  border-style: dashed;
}

.restaurant-search-actions {
  text-align: center;
}

/* Restaurant Cards */
.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.restaurant-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.restaurant-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.restaurant-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.restaurant-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-lighter);
  font-size: 3rem;
  color: var(--gray-light);
}

.restaurant-card-body {
  padding: 16px;
}

.restaurant-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--dark);
}

.restaurant-card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--warning, #f39c12);
  font-size: 0.95rem;
}

.restaurant-review-count {
  color: var(--gray);
  font-size: 0.85rem;
}

.restaurant-price {
  color: var(--success, #27ae60);
  font-weight: 600;
  font-size: 0.9rem;
}

.restaurant-card-categories {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 6px;
}

.restaurant-card-address {
  font-size: 0.85rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.restaurant-distance {
  color: var(--primary);
  font-weight: 500;
}
