/* ==========================================================================
   VoiceLess Cloud - Z7 Neon Blue & Pure Black Luxury Theme
   Palette: Pure Black (#000000) & Electric Neon Blue (#00E5FF, #00BFFF, #087BFF)
   Text: Pure Crisp White (#FFFFFF)
   Brand: POWERED BY Z7 TEC
   Layout: Centered Avatar & Voice & Chat -> Menu Below -> Slide-out Cart
   Bilingual: RTL (Arabic) & LTR (English)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Orbitron:wght@600;700;800;900&display=swap');

:root {
  --bg-black: #000000;
  --bg-surface: #05080e;
  --bg-card: rgba(8, 14, 24, 0.92);
  --bg-card-hover: rgba(12, 22, 38, 0.98);

  /* Z7 Official Neon Blue Accents */
  --neon-blue: #00E5FF;
  --neon-blue-light: #70EFFF;
  --neon-blue-bright: #00BFFF;
  --neon-blue-deep: #087BFF;
  --neon-glow: 0 0 25px rgba(0, 229, 255, 0.5);
  --neon-glow-strong: 0 0 35px rgba(0, 229, 255, 0.7);

  --border-subtle: rgba(0, 229, 255, 0.22);
  --border-blue: rgba(0, 229, 255, 0.55);
  --border-blue-bright: #00E5FF;

  /* Crisp Pure White Typography */
  --text-white: #FFFFFF;
  --text-white-dim: #E2E8F0;
  --text-muted: #94A3B8;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(0, 229, 255, 0.08) 0%, transparent 60%),
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* LTR Support */
html[dir="ltr"] body {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #000000;
}
::-webkit-scrollbar-thumb {
  background: var(--neon-blue);
  border-radius: 4px;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-blue);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.9);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.restaurant-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--neon-blue);
  box-shadow: var(--neon-glow);
}

.restaurant-meta {
  display: flex;
  flex-direction: column;
}

.restaurant-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: -0.3px;
}

.brand-powered {
  font-size: 0.72rem;
  color: var(--neon-blue);
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1.2px;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Language Toggle Button */
.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 20px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--neon-blue-light);
  border: 1px solid var(--border-blue);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-toggle-btn:hover {
  background: var(--neon-blue);
  color: #000000;
  box-shadow: var(--neon-glow);
}

/* Header Cart Button */
.header-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0, 229, 255, 0.12);
  color: var(--neon-blue-light);
  border: 1px solid var(--border-blue);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Orbitron', 'Cairo', sans-serif;
  font-weight: 800;
}

.header-cart-btn:hover {
  background: var(--neon-blue);
  color: #000000;
  box-shadow: var(--neon-glow);
}

.header-cart-btn:hover svg {
  stroke: #000000;
}

.cart-badge {
  background: var(--neon-blue);
  color: #000000;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.header-cart-btn:hover .cart-badge {
  background: #000000;
  color: var(--neon-blue);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(8, 14, 24, 0.95);
  border: 1px solid var(--border-blue);
  color: var(--text-white);
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-blue);
  box-shadow: 0 0 10px var(--neon-blue);
}

/* Page Layout */
.page-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 30px 24px 80px;
  gap: 40px;
}

/* ==========================================================================
   1. Centered Hero: Hologram Avatar + Voice Button + Chat Log
   ========================================================================== */
.avatar-center-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 680px;
  gap: 22px;
}

.canvas-card {
  position: relative;
  background: radial-gradient(circle at center, rgba(10, 18, 32, 0.95) 0%, rgba(0, 0, 0, 0.98) 100%);
  border: 2px solid var(--neon-blue);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--neon-glow), 0 12px 40px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.canvas-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--neon-blue-light), var(--neon-blue), transparent);
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hologram-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 0 25px rgba(0, 229, 255, 0.4));
}

.voice-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.call-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  padding: 16px 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-blue-deep) 100%);
  color: #000000;
  border: none;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 25px rgba(0, 229, 255, 0.55);
  transition: all 0.25s ease;
  overflow: hidden;
}

.call-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 8px 32px rgba(0, 229, 255, 0.75);
}

.call-btn.active {
  background: linear-gradient(135deg, #FF1744 0%, #B71C1C 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 25px rgba(255, 23, 68, 0.6);
}

.radar-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.7);
  animation: radar-wave 1.6s infinite ease-out;
}

@keyframes radar-wave {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.call-status-hint {
  font-size: 0.9rem;
  color: var(--text-white);
  font-weight: 600;
}

/* Chat Transcript Card Directly Underneath Avatar */
.transcript-card {
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 250px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.8);
}

