:root {
  --primary: #e63946;
  /* Vibrant Red */
  --primary-hover: #c1121f;
  --secondary: #f4a261;
  --accent: #ffb703;
  /* Cheerful Yellow */
  --bg-color: #f8f9fa;
  --bg-shade: #ffffff;
  --secondary-color: #1d3557;
  --accent-color: #f4a261;
  --success-color: #2a9d8f;
  --bg-light: #f8f9fa;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.3);
  --text-dark: #1d3557;
  --text-muted: #6c757d;
  --success: #2a9d8f;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 30px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.1);
  --border-radius: 24px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Pull to Refresh Indicator */
.ptr-indicator {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 10000;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
  opacity: 0;
}

.ptr-indicator i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.ptr-indicator.pulling {
  opacity: 1;
}

.ptr-indicator.refreshing i {
  animation: ptr-spin 0.8s linear infinite;
}

@keyframes ptr-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Haptic Animation on Click */
.btn-vibrate,
button,
.menu-card,
.category-card {
  transition: transform 0.1s active;
}

.btn-vibrate:active,
button:active,
.menu-card:active,
.category-card:active {
  transform: scale(0.96);
}

body.dark-mode {
  --bg-color: #121212;
  --bg-shade: #1e1e1e;
  --text-dark: #f8f9fa;
  --text-muted: #adb5bd;
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.6);
}

body.dark-mode .menu-item,
body.dark-mode .search-box,
body.dark-mode .cart-item,
body.dark-mode .bill-details,
body.dark-mode .address-box,
body.dark-mode .prof-card,
body.dark-mode .filter-chip,
body.dark-mode .filter-dropdown {
  background: var(--bg-shade);
  border-color: #333;
}

body.dark-mode .input-group input,
body.dark-mode .input-group textarea,
body.dark-mode select,
body.dark-mode .qty-controller {
  background: #2a2a2a;
  color: var(--text-dark);
  border-color: #444;
}

body.dark-mode .bottom-nav {
  background: var(--bg-shade);
  border-top: 1px solid #333;
}

body.dark-mode .address-box,
body.dark-mode .modal-content {
  background: var(--bg-shade);
}

/* Broadcast Banner Styles */
.broadcast-banner-main {
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

@keyframes pulse-broadcast {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.99); }
  100% { opacity: 1; transform: scale(1); }
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  width: 100%;
  background: var(--bg-color);
  color: var(--text-dark);
  overflow: hidden;
  overscroll-behavior-y: contain;
  /* Disable default Chrome pull-to-refresh */
}

/* Utilities */
h1,
h2,
h3,
h4,
.font-heading {
  font-family: "Fredoka", cursive;
  font-weight: 600;
}

.text-primary {
  color: var(--primary);
}

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

.text-success {
  color: var(--success);
}

.bg-primary {
  background: var(--primary);
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.col {
  flex-direction: column;
}

.pad-x {
  padding-left: 20px;
  padding-right: 20px;
}

.pt-3 {
  padding-top: 15px;
}

.pt-4 {
  padding-top: 25px;
}

.pb-4 {
  padding-bottom: 25px;
}

.pb-5 {
  padding-bottom: 90px;
}

.mt-2 {
  margin-top: 10px;
}

.mt-3 {
  margin-top: 15px;
}

.mt-4 {
  margin-top: 25px;
}

.mt-5 {
  margin-top: 40px;
}

.mb-2 {
  margin-bottom: 10px;
}

.mb-3 {
  margin-bottom: 15px;
}

.gap-2 {
  gap: 10px;
}

.gap-3 {
  gap: 15px;
}

.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.pulse-scale {
  animation: pScale 1s infinite alternate;
}

@keyframes pScale {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.05);
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-text {
  background: transparent;
  color: var(--text-muted);
  padding: 5px;
  font-weight: 600;
}

.btn-full {
  width: 100%;
  display: block;
}

.btn-sm {
  padding: 8px 15px;
  font-size: 0.9rem;
}

/* Inputs */
.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.input-group input {
  width: 100%;
  padding: 18px 45px 18px 45px;
  /* Added right padding for eye icon */
  background: white;
  border: 2px solid #eee;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-dark);
  transition: var(--transition);
  font-weight: 600;
  outline: none;
}

.input-group .toggle-pin {
  right: 18px;
  left: auto;
  cursor: pointer;
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}

/* APP SHELL LAYOUT */
#app-container {
  height: 100%;
  width: 100%;
  display: flex;
  position: relative;
}

