/* ==========================================================================
   Ingredients - Darts Kitchen Arena (Extra-Large Targets & Cartoon Plates)
   ========================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0f131f;
  --bg-card: #131728;
  --bg-card-hover: #1b2138;

  --border-color: rgba(255, 255, 255, 0.1);
  --border-active: rgba(18, 187, 106, 0.5);

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-green: #12bb6a;
  --accent-green-glow: rgba(18, 187, 106, 0.7);
  --accent-gold: #f59e0b;
  --accent-rose: #ef4444;
  --accent-rose-glow: rgba(239, 68, 68, 0.7);
  --accent-cyan: #06b6d4;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  overflow-x: hidden;
}

/* ── Header ───────────────────────────────────────────── */
header.ing-header {
  height: 60px;
  padding: 0 28px;
  background: rgba(10, 12, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-back-hub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.btn-back-hub:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ing-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* ── Studio Dashboard ─────────────────────────────────── */
.ing-dashboard-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px;
  width: 100%;
  flex: 1;
}

.dashboard-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.header-text h1 {
  font-size: 24px;
  font-weight: 900;
}

.header-text p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.category-filter-pills {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  gap: 6px;
}

.cat-pill {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-pill.active {
  background: var(--accent-green);
  color: #000;
  box-shadow: 0 2px 10px rgba(18, 187, 106, 0.35);
}

.btn-create-game {
  background: var(--accent-green);
  color: #051a0e;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(18, 187, 106, 0.25);
}

.btn-create-game:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ── Game Grid Cards ──────────────────────────────────── */
.ing-grid {
  padding-top: 6px;
  padding-bottom: 6px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.ing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
}

.ing-card:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  transform: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

.type-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 6px;
}

.type-badge.dish {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.type-badge.cocktail {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.type-badge.dessert {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

.type-badge.mode {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 10px;
}

/* ── Movement Mode Pill Group (Modal) ─────────────────── */
.movement-mode-pills {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  gap: 6px;
}

.mode-pill {
  flex: 1;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mode-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mode-pill.active {
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── Floating Targets (Movement Mode in Arena) ─── */
.floating-arena {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 40;
}

.floating-target-card {
  position: absolute;
  width: 350px;
  height: 350px;
  background: rgba(13, 20, 38, 0.96);
  backdrop-filter: blur(20px);
  border: 5px solid rgba(236, 72, 153, 0.9);
  border-radius: 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 50px rgba(236, 72, 153, 0.55);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  will-change: left, top;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.floating-target-card:hover {
  border-color: #f472b6;
  box-shadow: 0 28px 70px rgba(236, 72, 153, 0.85);
}

.floating-target-card.hit-correct {
  border-color: #12bb6a !important;
  background: rgba(18, 187, 106, 0.45) !important;
  box-shadow: 0 0 65px rgba(18, 187, 106, 0.98) !important;
  pointer-events: none;
}

.floating-target-card.hit-wrong {
  animation: shakeBox 0.4s ease-in-out;
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 0 65px rgba(239, 68, 68, 0.98) !important;
}

.floating-target-icon {
  margin-bottom: 16px;
  color: #f472b6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-target-title {
  font-size: 34px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.95);
  word-break: break-word;
}

.recipes-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.recipe-tag {
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(18, 187, 106, 0.15);
  color: #4ade80;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(18, 187, 106, 0.3);
}

.recipe-tag.fake {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-play-test {
  flex: 1;
  background: var(--accent-green);
  color: #051a0e;
  border: none;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-play-test:hover {
  filter: brightness(1.1);
}

.btn-icon-action {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-icon-action.delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-rose);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ── Modal Configurator ───────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 900;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.form-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

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

/* Prevent Chrome white autofill overlay on dark inputs */
input.form-input:-webkit-autofill,
input.form-input:-webkit-autofill:hover, 
input.form-input:-webkit-autofill:focus, 
input.form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #131728 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 0 0 1000px #131728 inset !important;
  caret-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
}

.timing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  align-items: flex-start;
  width: 100%;
}

.timing-grid.two-cols {
  grid-template-columns: 1fr 1fr;
}

/* ── Authentic Google Chrome-Style Tab Bar with Floating Inactive Tabs ─── */
.chrome-tab-strip {
  display: flex;
  align-items: flex-end;
  background: transparent;
  padding: 0 16px;
  border: none;
  border-bottom: 2px solid #004a77;
  gap: 6px;
  user-select: none;
  position: relative;
  width: 100%;
  height: 44px;
  margin-bottom: 8px;
}

/* Inactive Chrome Tab (Floating Pill) */
.chrome-tab {
  flex: 1;
  height: 35px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  border: none;
  outline: none;
}

/* Inactive tab hover */
.chrome-tab:not(.active):hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Active Chrome Tab - Tallest, connected to bottom baseline with fillets */
.chrome-tab.active {
  height: 38px;
  margin-bottom: -2px;
  border-radius: 10px 10px 0 0;
  background: #004a77;
  color: #ffffff;
  border: none;
  outline: none;
  z-index: 5;
}

/* Chrome tab bottom-left smooth outward curve fillet */
.chrome-tab.active::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -14px;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 0 0, transparent 13.5px, #004a77 14px);
  pointer-events: none;
}

/* Chrome tab bottom-right smooth outward curve fillet */
.chrome-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -14px;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 100% 0, transparent 13.5px, #004a77 14px);
  pointer-events: none;
}

.chrome-tab-favicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: inherit;
  flex-shrink: 0;
}

.chrome-tab-title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Legacy pill fallback compatibility */
.pill-group {
  display: flex;
  gap: 8px;
}

.pill-option {
  flex: 1;
  padding: 10px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.pill-option.active {
  background: rgba(18, 187, 106, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-green);
  color: #051a0e;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

/* ── Uniform Add Ingredient Buttons (Real & Fake) ─────── */
.btn-add-ing {
  min-width: 120px;
  width: 120px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.btn-add-ing.real {
  background: var(--accent-green);
  color: #051a0e;
  border: none;
}

.btn-add-ing.real:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-add-ing.fake {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-add-ing.fake:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   CARTOON GAMEPLAY ARENA & EXTRA-LARGE DARTS PLATES (16:9)
   ========================================================================== */
.game-workspace {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  height: calc(100vh - 60px);
}

.game-main-area {
  flex: 1;
  position: relative;
  background: url('/static/images/kitchen_shelf_bg.jpg') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px 24px 28px;
  overflow: hidden;
}

/* Dark atmospheric vignette over background so plates pop */
.game-main-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10, 14, 25, 0.45) 0%, rgba(5, 7, 13, 0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ── Top HUD ──────────────────────────────────────────── */
.game-hud-bar {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 18, 30, 0.92);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 12px 28px;
  z-index: 50;
  box-shadow: 0 10px 35px rgba(0,0,0,0.8);
}

.hud-dish-name {
  font-size: 26px;
  font-weight: 950;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.02em;
}

.hud-progress-pill {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent-green);
  background: rgba(18, 187, 106, 0.2);
  border: 2px solid var(--accent-green);
  padding: 6px 18px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  box-shadow: 0 0 15px rgba(18, 187, 106, 0.4);
}

.hud-timer-box {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── 2-SHELF KITCHEN ARENA ────────────────────────────── */
.shelves-arena {
  width: 100%;
  max-width: 1300px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin: 6px 0;
  position: relative;
  z-index: 10;
}

.shelf-row {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 10px 20px 38px 20px;
}

/* Thick Cartoon Wooden Shelf Plank */
.shelf-plank {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(180deg, #9b5a2b 0%, #683815 50%, #3a1d08 100%);
  border-radius: 8px;
  border-top: 3px solid #d48b4d;
  border-bottom: 4px solid #1a0c03;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.9), inset 0 2px 4px rgba(255,255,255,0.25);
  z-index: 1;
}

.shelf-brackets {
  position: absolute;
  bottom: -18px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 0;
}

.bracket {
  width: 22px;
  height: 20px;
  background: #181818;
  border-left: 3px solid #444;
  border-right: 3px solid #222;
  border-bottom: 3px solid #000;
}





/* ── INGREDIENT BOX SITTING ON 3D WHITE PORCELAIN PLATE ──────── */
.shelves-arena {
  width: 100%;
  max-width: 1300px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin: 10px 0;
  position: relative;
  z-index: 10;
}

.shelf-row {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 10px 24px 34px 24px;
}

/* Thick Wooden Shelf Plank */
.shelf-plank {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 26px;
  background: linear-gradient(180deg, #9b5a2b 0%, #683815 50%, #3a1d08 100%);
  border-radius: 8px;
  border-top: 3px solid #d48b4d;
  border-bottom: 4px solid #1a0c03;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.9), inset 0 2px 4px rgba(255,255,255,0.25);
  z-index: 1;
}

.shelf-brackets {
  position: absolute;
  bottom: -16px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 0;
}

.bracket {
  width: 20px;
  height: 18px;
  background: #181818;
  border-left: 3px solid #444;
  border-right: 3px solid #222;
  border-bottom: 3px solid #000;
}

/* Pedestal Container for Box + Plate */
.plate-pedestal-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 10;
}

/* 1. The Ingredient Box sitting on the plate */
.ingredient-box {
  width: 280px;
  height: 180px;
  background: linear-gradient(150deg, #1a2238 0%, #0e1322 100%);
  border: 3.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  cursor: pointer;
  position: relative;
  z-index: 5;
  margin-bottom: -18px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8), inset 0 2px 2px rgba(255, 255, 255, 0.2);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ingredient-box:hover {
  transform: translateY(-8px) scale(1.04);
  border-color: #ffffff;
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.95);
}

.ingredient-box:active {
  transform: scale(0.96);
}

.ingredient-icon-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  margin-bottom: 10px;
}

.ingredient-title-text {
  font-size: 26px;
  font-weight: 950;
  text-align: center;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.9);
  max-width: 250px;
  word-break: break-word;
}

/* 2. Authentic White 3D Ceramic Porcelain Plate on the Shelf */
.white-porcelain-plate {
  width: 320px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(ellipse 80% 50% at 50% 25%, #ffffff 0%, #f8fafc 35%, #e2e8f0 70%, #cbd5e1 90%, #94a3b8 100%);
  border: 3px solid #e2e8f0;
  border-bottom: 5px solid #64748b;
  box-shadow: 
    0 16px 30px rgba(0, 0, 0, 0.85),
    0 4px 8px rgba(0, 0, 0, 0.6),
    inset 0 4px 8px #ffffff,
    inset 0 -4px 8px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plate-inner-rim {
  width: 270px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #f8fafc 0%, #e2e8f0 55%, #cbd5e1 90%, #94a3b8 100%);
  border: 1.5px solid rgba(148, 163, 184, 0.5);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.25), inset 0 -2px 3px #ffffff;
}

/* Correct Hit State */
.ingredient-box.hit-correct {
  border-color: var(--accent-green);
  background: linear-gradient(150deg, #114d2a 0%, #082915 100%);
  box-shadow: 0 0 45px var(--accent-green-glow), inset 0 0 20px rgba(18, 187, 106, 0.6);
  transform: scale(1.06);
  pointer-events: none;
  animation: correctBounce 0.5s ease-out forwards;
}

.ingredient-box.hit-correct .ingredient-title-text {
  color: #4ade80;
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.8);
}

.stamp-collected {
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--accent-green);
  color: #000;
  font-size: 13px;
  font-weight: 950;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Wrong Hit State */
.ingredient-box.hit-wrong {
  border-color: var(--accent-rose);
  background: linear-gradient(150deg, #4d1515 0%, #290808 100%);
  box-shadow: 0 0 45px var(--accent-rose-glow);
  animation: wrongShake 0.4s ease-in-out forwards;
}
/* ── CLEAN FULLSCREEN ONE-LINE RECIPE MEMORIZE (NO NEON, NO BOXES) ── */
.recipe-memorize-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 14, 0.94);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 400;
  animation: fadeIn 0.2s ease;
  padding: 0 40px;
  text-align: center;
}

.memorize-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  max-width: 95vw;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 0;
}

.memorize-header-badge {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 18px;
  border-radius: 100px;
}

.memorize-recipe-banner {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto;
}

/* ONE SINGLE LINE HUGE TEXT (NO NEON) */
.recipe-line-text {
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #ffffff;
  white-space: nowrap;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.recipe-line-dish {
  color: #ffffff;
  font-weight: 950;
  text-transform: uppercase;
}

.recipe-line-sep {
  color: #64748b;
  margin: 0 14px;
  font-weight: 400;
}

.recipe-line-ings {
  color: #e2e8f0;
  font-weight: 800;
}

.memorize-countdown-circle {
  font-size: 26px;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 24px;
  border-radius: 100px;
  margin-top: 10px;
}

.memorize-subtext {
  display: none !important;
}
/* ── Floating Hit Feedback Stamp ──────────────────────── */
.floating-hit-stamp {
  position: absolute;
  pointer-events: none;
  font-size: 36px;
  font-weight: 950;
  letter-spacing: 0.05em;
  z-index: 500;
  animation: floatFade 0.8s ease-out forwards;
}

.floating-hit-stamp.success {
  color: var(--accent-green);
  text-shadow: 0 0 25px var(--accent-green-glow);
}

.floating-hit-stamp.wrong {
  color: var(--accent-rose);
  text-shadow: 0 0 25px var(--accent-rose-glow);
}

@keyframes floatFade {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
  50% { transform: translate(-50%, -80%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -110%) scale(1); opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── FULL-SCREEN COUNTDOWN OVERLAYS (STANDARD GAMEHUB THEME) ────────── */
.countdown-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 20, 0.92);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 500;
  animation: fadeIn 0.2s ease;
}

.countdown-number {
  font-size: clamp(140px, 22vw, 260px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: #38bdf8;
  background: linear-gradient(180deg, #ffffff 0%, #6366f1 50%, #312e81 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 15px 35px rgba(99, 102, 241, 0.6)) drop-shadow(0 6px 0 #0f172a);
  user-select: none;
}

.countdown-number.pop {
  animation: numPopOnce 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes numPopOnce {
  0% { transform: scale(0.6); opacity: 0.3; }
  100% { transform: scale(1); opacity: 1; }
}

.countdown-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── GAMEPLAY WORKSPACE & RIGHT SIDEBAR (STANDARD GAMEHUB THEME) ── */
.game-workspace {
  display: flex;
  flex: 1;
  height: calc(100vh - 60px);
  overflow: hidden;
}

.game-main-area {
  flex: 1;
  position: relative;
  background: url('/static/images/kitchen_shelf_bg.jpg') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  overflow: hidden;
}

.game-main-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10, 14, 25, 0.25) 0%, rgba(5, 7, 13, 0.75) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ── RIGHT SIDEBAR (STANDARD THEME) ───────────────────── */
.game-sidebar-right {
  width: 340px;
  background: #0e1222;
  border-left: 1px solid var(--border-color);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: -6px 0 25px rgba(0, 0, 0, 0.5);
}

.sidebar-recipe-card {
  background: #151a2e;
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

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

.sidebar-dish-title {
  font-size: 24px;
  font-weight: 950;
  color: #ffffff;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.sidebar-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.sidebar-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 750;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.sidebar-check-item.collected {
  background: rgba(18, 187, 106, 0.15);
  border-color: rgba(18, 187, 106, 0.4);
  color: #4ade80;
}

.sidebar-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sidebar-stat-box {
  background: #151a2e;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-stat-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.sidebar-stat-val {
  font-size: 22px;
  font-weight: 950;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.sidebar-log-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #151a2e;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
}

.sidebar-log-item.hit {
  border-left: 3px solid #22c55e;
  color: #4ade80;
}

.sidebar-log-item.miss {
  border-left: 3px solid #ef4444;
  color: #f87171;
}

/* ── 2-SHELF KITCHEN ARENA WITH EXTRA-LARGE DARTS BOXES ──────── */
.shelves-arena {
  width: 100%;
  max-width: 1200px;
  height: 90%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  position: relative;
  z-index: 10;
}

.shelf-row {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 0 10px 42px 10px;
  height: 45%;
}

/* Thick Wooden Shelf Plank */
.shelf-plank {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(180deg, #9b5a2b 0%, #683815 50%, #3a1d08 100%);
  border-radius: 8px;
  border-top: 3px solid #d48b4d;
  border-bottom: 4px solid #1a0c03;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.9), inset 0 2px 4px rgba(255,255,255,0.25);
  z-index: 1;
}

.shelf-brackets {
  position: absolute;
  bottom: -18px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 0;
}

.bracket {
  width: 22px;
  height: 20px;
  background: #181818;
  border-left: 3px solid #444;
  border-right: 3px solid #222;
  border-bottom: 3px solid #000;
}

/* Pedestal Container */
.plate-pedestal-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 10;
}

/* EXTRA-LARGE INGREDIENT TARGET BOX */
.ingredient-box {
  width: 320px;
  height: 210px;
  background: linear-gradient(150deg, #182038 0%, #0d1222 100%);
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: pointer;
  position: relative;
  z-index: 5;
  margin-bottom: -22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85), inset 0 2px 2px rgba(255, 255, 255, 0.25);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ingredient-box:hover {
  transform: translateY(-10px) scale(1.04);
  border-color: #ffffff;
  box-shadow: 0 26px 52px rgba(0, 0, 0, 0.95);
}

.ingredient-box:active {
  transform: scale(0.96);
}

.ingredient-icon-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  margin-bottom: 12px;
}

.ingredient-title-text {
  font-size: 28px;
  font-weight: 950;
  text-align: center;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.9);
  max-width: 290px;
  word-break: break-word;
}

/* White 3D Ceramic Porcelain Plate */
.white-porcelain-plate {
  width: 360px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(ellipse 80% 50% at 50% 25%, #ffffff 0%, #f8fafc 35%, #e2e8f0 70%, #cbd5e1 90%, #94a3b8 100%);
  border: 3.5px solid #e2e8f0;
  border-bottom: 6px solid #64748b;
  box-shadow: 
    0 18px 34px rgba(0, 0, 0, 0.85),
    0 4px 10px rgba(0, 0, 0, 0.6),
    inset 0 4px 8px #ffffff,
    inset 0 -4px 8px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plate-inner-rim {
  width: 310px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #f8fafc 0%, #e2e8f0 55%, #cbd5e1 90%, #94a3b8 100%);
  border: 1.5px solid rgba(148, 163, 184, 0.5);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.25), inset 0 -2px 3px #ffffff;
}

/* Correct Hit State */
.ingredient-box.hit-correct {
  border-color: var(--accent-green);
  background: linear-gradient(150deg, #114d2a 0%, #082915 100%);
  box-shadow: 0 0 50px var(--accent-green-glow), inset 0 0 25px rgba(18, 187, 106, 0.6);
  transform: scale(1.06);
  pointer-events: none;
  animation: correctBounce 0.5s ease-out forwards;
}

.ingredient-box.hit-correct .ingredient-title-text {
  color: #4ade80;
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.8);
}

.stamp-collected {
  position: absolute;
  top: 10px;
  right: 14px;
  background: var(--accent-green);
  color: #000;
  font-size: 14px;
  font-weight: 950;
  padding: 4px 14px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Wrong Hit State */
.ingredient-box.hit-wrong {
  border-color: var(--accent-rose);
  background: linear-gradient(150deg, #4d1515 0%, #290808 100%);
  box-shadow: 0 0 50px var(--accent-rose-glow);
  animation: wrongShake 0.4s ease-in-out forwards;
}

/* Universal Modal & Input Full-Height Fix */
.modal-content {
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.modal-body {
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.form-input {
  box-sizing: border-box !important;
  height: 44px !important;
  line-height: normal !important;
  font-family: inherit !important;
}


/* ========================================================================== */
/* FLAWLESS FULL-HEIGHT SCROLLABLE MODAL SYSTEM                               */
/* ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px 16px;
}

.modal-content {
  background: #0f1424;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  margin: auto;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #0f1424;
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto !important;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(90vh - 130px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  background: rgba(10, 14, 26, 0.8);
}

/* Custom Scrollbar on Modal Body */
.modal-body::-webkit-scrollbar {
  width: 7px;
}
.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 6px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

/* Ensure all inner item lists expand naturally without internal nested cutoff */
#balloonsContainer, .bal-sections-wrapper,
#discountsContainer, #discountsList,
#fishesContainer, #fishesList,
#recipesContainer, #recipesList,
#ingredientsContainer, #ingredientsList,
#normalBalloonsList, #specialBalloonsList, #bombBalloonsList {
  max-height: none !important;
  overflow: visible !important;
  height: auto !important;
}

.form-input, input[type="text"].form-input, input[type="number"].form-input {
  box-sizing: border-box;
  height: 44px;
  line-height: normal;
  font-family: inherit;
}

.modal-body > * { flex-shrink: 0; }
