/* Foodie — Restaurant Finder App Styles */

/* CSS Variables for theming */
:root {
  --primary: #E0523C;
  --primary-dark: #C0392B;
  --primary-light: #F0705A;
  --accent: #F5A623;
  --secondary: #6366F1;
  --success: #27AE60;
  --warning: #F39C12;
  --error: #E74C3C;
  
  /* Dark theme (default) */
  --bg-dark: #12161C;
  --bg-card: #1A2030;
  --bg-card-hover: #222A3A;
  --bg-light: #222A3A;
  --bg-input: #151A24;
  --text: #F5F5F7;
  --text-muted: #8B95A5;
  --border: #2A3040;
  
  --shadow: rgba(0, 0, 0, 0.25);
  --glow: rgba(224, 82, 60, 0.3);
  
  /* Gradients */
  --gradient-bg: linear-gradient(180deg, #12161C 0%, #1A2030 100%);
  --gradient-btn: linear-gradient(135deg, #E0523C, #F0705A);
}

/* Light theme */
html[data-theme="light"] {
  --bg-dark: #FAF9F6;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F5F4F0;
  --bg-light: #F0EEE8;
  --bg-input: #F5F4F0;
  --text: #1A1D28;
  --text-muted: #717886;
  --border: #E5E0D8;
  --shadow: rgba(0, 0, 0, 0.06);
  --glow: rgba(224, 82, 60, 0.15);
  --gradient-bg: linear-gradient(180deg, #FAF9F6 0%, #F0EEE8 100%);
  --gradient-btn: linear-gradient(135deg, #E0523C, #F0705A);
}

body {
  transition: background 0.3s, color 0.3s;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* SVG Icons base */
.icon {
  width: 24px;
  height: 24px;
}

.icon-sm {
  width: 18px;
  height: 18px;
}

.icon-lg {
  width: 64px;
  height: 64px;
}

.icon-nav {
  width: 24px;
  height: 24px;
}

.use {
  fill: currentColor;
}

/* Page transitions */
.page {
  min-height: 100vh;
  transition: opacity 0.3s ease;
}

.hidden {
  display: none !important;
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  color: var(--text);
  transition: background 0.2s, transform 0.2s;
}

.theme-toggle:hover {
  background: var(--bg-light);
  transform: scale(1.1);
}

.theme-toggle-small {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

/* Landing Page */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
  text-align: center;
  background: var(--gradient-bg);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  background: var(--bg-card);
  border-radius: 24px;
  margin-bottom: 16px;
  color: var(--primary);
}

.logo .icon-lg {
  width: 56px;
  height: 56px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(90deg, var(--primary), var(--success));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.5;
  margin-bottom: 32px;
}

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

.feature {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 140px;
  color: var(--text);
  transition: background 0.2s;
}

.feature:hover {
  background: var(--bg-light);
}

.feature .icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.feature span:last-child {
  font-size: 14px;
  font-weight: 500;
}

.btn-primary {
  background: var(--gradient-btn);
  color: white;
  border: none;
  padding: 18px 48px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px var(--glow);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 32px var(--glow);
}

.note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 24px;
}

/* Mobile App Frame */
#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg-dark);
}

.phone-frame {
  width: 100%;
  max-width: 380px;
  height: 100vh;
  max-height: 800px;
  background: var(--bg-dark);
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  border: 4px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: background 0.3s, border-color 0.3s;
}

html[data-theme="light"] .phone-frame {
  border-color: #cbd5e1;
}

.phone-header {
  background: var(--bg-dark);
  padding: 12px 20px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

.status-bar {
  font-size: 14px;
  color: var(--text-muted);
}

.app-header {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
  background: var(--bg-dark);
}

.back-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

.back-btn:hover {
  opacity: 0.7;
}

.app-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.profile-icon {
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.profile-icon:hover {
  color: var(--primary);
}

.profile-icon .icon {
  width: 24px;
  height: 24px;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  transition: background 0.3s;
}

/* Bottom Navigation */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-dark);
  transition: background 0.3s, border-color 0.3s;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 0.2s;
  position: relative;
}

.chat-badge {
  position: absolute;
  top: 2px;
  right: 8px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
}

.nav-item:hover {
  background: var(--bg-card);
}

/* App Pages */
.page-content h3 {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Chat */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-item:hover {
  background: var(--bg-light);
}

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
}

.chat-info h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.chat-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.chat-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

/* Home Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dashboard-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  background: var(--bg-light);
}

.dashboard-card .icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
  margin-bottom: 8px;
}

.dashboard-card h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.dashboard-card p {
  font-size: 12px;
  color: var(--text-muted);
}

.dashboard-card.wide {
  grid-column: span 2;
}

.dashboard-card.accent {
  background: linear-gradient(135deg, rgba(224,82,60,0.15), rgba(245,166,35,0.15));
}

/* Exit Button */
.btn-exit {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-muted);
  padding: 12px 32px;
  border-radius: 50px;
  margin-top: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s;
}

.btn-exit:hover {
  border-color: var(--text);
  color: var(--text);
}

/* Responsive */
@media (min-width: 768px) {
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .feature {
    width: auto;
  }
}

@media (max-width: 380px) {
  .hero h1 {
    font-size: 36px;
  }
  
  .phone-frame {
    border-radius: 0;
    border: none;
  }
}

/* Profile screen */
.profile-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.profile-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.profile-group {
  color: var(--primary);
  font-weight: 600;
  margin: 0;
}

.profile-info {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-muted);
  font-size: 14px;
}

.info-value {
  font-weight: 500;
  text-align: right;
  max-width: 60%;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--bg-card);
  color: var(--primary);
}

.icon-btn .icon {
  width: 22px;
  height: 22px;
  display: block;
}

/* Modules scroll */
.modules-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 16px 0; margin: 0 -16px;
  padding-left: 16px; padding-right: 16px;
}
.module-tile {
  flex-shrink: 0; width: 80px; height: 80px;
  background: var(--bg-card); border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; transition: all 0.2s;
}
.module-tile:hover { background: var(--primary); color: white; }
.module-tile .icon { width: 28px; height: 28px; }
.module-tile span { font-size: 12px; font-weight: 500; }

