:root {
  --primary: #d32f2f;
  --primary-dark: #b71c1c;
  --accent: #ffb300;
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --text-main: #f5f5f5;
  --text-muted: #aaaaaa;
  --transition: 0.3s ease;
}

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

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Splash Screen with Kitchen Background */
/* Splash Screen */
.splash-screen {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed; /* مهم جداً */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999; /* أعلى من أي حاجة */
  overflow: hidden;
  background-color: #0a0a0a; /* لون غامق كـ fallback */
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      135deg,
      rgba(18, 18, 18, 0.95),
      rgba(18, 18, 18, 0.85)
    ),
    url("https://images.unsplash.com/photo-1514933651103-005eec06c04b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80")
      center/cover no-repeat;
  filter: blur(8px); /* blur على الخلفية */
  transform: scale(1.1); /* عشان الـ blur مايظهرش حواف بيضاء */
  z-index: 1;
  opacity: 0;
  animation: fadeInBg 1s ease-out forwards;
}

@keyframes fadeInBg {
  to {
    opacity: 1;
  }
}

.splash-content {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: fadeIn 1s ease-out;
}

/* إخفاء الـ menu في البداية */
.menu-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  min-height: 100vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

.menu-container.visible {
  opacity: 1;
  visibility: visible;
}

/* Splash Screen مخفي */
.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.restaurant-name {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.tagline {
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 2rem;
  font-weight: 300;
}

.cta-button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
}

.cta-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.6);
}

/* Menu Container */
.menu-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  min-height: 100vh;
}

/* Menu Header */
.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.cart-icon-wrapper {
  position: relative;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-main);
  transition: var(--transition);
}

.cart-icon-wrapper:hover {
  color: var(--accent);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}

/* Sticky Category Navigation */
.category-nav {
  position: sticky;
  top: 0;
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-nav-wrapper {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav-wrapper::-webkit-scrollbar {
  display: none;
}

.category-btn {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.category-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.3);
}

.category-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Menu Card */
.menu-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.4s ease-out;
}

.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
}

.menu-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  transition: var(--transition);
  margin-bottom: 1rem;
}

.menu-image:hover {
  transform: scale(1.02);
}

.badge {
  position: absolute;
  top: 10px;
  right: 15px;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
  z-index: 10;
}

.badge-popular {
  background-color: var(--accent);
  color: #000;
}

.badge-new {
  background-color: #4caf50;
  color: #fff;
}

.badge-hot {
  background-color: var(--primary);
  color: #fff;
}

.menu-info {
  margin-top: 0.5rem;
}

.menu-name {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.menu-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.menu-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

.add-to-cart-btn {
  width: 100%;
  padding: 0.8rem;
  background: var(--primary);
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.add-to-cart-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 350px;
  height: 100vh;
  background: #1a1a1a;
  z-index: 1000;
  padding: 2rem;
  transition: 0.4s ease;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.close-cart {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.cart-item-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.cart-item-info p {
  font-size: 0.85rem;
  color: var(--accent);
}

.cart-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.qty-value {
  font-weight: bold;
  min-width: 30px;
  text-align: center;
}

.remove-item {
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
}

.remove-item:hover {
  color: #ff5252;
}

.cart-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.checkout-btn {
  width: 100%;
  padding: 1rem;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.checkout-btn:hover {
  background: #1ebc57;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

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

/* Image Zoom 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.95);
}

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

.image-modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  animation: zoomIn 0.3s;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-image {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close-image:hover {
  color: var(--primary);
}

/* Checkout Modal */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 6px;
  font-family: inherit;
}
.form-group textarea {
  resize: vertical;
  height: 80px;
}

.confirm-order-btn {
  width: 100%;
  padding: 1rem;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.confirm-order-btn:hover {
  background: #1ebc57;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2.5rem 1rem;
  background-color: #000;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
