:root {
  --accent: #0d6efd;
  --accent-dark: #0b5ed7;
  --bg: #f7f9fb;
  --text: #222;
  --muted: #6c757d;
  --radius: 8px;
  --shadow-light: 0 3px 10px rgba(0,0,0,0.05);
  --shadow-medium: 0 6px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 10px 25px rgba(0,0,0,0.12);
  --transition: 0.3s ease;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ---------------- Topbar ---------------- */
.topbar {
  background: var(--accent);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.actions .btn {
  margin-left: 10px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: .9rem;
  transition: var(--transition);
}

/* ---------------- Layout ---------------- */
.container {
  display: flex;
  gap: 20px;
  padding: 20px;
  max-width: 1150px;
  margin: 20px auto;
}

.hidden { display: none !important; }

.menu-section, .order-section, #authSection {
  background: #fff;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-light);
  flex: 1;
}

/* ---------------- Section Titles ---------------- */
.section-title {
  margin: 0 0 5px 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.section-subtitle {
  margin: 0 0 20px 0;
  color: var(--muted);
  font-size: .95rem;
}

/* ---------------- Buttons ---------------- */
.btn,
.btn-outline,
.btn-primary {
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .9rem;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
}

.btn {
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  color: #222;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

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

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.small {
  padding: 6px 10px;
  font-size: .8rem;
}

.full {
  width: 100%;
}

/* ---------------- Form Styling ---------------- */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
  font-size: .95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  background-color: #fff;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
  outline: none;
  background-color: #fff;
}

.form-group ::placeholder {
  color: var(--muted);
  opacity: 1;
  font-size: .95rem;
}

/* ---------------- Login/Register Modern Styling ---------------- */
#authSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

#authSection h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
}

#authSection form {
  background: #fff;
  padding: 30px 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-medium);
  width: 100%;
  max-width: 400px;
  margin-bottom: 20px;
  transition: transform var(--transition), box-shadow var(--transition);
}

#authSection form:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

#authSection h3 {
  margin-top: 0;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--accent-dark);
}

#authSection button.btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 10px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

#authSection button.btn-primary:hover {
  background: var(--accent-dark);
}

#authSection p {
  text-align: center;
  font-size: .95rem;
  color: var(--muted);
}

#authSection a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  margin-left: 4px;
}

#authSection a:hover {
  text-decoration: underline;
}

/* Divider between login/register */
#authSection .divider {
  text-align: center;
  margin: 15px 0;
  position: relative;
}

#authSection .divider::before,
#authSection .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #ddd;
}

#authSection .divider::before { left: 0; }
#authSection .divider::after { right: 0; }

/* Smooth transition for showing/hiding forms */
#loginFormDiv, #registerFormDiv {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#loginFormDiv.hidden, #registerFormDiv.hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

/* ---------------- Menu List ---------------- */
.menu-item {
  display:flex;
  justify-content:space-between;
  padding:10px 0;
  border-bottom:1px solid #eee;
}

.menu-item:last-child {
  border-bottom:none;
}

/* ---------------- Placeholder ---------------- */
.placeholder {
  background:#fafafa;
  padding:12px;
  border-radius:6px;
  border:1px dashed #ddd;
  color:var(--muted);
}

/* ---------------- Cart Modal ---------------- */
.modal {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  backdrop-filter:blur(2px);
  z-index:1000;
}

.modal.hidden {
  display:none;
}

.modal-content {
  background:#fff;
  padding:20px;
  border-radius:var(--radius);
  min-width:320px;
  max-width:400px;
  box-shadow:0 4px 16px rgba(0,0,0,.2);
}

.cart-total {
  margin-top:10px;
  font-weight:bold;
  font-size:1.1rem;
  text-align:right;
}

/* ---------------- Responsive ---------------- */
@media (max-width:820px) {
  .container {
    flex-direction: column;
  }
}

@media (max-width:480px) {
  #authSection {
    padding: 20px 15px;
  }

  #authSection form {
    padding: 25px 20px;
  }

  .menu-item {
    flex-direction: column;
    gap: 6px;
  }

  .cart-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .actions .btn {
    margin-left: 5px;
    font-size: .85rem;
    padding: 6px 10px;
  }

  .topbar h1 {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 1.3rem;
  }
}