.transcript-header {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--neon-blue);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.transcript-header svg {
  stroke: var(--neon-blue);
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px;
}

.chat-bubble {
  max-width: 88%;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-white);
}

.chat-bubble.user {
  align-self: flex-start;
  background: rgba(0, 229, 255, 0.18);
  border: 1px solid var(--border-blue);
}

.chat-bubble.assistant {
  align-self: flex-end;
  background: rgba(18, 28, 44, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

/* Section Divider */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 16px;
  margin: 10px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-blue), transparent);
}

.divider-badge {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--neon-blue);
  background: var(--bg-surface);
  border: 1px solid var(--border-blue);
  padding: 6px 20px;
  border-radius: 20px;
  box-shadow: var(--neon-glow);
}

/* ==========================================================================
   2. Lower Section: Food Menu Grid
   ========================================================================== */
.menu-stage {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 24px;
}

.menu-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-white);
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.cat-tab-btn {
  padding: 9px 22px;
  border-radius: 20px;
  border: 1px solid var(--border-blue);
  background: rgba(10, 16, 28, 0.8);
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.cat-tab-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--neon-blue);
}

.cat-tab-btn.active {
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-blue-deep) 100%);
  color: #000000;
  font-weight: 900;
  border-color: transparent;
  box-shadow: var(--neon-glow);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  width: 100%;
}

.menu-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.menu-item-card:hover {
  border-color: var(--neon-blue);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9), var(--neon-glow);
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-item-badge {
  font-size: 0.74rem;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.15);
  color: var(--neon-blue-light);
  border: 1px solid var(--border-blue);
  font-weight: 700;
}

.menu-item-price {
  font-family: 'Orbitron', 'Cairo', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--neon-blue);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

.menu-item-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-white);
}

.menu-item-en {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'Orbitron', sans-serif;
}

.add-to-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.1);
  color: var(--neon-blue-light);
  border: 1px solid var(--border-blue);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
}

.add-to-cart-btn:hover {
  background: var(--neon-blue);
  color: #000000;
  box-shadow: var(--neon-glow);
}

/* ==========================================================================
   3. Slide-out Cyber Cart Drawer
   ========================================================================== */
.cart-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--bg-surface);
  border-left: 2px solid var(--neon-blue);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.95), var(--neon-glow);
  z-index: 1050;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

html[dir="rtl"] .cart-drawer {
  left: 0;
  right: auto;
  border-left: none;
  border-right: 2px solid var(--neon-blue);
  transform: translateX(-100%);
}

html[dir="ltr"] .cart-drawer {
  right: 0;
  left: auto;
  transform: translateX(100%);
}

.cart-drawer.open {
  transform: translateX(0) !important;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1040;
  display: none;
}

.cart-backdrop.open {
  display: block;
}

.cart-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-blue);
}

.cart-title {
  font-size: 1.25rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--neon-blue);
}

.cart-title svg {
  stroke: var(--neon-blue);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: var(--neon-blue);
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-cart-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 240px;
  gap: 10px;
  color: var(--text-muted);
}

.empty-cart-state svg {
  stroke: var(--neon-blue);
}

.empty-cart-state p {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-white);
}

.empty-cart-state span {
  font-size: 0.85rem;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-white);
}

.cart-item-price {
  font-size: 0.82rem;
  color: var(--neon-blue);
  font-family: 'Orbitron', 'Cairo', sans-serif;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--neon-blue);
  background: rgba(0, 229, 255, 0.15);
  color: var(--neon-blue-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.qty-btn:hover {
  background: var(--neon-blue);
  color: #000000;
}

.qty-count {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text-white);
  min-width: 20px;
  text-align: center;
}

.cart-row-total {
  font-size: 1rem;
  font-weight: 900;
  color: var(--neon-blue);
  min-width: 65px;
  text-align: left;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.cart-footer {
  padding-top: 18px;
  border-top: 1px solid var(--border-blue);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label {
  font-size: 1.05rem;
  color: var(--text-white);
  font-weight: 700;
}

.total-value {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--neon-blue);
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
}

.checkout-btn {
  padding: 15px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-blue-deep) 100%);
  color: #000000;
  border: none;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--neon-glow);
  transition: all 0.2s;
}

.checkout-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: var(--neon-glow-strong);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border: 2px solid var(--neon-blue);
  border-radius: var(--radius-lg);
  padding: 30px;
  width: 90%;
  max-width: 450px;
  box-shadow: var(--neon-glow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--neon-blue);
}

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

.form-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-white);
}

.form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.95rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: var(--neon-glow);
}

.modal-submit-btn {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-blue-deep) 100%);
  color: #000000;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
}
