/* Restaurant Social Feed — App Styles */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap');

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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1e1e1e;
  --surface-3: #252525;
  --accent: #ff6b35;
  --accent-dim: #cc5522;
  --accent-glow: rgba(255, 107, 53, 0.15);
  --text: #f5f5f5;
  --text-muted: #8a8a8a;
  --text-dim: #555;
  --border: #2a2a2a;
  --border-soft: #1f1f1f;
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: var(--nav-h);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── Typography ─────────────────────────────────── */
h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }

/* ─── Bottom Navigation ─────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 20px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-item svg { width: 22px; height: 22px; stroke-width: 1.75; }
.nav-item.active { color: var(--accent); }
.nav-item:hover { color: var(--text); }

/* ─── Page Header ────────────────────────────────── */
.page-header {
  padding: 1.25rem 1rem 0.75rem;
  position: sticky;
  top: 0;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
  z-index: 50;
}

.page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
}

/* ─── Post Card ──────────────────────────────────── */
.post-card {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
}

.post-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
}

.restaurant-avatar {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff9a5c 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.restaurant-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.post-meta { flex: 1; min-width: 0; }
.post-meta .restaurant-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-meta .post-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 1px;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.post-type-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-special { background: rgba(255, 107, 53, 0.18); color: var(--accent); }
.badge-event { background: rgba(99, 102, 241, 0.18); color: #818cf8; }
.badge-story { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.badge-photo { background: rgba(250, 250, 250, 0.08); color: var(--text-muted); }

.post-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--surface-2);
}

.post-body { padding: 0.875rem 1rem; }
.post-caption {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 0.875rem;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 5px 0;
  transition: color 0.2s;
}
.action-btn svg { width: 18px; height: 18px; stroke-width: 1.75; }
.action-btn:hover { color: var(--text); }
.action-btn.liked { color: var(--accent); }
.action-btn.saved { color: var(--accent); }

.post-time {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: auto;
}

/* ─── Restaurant Profile ─────────────────────────── */
.profile-cover {
  height: 200px;
  width: 100%;
  object-fit: cover;
  background: var(--surface-2);
}

.profile-body { padding: 1rem; }

.profile-identity {
  display: flex;
  align-items: flex-end;
  gap: 0.875rem;
  margin-top: -32px;
  margin-bottom: 1rem;
}

.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #ff9a5c);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  border: 3px solid var(--bg);
  flex-shrink: 0;
}

.profile-name {
  font-size: 1.35rem;
  font-weight: 700;
}

.profile-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.tag-chip {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.profile-stats {
  display: flex;
  gap: 1.5rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 1rem;
}

.stat-item { text-align: center; }
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-hours {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.profile-hours svg { width: 16px; height: 16px; color: var(--accent); }

.follow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--accent);
  color: white;
  transition: background 0.2s, transform 0.1s;
}
.follow-btn:hover { background: var(--accent-dim); }
.follow-btn:active { transform: scale(0.98); }
.follow-btn.following { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

.profile-posts-header {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 1rem 1rem 0.5rem;
  border-top: 1px solid var(--border-soft);
}

/* ─── Discover Page ──────────────────────────────── */
.discover-filters {
  padding: 0.875rem 1rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-soft);
}
.discover-filters::-webkit-scrollbar { display: none; }

.filter-pill {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
  flex-shrink: 0;
}
.filter-pill.active, .filter-pill:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.restaurant-card {
  display: flex;
  gap: 0.875rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.15s;
}
.restaurant-card:hover { background: var(--surface); }

.restaurant-card-avatar {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #ff9a5c);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.restaurant-card-info { flex: 1; min-width: 0; }
.restaurant-card-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 3px;
}
.restaurant-card-info .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.restaurant-card-info .bio-preview {
  font-size: 0.82rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.restaurant-card-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.follower-count {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}
.follower-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Empty State ────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.empty-state h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; }

/* ─── Back Button ────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.back-btn svg { width: 16px; height: 16px; }
.back-btn:hover { color: var(--text); }

/* ─── Scrollable content area ────────────────────── */
.feed-container, .discover-container { max-width: 600px; margin: 0 auto; }

/* ─── Section divider ────────────────────────────── */
.section-label {
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}

/* ─── Loading skeleton ───────────────────────────── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@media (min-width: 600px) {
  .feed-container, .discover-container { padding: 0 1rem; }
  .post-card { border-radius: var(--radius); border: 1px solid var(--border-soft); margin-bottom: 0.75rem; }
  .restaurant-card { border-radius: var(--radius); border: 1px solid var(--border-soft); margin-bottom: 0.5rem; border-bottom: none; }
}
