/* A+ Bistro — restaurant management learning game */

.nb-body {
  background: linear-gradient(180deg, #2d5016 0%, #1a3309 50%, #0f1f05 100%);
  min-height: 100vh;
  color: #e8f5e0;
}

.nb-app {
  max-width: 900px;
}

.nb-header .landing-nav a[aria-current="page"] {
  font-weight: 600;
  color: #a5d6a7;
}

.nb-main {
  padding: 1rem 0 2rem;
  min-height: 70vh;
}

.nb-screen {
  padding: 1rem 0;
}
.nb-screen[hidden] {
  display: none !important;
}

/* Intro */
.nb-intro {
  text-align: center;
  padding-top: 2rem;
}
.nb-intro-hero {
  margin-bottom: 1rem;
}
.nb-hero-icon {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35));
}
.nb-title {
  font-family: var(--font-display, "Fredoka", sans-serif);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: #fff;
  margin: 0 0 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.nb-intro-text {
  font-size: 1.1rem;
  max-width: 32rem;
  margin: 0 auto 2rem;
  line-height: 1.5;
  color: #c8e6c9;
}

/* Buttons */
.nb-btn {
  font-family: var(--font-body, "Outfit", sans-serif);
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.nb-btn:active {
  transform: scale(0.98);
}
.nb-btn-primary {
  background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
  color: #fff;
}
.nb-btn-primary:hover {
  filter: brightness(1.1);
}
.nb-btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #e8f5e0;
  border: 1px solid rgba(255,255,255,0.3);
}
.nb-btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}
.nb-btn-action {
  background: #ffb74d;
  color: #1b5e20;
}

/* Mode select */
.nb-mode-select {
  max-width: 28rem;
  margin: 0 auto;
}
.nb-heading {
  font-size: 1.35rem;
  margin: 0 0 1.5rem;
  color: #fff;
  text-align: center;
}
.nb-mode-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.nb-mode-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  background: rgba(56, 142, 60, 0.25);
  border: 2px solid rgba(165, 214, 167, 0.4);
  border-radius: 12px;
  color: #e8f5e0;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.nb-mode-card:hover {
  border-color: #81c784;
  background: rgba(56, 142, 60, 0.35);
}
.nb-mode-label {
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: #fff;
}
.nb-mode-desc {
  font-size: 0.9rem;
  color: #c8e6c9;
}