/* Screens (Z-indexing magic) */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-shade);
  z-index: 500;
}

.screen.active {
  z-index: 600;
}

#main-content {
  flex: 1;
  position: relative;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-color);
  padding-bottom: 80px;
}

/* Micro-interactions & Recent Section */
@keyframes flyToCartAnim {
  0% {
    transform: scale(1);
    opacity: 1;
    z-index: 9999;
  }

  50% {
    transform: scale(1.2) translateY(-20px);
    opacity: 0.8;
    z-index: 9999;
  }

  100% {
    transform: scale(0.1) translateY(100px);
    opacity: 0;
    z-index: 9999;
  }
}

.fly-to-cart {
  position: fixed;
  animation: flyToCartAnim 0.6s ease-in-out forwards;
  pointer-events: none;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

.menu-item {
  display: flex;
  background: white;
  border-radius: 15px;
  margin-bottom: 15px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: var(--transition);
  border: 1px solid transparent;
}

.menu-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.recent-card {
  min-width: 120px;
  width: 120px;
  background: white;
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  text-align: center;
  border: 1px solid transparent;
}

body.dark-mode .recent-card {
  background: var(--bg-shade);
  border-color: #333;
}

.recent-card img {
  width: 100%;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 5px;
}

.recent-card h5 {
  font-size: 0.8rem;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-card span {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
}

.add-btn-small {
  background: var(--primary);
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.add-btn-small:active {
  transform: scale(0.9);
}

.highlight-item {
  border-color: var(--primary) !important;
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.4) !important;
  transition: all 0.3s ease;
}

.top-screen {
  display: none;
  width: 100%;
  height: 100%;
}

.screen-view {
  display: none;
  width: 100%;
  animation: fadeIn 0.3s ease;
}

.screen-view.active-view {
  display: block;
}

/* Splash Screen */
#screen-splash {
  background: var(--primary);
  color: white;
  flex-direction: column;
  z-index: 9999;
}

.splash-logo {
  text-align: center;
}

.splash-logo .emoji {
  font-size: 80px;
  display: block;
  margin-bottom: 10px;
}

.splash-logo h1 {
  font-size: 3rem;
  margin-bottom: 5px;
}

/* Auth Screen */
.auth-box {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  margin: 0 auto;
  margin-top: 10vh;
}

.auth-header {
  margin-bottom: 30px;
  text-align: center;
}

.auth-header h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* App Header (Mobile) */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--bg-shade);
}

