:root {
  --bg-color: #0d0d0d;
  --text-color: #ffffff;
  --accent-color: #f7b731;
  --accent-hover: #fa8231;
  --card-bg: #1a1a1a;
  --border-color: #333333;
  --veg-color: #26de81;
  --non-veg-color: #fc5c65;
  --header-bg: rgba(13, 13, 13, 0.95);
  
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 120px; /* Space for fixed bottom elements */
}

/* Header */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.cafe-info h1 {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 2px;
}

.cafe-info p {
  font-size: 0.85rem;
  color: #aaaaaa;
}

.cart-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-summary.visible {
  opacity: 1;
  visibility: visible;
}

.cart-count {
  background-color: var(--accent-color);
  color: #000;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.cart-total {
  font-size: 1rem;
  font-weight: 600;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  overflow-x: auto;
  padding: 10px 20px;
  gap: 12px;
  scrollbar-width: none; /* Firefox */
}

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

.category-tab {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 20px;
  background-color: var(--card-bg);
  color: #dddddd;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.category-tab.active {
  background-color: var(--accent-color);
  color: #000;
  border-color: var(--accent-color);
}

/* Main Content */
.main-content {
  margin-top: 130px; /* Below sticky header */
  padding: 20px;
}

.category-header {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--accent-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

@media (min-width: 768px) {
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
}

.item-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
}

.item-thumb {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 12px;
  border: 1px solid var(--border-color);
  background-color: #2a2a2a;
}

.item-info {
  flex: 1;
  padding-right: 10px;
}

.item-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.dietary-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #fff;
  margin-top: 4px;
  flex-shrink: 0;
  position: relative;
}

.dietary-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dietary-icon.veg {
  border-color: var(--veg-color);
}
.dietary-icon.veg::after {
  background-color: var(--veg-color);
}

.dietary-icon.non-veg {
  border-color: var(--non-veg-color);
}
.dietary-icon.non-veg::after {
  background-color: var(--non-veg-color);
}

.item-name {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
}

.item-price {
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--accent-color);
  margin-top: 4px;
}

/* Action Buttons */
.item-action {
  min-width: 75px;
  display: flex;
  justify-content: flex-end;
}

.add-btn {
  background-color: var(--card-bg);
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  padding: 6px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-btn:active {
  background-color: var(--accent-color);
  color: #000;
}

.qty-controls {
  display: flex;
  align-items: center;
  background-color: var(--accent-color);
  border-radius: 20px;
  overflow: hidden;
}

.qty-btn {
  background: none;
  border: none;
  color: #000;
  font-weight: bold;
  font-size: 1.2rem;
  width: 28px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-display {
  color: #000;
  font-weight: bold;
  font-size: 0.95rem;
  min-width: 18px;
  text-align: center;
}

/* Floating WhatsApp Button */
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366; /* WhatsApp Green */
  color: white;
  border: none;
  border-radius: 30px;
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mascot */
.mascot-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  animation: floatSway 3s ease-in-out infinite;
}

@keyframes floatSway {
  0%, 100% { transform: translateY(0px) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

.speech-bubble {
  background-color: #ffffff;
  color: #000000;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  text-align: left;
  max-width: 150px;
  word-wrap: break-word;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 25px;
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

.mascot-icon {
  width: 65px;
  height: 65px;
  background-color: #1a1a1a;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(247, 183, 49, 0.4);
  border: 2px solid var(--accent-color);
  position: relative;
  margin-left: 5px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mascot-icon:hover {
  transform: scale(1.1);
}

.mascot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.15s ease-out;
}

/* Responsive overlap fixes for mobile screens */
@media (max-width: 480px) {
  .whatsapp-btn {
    bottom: 15px;
    right: 15px;
    padding: 12px 18px;
    font-size: 0.9rem;
  }
  .mascot-container {
    bottom: 15px;
    left: 15px;
  }
  .speech-bubble {
    max-width: 120px;
    font-size: 0.75rem;
    padding: 6px 10px;
  }
  .mascot-icon {
    width: 55px;
    height: 55px;
  }
}

/* Animations */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes spinJump {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-25px) rotate(180deg) scale(1.2); }
  100% { transform: translateY(0) rotate(360deg) scale(1); }
}

.mascot-icon.bounce {
  animation: bounce 0.4s ease;
}

.mascot-icon.spin-jump {
  animation: spinJump 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.steam {
  position: absolute;
  top: -10px;
  left: 20px;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  filter: blur(4px);
  animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(1); opacity: 0.8; }
  100% { transform: translateY(-40px) scale(2); opacity: 0; }
}

/* Cassey Mascot */
.cassey-container {
  position: fixed;
  bottom: 85px;
  right: 20px;
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  cursor: pointer;
}

.cassey-bubble {
  background-color: var(--accent-color);
  color: #000000;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  margin-bottom: 6px;
  position: relative;
  box-shadow: 0 4px 10px rgba(247, 183, 49, 0.3);
  text-align: right;
  transition: opacity 0.3s ease;
}

.cassey-bubble::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 15px;
  border-width: 5px 5px 0;
  border-style: solid;
  border-color: var(--accent-color) transparent transparent transparent;
}

.cassey-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  border: 2px solid #555;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.cassey-icon:active {
  transform: scale(0.9);
}

.cassey-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.cassey-img.playing {
  animation: pulse-border 1.5s infinite alternate;
}

@keyframes pulse-border {
  from { filter: brightness(1) drop-shadow(0 0 0px var(--accent-color)); }
  to { filter: brightness(1.2) drop-shadow(0 0 12px var(--accent-color)); }
}

.music-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  width: 160px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  pointer-events: none;
}

.music-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.music-menu-title {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
}

.music-btn {
  background-color: transparent;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.music-btn:hover {
  background-color: #333;
}

.music-btn.action-btn {
  background-color: var(--accent-color);
  color: #000;
  font-weight: bold;
  border-color: var(--accent-color);
  margin-top: 4px;
}

/* Checkout Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background-color: var(--card-bg);
  border: 1px solid var(--accent-color);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-title {
  font-size: 1.3rem;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.85rem;
  color: #ddd;
  font-weight: 500;
}

.form-group input {
  background-color: #0d0d0d;
  border: 1px solid #333;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--accent-color);
}

.modal-summary-box {
  background-color: #111;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
  max-height: 100px;
  overflow-y: auto;
  font-size: 0.85rem;
  border: 1px solid #222;
}

.modal-summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  color: #ccc;
}

.modal-submit-btn {
  width: 100%;
  background-color: #25D366;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.modal-submit-btn:active {
  transform: scale(0.98);
}

@media (max-width: 480px) {
  .cassey-container {
    bottom: 75px;
    right: 15px;
  }
  .cassey-icon {
    width: 42px;
    height: 42px;
  }
}