/* Game HUD */
.nb-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
}
.nb-hud-day { font-weight: 600; color: #fff; }
.nb-hud-clock { color: #ff9800; font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; }
.nb-hud-coins { display: inline-flex; align-items: center; gap: 0.35rem; }
.nb-hud-icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}
.nb-hud-icon-clock {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff9800' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
}
.nb-hud-icon-coin {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23ffd54f' stroke='%23ffb300' stroke-width='1.5'/%3E%3Cpath d='M12 6v2c2.2 0 4 1.8 4 4s-1.8 4-4 4v2c3.3 0 6-2.7 6-6s-2.7-6-6-6z' fill='%23ffb300' opacity='0.6'/%3E%3C/svg%3E");
}
.nb-hud-bar-wrap {
  flex: 1;
  min-width: 80px;
  height: 10px;
  background: rgba(0,0,0,0.4);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}
.nb-hud-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2e7d32, #66bb6a, #ff9800);
  border-radius: 5px;
  transition: width 0.3s ease;
}
.nb-hud-coins { color: #ffd54f; font-weight: 700; }
.nb-hud-profit { color: #81c784; font-weight: 700; }
.nb-hud-goal { color: #c8e6c9; font-size: 0.9rem; }

.nb-goal-text {
  font-size: 0.9rem;
  color: #c8e6c9;
  margin: 0 0 0.75rem;
}

/* Restaurant layout */
.nb-restaurant-wrap {
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid rgba(165, 214, 167, 0.3);
}
.nb-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  min-height: 60px;
  align-items: center;
  padding: 0.5rem;
  background: rgba(96, 125, 139, 0.35);
  border-radius: 8px;
  border: 2px dashed rgba(255,255,255,0.4);
}
.nb-floor {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
  min-height: 140px;
}
.nb-kitchen {
  padding: 0.75rem;
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
}
.nb-kitchen-orders {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 44px;
}

/* Table — base and states */
.nb-table {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.35);
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.1s, background 0.2s, border-color 0.2s;
}
.nb-table-sprite {
  position: absolute;
  width: 36px;
  height: 24px;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.85;
  pointer-events: none;
}
.nb-table:hover {
  box-shadow: 0 0 0 2px #81c784;
}
.nb-table.nb-table-selected {
  box-shadow: 0 0 0 3px #ffb74d;
}
/* Empty: muted, available */
.nb-table.nb-table-empty {
  background: rgba(55, 71, 79, 0.5);
  border-color: rgba(255,255,255,0.2);
}
.nb-table.nb-table-empty .nb-table-content { color: #90a4ae; }
/* Waiting for order: amber */
.nb-table.nb-table-waiting-order {
  background: rgba(255, 152, 0, 0.25);
  border-color: rgba(255, 152, 0, 0.7);
}
.nb-table.nb-table-waiting-order .nb-table-content { color: #ffe0b2; }
/* Cooking: orange */
.nb-table.nb-table-cooking {
  background: rgba(255, 87, 34, 0.2);
  border-color: rgba(255, 87, 34, 0.6);
}
.nb-table.nb-table-cooking .nb-table-content { color: #ffccbc; }
/* Ready to serve: bright green */
.nb-table.nb-table-ready {
  background: rgba(76, 175, 80, 0.35);
  border-color: rgba(76, 175, 80, 0.9);
}
.nb-table.nb-table-ready .nb-table-content { color: #c8e6c9; font-weight: 600; }
/* Served / done: soft green */
.nb-table.nb-table-served {
  background: rgba(129, 199, 132, 0.3);
  border-color: rgba(129, 199, 132, 0.6);
}
.nb-table.nb-table-served .nb-table-content { color: #a5d6a7; }
/* Who-next highlight */
.nb-table.nb-customer-highlight {
  box-shadow: 0 0 0 4px #ffeb3b;
  animation: nb-table-pulse 0.8s ease-in-out 2;
}
@keyframes nb-table-pulse {
  50% { box-shadow: 0 0 0 6px rgba(255, 235, 59, 0.6); }
}
.nb-table-seats {
  display: flex;
  gap: 2px;
  font-size: 0.75rem;
  opacity: 0.9;
}
.nb-table-content {
  text-align: center;
  font-size: 0.85rem;
  color: #c8e6c9;
  position: relative;
  z-index: 1;
  margin-top: 22px;
}
.nb-table-content .nb-table-hint {
  display: block;
  margin-top: 0.4rem;
}

/* Customer (in queue or at table) */
.nb-customer {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
  min-width: 52px;
  transition: box-shadow 0.2s;
}
.nb-customer:hover {
  box-shadow: 0 0 0 2px #81c784;
}
.nb-customer.nb-customer-highlight {
  box-shadow: 0 0 0 3px #ffeb3b;
  animation: nb-pulse 0.8s ease-in-out 2;
}
@keyframes nb-pulse {
  50% { box-shadow: 0 0 0 5px rgba(255,235,59,0.5); }
}
.nb-customer-avatar {
  width: 36px;
  height: 36px;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nb-customer-avatar-svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}
.nb-customer-patience {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.4);
  border-radius: 3px;
  overflow: hidden;
}
.nb-customer-patience-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s;
}
.nb-customer-patience-fill.ok { background: #4caf50; }
.nb-customer-patience-fill.low { background: #ff9800; }
.nb-customer-patience-fill.critical { background: #f44336; }
.nb-customer-party {
  font-size: 0.7rem;
  margin-top: 0.15rem;
  color: #fff;
  font-weight: 600;
}

/* Kitchen order */
.nb-kitchen-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.25);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}
.nb-kitchen-item-icon { display: flex; align-items: center; flex-shrink: 0; }
.nb-kitchen-plate-svg {
  width: 22px;
  height: 22px;
}
.nb-kitchen-item-cooking {
  background: rgba(255, 152, 0, 0.3);
  border-color: rgba(255, 152, 0, 0.7);
  color: #ffe0b2;
}
.nb-kitchen-item-ready {
  background: rgba(76, 175, 80, 0.4);
  border-color: #4caf50;
  color: #fff;
}
.nb-kitchen-item-cook {
  width: 48px;
  height: 6px;
  background: rgba(0,0,0,0.4);
  border-radius: 3px;
  overflow: hidden;
}
.nb-kitchen-item-cook-fill {
  height: 100%;
  background: #ff9800;
  border-radius: 3px;
  transition: width 0.15s;
}
.nb-kitchen-item-ready .nb-kitchen-item-cook-fill {
  background: #4caf50;
}

/* Overlays / panels */
.nb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.nb-panel {
  background: linear-gradient(180deg, #1b5e20 0%, #2e7d32 100%);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 22rem;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.nb-panel-wide {
  max-width: 28rem;
}
.nb-day-end-stats,
.nb-week-stats {
  margin: 1rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #c8e6c9;
}
.nb-day-end-message,
.nb-upgrade-desc,
.nb-reflection-question {
  margin: 0.75rem 0;
  color: #e8f5e0;
  line-height: 1.45;
}
.nb-day-end-actions,
.nb-upgrade-options,
.nb-reflection-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.nb-math-question {
  font-size: 1.05rem;
  margin: 0.75rem 0;
  color: #fff;
}
.nb-math-options,
.nb-upgrade-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nb-math-options button,
.nb-upgrade-options button,
.nb-reflection-options button {
  width: 100%;
  text-align: left;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
}
.nb-chart-wrap {
  margin: 1rem 0;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 0.5rem;
}
.nb-chart-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Cosmetic unlocks */
.nb-wall-1 .nb-floor .nb-table { border-color: rgba(255, 193, 7, 0.5); }
.nb-wall-2 .nb-floor .nb-table { border-color: rgba(255, 152, 0, 0.6); }
.nb-table-color-1 { background: rgba(255, 193, 7, 0.2) !important; }
.nb-table-color-2 { background: rgba(255, 152, 0, 0.25) !important; }

/* Actions bar */
.nb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