.location-drop {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loc-icon {
  color: var(--primary);
  font-size: 1.5rem;
}

.loc-text strong {
  font-size: 1.2rem;
  font-family: "Fredoka";
  line-height: 1;
  display: block;
  margin-bottom: 2px;
}

.loc-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.user-avatar {
  width: 45px;
  height: 45px;
  background: rgba(230, 57, 70, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
}

/* Search Area */
.search-container {
  margin-top: -15px;
  position: sticky;
  top: -1px;
  z-index: 101;
  background: var(--bg-color);
  padding-bottom: 10px;
  padding-top: 5px;
}

.search-box {
  background: white;
  padding: 15px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #eee;
}

.search-box i {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
}

/* Filters Layout */
.filter-chip {
  border: 1px solid #ddd;
  background: white;
  border-radius: 20px;
  padding: 5px 15px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(230, 57, 70, 0.05);
}

.veg-dot {
  width: 8px;
  height: 8px;
  background: #28a745;
  border-radius: 50%;
}

.nonveg-dot {
  width: 8px;
  height: 8px;
  background: #dc3545;
  border-radius: 50%;
}

.filter-dropdown {
  border: 1px solid #ddd;
  background: white;
  border-radius: 20px;
  padding: 5px 15px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  outline: none;
}

/* Horizontal Scrolls (Offers & Categories) */
.flex-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 15px;
}

.horizontal-scroll {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 20px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.offer-card {
  min-width: 260px;
  height: 140px;
  border-radius: var(--radius-md);
  padding: 20px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.offer-card h3 {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 5px;
}

.offer-card p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 10px;
}

.offer-code {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 5px;
  font-weight: 800;
  font-family: monospace;
  font-size: 0.8rem;
  align-self: flex-start;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 75px;
  cursor: pointer;
  transition: 0.2s;
}

.cat-item:hover {
  transform: translateY(-5px);
}

.cat-icon {
  width: 65px;
  height: 65px;
  border-radius: 20px;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: 0.2s;
}

.cat-item.active .cat-icon {
  border-color: var(--primary);
  background: rgba(230, 57, 70, 0.05);
}

.cat-icon img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  transition: transform 0.2s;
}

.cat-item:hover .cat-icon img {
  transform: scale(1.1);
}

.cat-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cat-item.active .cat-name {
  color: var(--text-dark);
}

.menu-feed {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.menu-item {
  background: white;
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  gap: 15px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f0f0f0;
  transition: var(--transition);
  position: relative;
}

.horizontal-menu-item {
  width: 80vw;
  max-width: 80vw;
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.menu-item:hover {
  box-shadow: var(--shadow-heavy);
  transform: translateY(-2px);
  border-color: #ffe0e2;
}

.m-img {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #eee;
}

.m-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.m-title {
  font-size: 1.1rem;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-rating {
  font-size: 0.8rem;
  color: #f39c12;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 5px;
}

.m-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  line-height: 1.3;
}

.m-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.m-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
}

.veg-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 15px;
  height: 15px;
  border: 1px solid #28a745;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  border-radius: 3px;
}

.veg-tag::after {
  content: "";
  width: 7px;
  height: 7px;
  background: #28a745;
  border-radius: 50%;
}

.non-veg-tag {
  border-color: #dc3545;
}

.non-veg-tag::after {
  background: #dc3545;
}

.add-btn {
  background: #ffe0e2;
  color: var(--primary);
  padding: 6px 18px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}

.add-btn:hover {
  background: var(--primary);
  color: white;
}

/* Quick quantity controller */
.qty-controller {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--primary);
  border-radius: 8px;
  overflow: hidden;
  width: 80px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffe0e2;
  color: var(--primary);
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.qty-val {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
}

/* Cart Screen */
.cart-item {
  background: white;
  border-radius: var(--radius-sm);
  padding: 15px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid #eee;
}

.c-det h4 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.c-det p {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.bill-details {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #eee;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.bill-row:last-child {
  margin-bottom: 0;
}

.grand-total {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-top: 15px;
}

hr {
  border: none;
  border-top: 1px dashed #ccc;
  margin: 15px 0;
}

.address-box {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px dashed var(--primary);
}

/* Profile Screen */
.prof-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 15px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid #eee;
}

.prof-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #ffe0e2;
}

.prof-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.03);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: var(--text-dark);
}

.prof-text {
  flex: 1;
}

.prof-text h4 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.prof-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.prof-card .fa-chevron-right {
  background: #f8f9fa;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.prof-card:hover .fa-chevron-right {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
  transform: translateX(5px);
}

.modal-header .close-btn {
  background: #f8f9fa;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.modal-header .close-btn:hover {
  background: #eee;
  transform: scale(1.05);
}

.modal-header .close-btn i {
  font-size: 1.1rem;
  color: var(--text-dark);
}

/* Navigation (Desktop & Mobile) */
aside#desktop-sidebar {
  display: none;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 75px;
  z-index: 900;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  transition: 0.3s;
  position: relative;
}

.nav-item i {
  font-size: 1.4rem;
  transition: 0.3s;
}

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

.nav-item.active i {
  transform: translateY(-3px);
}

.badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid white;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #eee;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* Responsive adjustments (Flipkart/Swiggy Desktop Feel) */
@media (min-width: 800px) {
  body {
    background: #eef2f5;
  }

  #app-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100vh;
    overflow: hidden;
    background: white;
    display: flex;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
  }

  /* Desktop Sidebar */
  .bottom-nav {
    display: none;
  }

  aside#desktop-sidebar {
    display: none;
    /* Default hidden until logged in check */
  }

  #app-container.user-logged-in aside#desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 280px;
    background: white;
    border-right: 1px solid #eee;
    padding: 30px 20px;
    z-index: 800;
  }

  .sidebar-logo {
    font-size: 2rem;
    font-family: "Fredoka";
    color: var(--primary);
    margin-bottom: 50px;
    padding-left: 10px;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  aside#desktop-sidebar .nav-item {
    flex-direction: row;
    gap: 15px;
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    justify-content: flex-start;
  }

  aside#desktop-sidebar .nav-item:hover {
    background: rgba(230, 57, 70, 0.05);
  }

  aside#desktop-sidebar .nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
  }

  #main-content {
    padding-bottom: 0;
  }

  .app-header {
    padding: 30px 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
  }

  .pad-x {
    padding-left: 40px;
    padding-right: 40px;
  }

  .menu-feed {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }

  .horizontal-menu-item {
    width: 350px;
    max-width: 350px;
  }

  .modal-overlay {
    align-items: center;
  }

  .auth-box {
    border: 1px solid #eee;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-heavy);
    background: white;
  }
}

/* Mega Feature Animations */
@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.bounce {
  animation: bounce 2s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.flash-text {
  animation: blink 1s infinite;
}

/* Video cards hover scale */
.video-card {
  transition: transform 0.3s;
}

.video-card:hover {
  transform: scale(1.05);
}

/* Version Labels */
.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
}

body.dark-mode .sidebar-footer {
  border-top-color: #333;
}

.version-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.version-label-small {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  opacity: 0.7;
}

/* SEO Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Full Screen Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  width: 100%;
  border-radius: 20px 20px 0 0;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@media (min-width: 768px) {
  .modal {
    align-items: center;
  }

  .modal-content {
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

/* Review Stars */
#modal-star-input i {
  transition: color 0.2s;
}

#modal-star-input i.active {
  color: #f4a261;
}


.review-item {
  background: rgba(0, 0, 0, 0.03);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.review-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.review-item-name {
  font-weight: 800;
  font-size: 0.9rem;
}

.review-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.review-item-stars {
  color: #ffc107;
  font-size: 0.8rem;
  margin-bottom: 5px;
}

.review-item-text {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #444;
}

/* Item Detail Modal Desktop Layout */
@media (min-width: 800px) {
  .item-detail-modal-content {
    display: flex !important;
    flex-direction: row !important;
    height: 600px !important;
    padding: 0 !important;
    overflow: hidden !important;
    max-width: 900px !important;
  }

  .item-detail-modal-content>div:first-child {
    flex: 1.2;
    height: 100% !important;
  }

  .item-detail-modal-content>div:last-child {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 30px !important;
  }

  #modal-item-image {
    height: 100% !important;
    border-radius: 0;
  }
}

.item-detail-modal-content {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
}

/* Skeleton Loaders */
@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

.skeleton {
  background: #f6f7f8;
  background-image: linear-gradient(
    to right,
    #f6f7f8 0%,
    #edeef1 20%,
    #f6f7f8 40%,
    #f6f7f8 100%
  );
  background-repeat: no-repeat;
  background-size: 800px 100%; 
  animation-duration: 1.5s;
  animation-fill-mode: forwards; 
  animation-iteration-count: infinite;
  animation-name: shimmer;
  animation-timing-function: linear;
}

body.dark-mode .skeleton {
  background: #2a2a2a;
  background-image: linear-gradient(
    to right,
    #2a2a2a 0%,
    #3a3a3a 20%,
    #2a2a2a 40%,
    #2a2a2a 100%
  );
}

.skeleton-card {
  height: 120px;
  border-radius: 15px;
  margin-bottom: 15px;
  width: 100%;
}

.skeleton-cat {
  min-width: 75px;
  height: 90px;
  border-radius: 20px;
}

