@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,1,0');

:root {
  /* High-end minimalist dark-orange palette */
  --primary: #FF5A00;
  --primary-hover: #E04E00;
  --primary-light: #FFF0E5;
  --bg-color: #FFFFFF;
  --surface: #F8F9FA;
  --text-main: #0F1115;
  --text-muted: #737A82;
  --border: rgba(0, 0, 0, 0.06);
  --success: #10B981;
  --accent: #3B82F6;
  
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.02);
  --shadow-md: 0 12px 32px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.03);
  --shadow-float: 0 20px 40px rgba(255, 90, 0, 0.25);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  
  --transition-fast: 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overscroll-behavior-y: none;
  overflow-x: hidden;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  background: var(--bg-color);
}

/* Typography */
h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
p { font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.text-muted { color: var(--text-muted); font-size: 14px; }

/* Utilities */
.material-symbols-rounded { font-size: 24px; font-variation-settings: 'wght' 600; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.pt-4 { padding-top: 16px; }

/* Layouts */
.header {
  padding: calc(var(--tg-safe-area-inset-top, 40px) + 16px) 24px 16px;
  background: var(--bg-color);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.content {
  padding: 0 24px 140px;
  flex: 1;
}

/* Animations */
@keyframes slideUpFade {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.view-enter {
  animation: fadeIn 0.4s var(--transition-fast) forwards;
}

/* Components */
.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: transform var(--transition-spring), background var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.icon-btn:active { transform: scale(0.9); background: var(--bg-color); }

.venue-card {
  background: transparent;
  border-radius: 0;
  margin-bottom: 32px;
  box-shadow: none;
  cursor: pointer;
  transition: transform var(--transition-spring);
  animation: slideUpFade 0.5s var(--transition-spring) both;
  border: none;
}
.venue-card:active {
  transform: scale(0.97);
}
.venue-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.venue-image-wrapper img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.venue-info {
  padding: 0 4px;
}
.venue-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}
.venue-title-row h3 {
  font-size: 18px;
  color: var(--text-main);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.venue-rating {
  background: var(--surface);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.venue-rating span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}
.venue-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* Category Pills */
.category-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 0 24px 16px;
  margin: 0 -24px;
  width: calc(100% + 48px);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-scroll::-webkit-scrollbar { display: none; }

.category-pill {
  white-space: nowrap;
  padding: 10px 24px;
  background: var(--bg-color);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-fast);
  cursor: pointer;
  user-select: none;
}
.category-pill.active {
  background: var(--text-main);
  color: var(--bg-color);
  border-color: var(--text-main);
}
.category-pill:active { transform: scale(0.95); }

/* Menu Items - Grid Layout (2 items per row) */
.items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-bottom: 24px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  animation: slideUpFade 0.5s var(--transition-spring) both;
  border: 1px solid rgba(0,0,0,0.04);
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.menu-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
  align-self: stretch;
}
.menu-item-details {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: left;
  min-width: 0;
}
.menu-item-title { font-weight: 700; font-size: 16px; margin-bottom: 4px; line-height: 1.2; color: var(--text-main); letter-spacing: -0.01em; }
.menu-item-desc { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item-bottom {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  margin-top: auto;
  gap: 8px;
}
.menu-item-price {
  font-weight: 800;
  color: var(--text-main);
  font-size: 16px;
  text-align: center;
  margin-bottom: 8px;
}

/* Add Button */
.add-btn {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 0;
  height: 44px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(255, 90, 0, 0.2);
}
.add-btn:active { transform: scale(0.92); box-shadow: 0 2px 8px rgba(255, 90, 0, 0.15); }
.add-btn .material-symbols-rounded { display: inline-block; margin-right: 6px; font-size: 20px; font-variation-settings: 'wght' 600; }

.add-btn-round {
  background: rgba(255, 152, 0, 0.1);
  color: var(--primary);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.add-btn-round:active { transform: scale(0.85); background: rgba(255, 152, 0, 0.2); }
.add-btn-round .material-symbols-rounded { font-size: 20px; font-weight: 700; }

.qty-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary);
  border-radius: var(--radius-pill);
  padding: 4px;
  height: 44px;
  min-width: 100%;
  box-shadow: 0 4px 12px rgba(255, 90, 0, 0.2);
}
.qty-btn {
  background: #FFFFFF;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.qty-btn:active { transform: scale(0.9); }
.qty-btn .material-symbols-rounded { font-size: 20px; color: var(--primary); font-weight: 700; }
.qty-val {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  min-width: 20px;
  text-align: center;
}

/* Inputs */
.input-group {
  margin-bottom: 24px;
}
.input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.input-field {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 16px;
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-shadow: var(--shadow-sm);
}
.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}
textarea.input-field {
  resize: vertical;
  min-height: 120px;
}

.modern-input-btn {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid transparent;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth);
  box-shadow: var(--shadow-md);
  gap: 16px;
}
.modern-input-btn:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}
.modern-input-btn > .material-symbols-rounded:first-child {
  color: var(--primary);
  background: var(--primary-light);
  padding: 10px;
  border-radius: 50%;
  font-size: 20px;
}
.modern-input-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.modern-input-title {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 4px;
}
.modern-input-value {
  font-size: 15px;
  color: var(--text-muted);
}

/* Loading state */
.skeleton {
  background: linear-gradient(90deg, #E2E4E8 25%, #F0F2F5 50%, #E2E4E8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state .material-symbols-rounded {
  font-size: 72px;
  color: var(--border);
  margin-bottom: 24px;
}

/* Success Animation */
.success-check {
  width: 96px;
  height: 96px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin: 0 auto 32px;
  animation: popIn 0.6s var(--transition-spring);
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.3);
}
.success-check .material-symbols-rounded {
  font-size: 56px;
}
@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Premium Floating Bottom Bar */
.floating-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 24px calc(16px + var(--safe-bottom));
  background: linear-gradient(to top, rgba(244,245,247, 1) 50%, rgba(244,245,247, 0) 100%);
  z-index: 999;
  display: flex;
  justify-content: center;
  animation: slideUpFade 0.5s var(--transition-spring) both;
  pointer-events: none; /* Let clicks pass through the gradient if not on button */
}

.premium-main-btn {
  pointer-events: auto;
  width: 100%;
  max-width: 400px;
  background: var(--primary);
  color: #FFF;
  border: none;
  padding: 18px 24px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-float);
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth), filter var(--transition-fast);
}

.premium-main-btn:active {
  transform: scale(0.96);
  filter: brightness(0.9);
  box-shadow: 0 8px 16px rgba(255, 90, 0, 0.15);
}

.premium-main-btn span.btn-icon {
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-main-btn:disabled,
.premium-main-btn[disabled] {
  background: #E2E4E8;
  color: #A0A5AF;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.premium-main-btn:disabled span.btn-icon {
  background: rgba(0,0,0,0.05);
}

/* Share Action Buttons */
.action-btn {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.action-btn:active {
  transform: scale(0.95);
}

/* Bottom Nav Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 12px 20px calc(var(--tg-safe-area-inset-bottom, 16px) + 12px);
  z-index: 900;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
  width: 64px;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item .material-symbols-rounded {
  font-size: 26px;
  transition: transform var(--transition-spring);
}

.nav-item.active .material-symbols-rounded {
  font-variation-settings: 'FILL' 1;
  transform: translateY(-4px);
}

.nav-item span:not(.material-symbols-rounded) {
  font-size: 11px;
  font-weight: 700;
  transition: color var(--transition-fast);
  margin-top: 2px;
}

.nav-item.active span:not(.material-symbols-rounded) {
  color: var(--primary);
}

.comment-input {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  resize: vertical;
  min-height: 80px;
  outline: none;
  box-sizing: border-box;
  transition: all var(--transition-fast);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.comment-input::placeholder {
  color: var(--text-muted);
}

.comment-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
  background: var(--bg-color);
}

.premium-submit-btn {
  width: 100%;
  background: var(--primary);
  color: #FFF;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.premium-submit-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.15);
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}
.image-modal.show {
  display: flex;
  opacity: 1;
}
.image-modal img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  touch-action: none;
  transform-origin: center center;
}
.image-modal.show img {
  transform: scale(1);
}
.image-modal img.zooming {
  transition: none !important;
}
.image-modal-close {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: 20px;
  color: #fff;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 100000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90%;
  text-align: center;
  pointer-events: none;
}
.toast-container.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-container.error {
  background: var(--danger);
}
.toast-container.success {
  background: var(--success);
}