.offline-banner {
  background: #dc3545;
  color: white;
  text-align: center;
  padding: 8px;
  font-weight: bold;
  font-size: 0.85rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10000;
  display: none;
}
body.offline-mode .offline-banner {
  display: block;
}
body.offline-mode .app-header {
  margin-top: 30px;
}
/* Special Bottom Nav Button (ZWET Offers) */
.special-nav-item {
  transform: translateY(-15px);
}
.special-icon-wrap {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255, 75, 43, 0.4);
  color: white;
  font-size: 1.5rem;
  border: 4px solid white;
}
.pulse-anim {
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.gradient-text {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  margin-top: -5px;
}

/* Special Pizza Flash Combo Modal Styles */
.flash-drink-card {
  border: 2px solid #333;
  border-radius: 12px;
  padding: 12px 5px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: #222;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.flash-drink-card:hover {
  transform: translateY(-3px);
  border-color: #ff416c;
  box-shadow: 0 8px 15px rgba(255, 65, 108, 0.2);
}

.flash-drink-card.active {
  background: linear-gradient(135deg, #00f0ff, #0072ff);
  color: black;
  border-color: #fff;
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 240, 255, 0.4);
}

.flash-pizza-card {
  background: #252535;
  border: 2px solid #333;
  border-radius: 15px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.flash-pizza-card:hover {
  border-color: #ff416c;
  transform: translateY(-2px);
}

.flash-pizza-card.active {
  border-color: #ffdd00;
  box-shadow: 0 10px 25px rgba(255, 221, 0, 0.25);
  background: #2d2d3f;
  transform: scale(1.02);
}

.flash-pizza-card.active::before {
  content: "Selected 🍕";
  position: absolute;
  top: 5px;
  left: 5px;
  background: #ffdd00;
  color: black;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 5px;
  z-index: 5;
}

/* Festival Dhamaal Section Styles */
.festival-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .festival-cards-grid {
    grid-template-columns: 1fr;
  }
}

.festival-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-size: cover;
  background-position: center;
}

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

.card-insta {
  background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.85)), url('https://images.unsplash.com/photo-1611162617213-7d7a39e9b1d7?w=500&q=80');
}

.card-combo {
  background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.85)), url('https://images.unsplash.com/photo-1513104890138-7c749659a591?w=500&q=80');
}

.festival-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 159, 28, 0.25), transparent);
  pointer-events: none;
}

.festival-card-content {
  position: relative;
  z-index: 2;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.festival-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bg-insta {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.bg-combo {
  background: linear-gradient(45deg, #ff9f1c, #ff4b2b);
}

.festival-card h4 {
  font-size: 1.1rem;
  font-weight: 900;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.festival-card p {
  font-size: 0.72rem;
  opacity: 0.9;
  margin: 0 0 8px 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  line-height: 1.25;
}

.festival-action {
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ff9f1c;
  transition: gap 0.2s;
}

.festival-card:hover .festival-action {
  gap: 8px;
}

.card-insta .festival-action {
  color: #ff4b91;
}

.card-combo .festival-action {
  color: #ffe600;
}

/* Reels Video Overlay Fullscreen Player */
.reels-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reels-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
  backdrop-filter: blur(5px);
}

.reels-close-btn:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.8);
}

.reels-container {
  width: 100%;
  height: 100%;
  max-width: 480px; /* Looks like a mobile viewport on desktop */
  background: #000;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

.reels-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.reel-item {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reel-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Speaker Overlay & Play State Controls */
.reel-volume-btn {
  position: absolute;
  bottom: 80px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  backdrop-filter: blur(5px);
}

.reel-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  font-size: 3.5rem;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 10000;
  text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.reel-play-overlay.show-animate {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.2);
}

/* Caption and user info at bottom of reel */
.reel-info-overlay {
  position: absolute;
  bottom: 25px;
  left: 20px;
  right: 80px; /* leave space for right actions */
  z-index: 10000;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  text-align: left;
}

.reel-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.reel-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ff4b91;
  object-fit: cover;
}

.reel-username {
  font-weight: 700;
  font-size: 0.95rem;
}

.reel-description {
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.9;
  font-weight: 500;
}
