/* ============================================================
   CHEF CRUSH - RESTAURANT KITCHEN STYLING
   ============================================================ */

:root {
  --primary-pink: #ff3366;
  --chef-red: #e53935;
  --chef-orange: #ff6f00;
  --chef-amber: #ffa000;
  --chef-yellow: #fbc02d;
  --chef-green: #2e7d32;
  --chef-teal: #00897b;
  --chef-blue: #0288d1;
  --chef-purple: #7b1fa2;
  
  --card-bg: rgba(255, 255, 255, 0.93);
  --card-border: rgba(255, 255, 255, 0.85);
  --card-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
  --text-dark: #2c1d11;
  --text-muted: #795548;
}

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

body {
  background-image: url('background.jpg'), url('background.png'), url('background.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

/* Dark semi-transparent warm vignette backdrop for restaurant contrast */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(30, 15, 10, 0.2) 0%, rgba(15, 8, 5, 0.65) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   MODALS (COMMON)
   ============================================================ */
#modeSelection,
#dailyLoginModal,
#levelSelectionModal,
#victoryModal,
#defeatModal,
#creditsModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(18, 10, 5, 0.78);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 20px;
}

.modal-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-radius: 28px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 111, 0, 0.25);
  padding: 34px 30px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  animation: modalPopIn 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.logo-badge {
  font-size: 42px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
  animation: floatBounce 2.5s infinite ease-in-out;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.game-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #d32f2f, #ff6f00, #ffa000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.game-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 18px;
}

/* ============================================================
   DAILY LOGIN BANNER ON MAIN MENU
   ============================================================ */
.btn-daily-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 2px solid #ffb74d;
  border-radius: 18px;
  cursor: pointer;
  text-align: left;
  transition: all 0.22s ease;
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.2);
}

.btn-daily-banner:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 20px rgba(255, 152, 0, 0.35);
  border-color: #ff9800;
}

.daily-banner-icon {
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.daily-banner-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.daily-banner-title {
  font-size: 15px;
  font-weight: 800;
  color: #e65100;
  letter-spacing: 0.3px;
}

.daily-banner-sub {
  font-size: 11px;
  font-weight: 600;
  color: #8d6e63;
  margin-top: 1px;
}

.daily-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  background: #e53935;
  color: #fff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.pulse-badge {
  animation: badgeGlowPulse 1.2s infinite alternate ease-in-out;
}

@keyframes badgeGlowPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(229, 57, 53, 0.5); }
  100% { transform: scale(1.08); box-shadow: 0 0 12px rgba(229, 57, 53, 0.7); }
}

.mode-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-mode {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.btn-mode .mode-icon {
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  flex-shrink: 0;
}

.btn-mode .mode-text {
  display: flex;
  flex-direction: column;
}

.btn-mode .mode-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.btn-mode .mode-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2px;
}

.btn-story {
  background: linear-gradient(135deg, #ff6f00, #d32f2f);
}

.btn-story:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 24px rgba(229, 57, 53, 0.45);
}

.btn-endless {
  background: linear-gradient(135deg, #0288d1, #00897b);
}

.btn-endless:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 137, 123, 0.45);
}

.recipes-mini {
  display: flex;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.04);
  padding: 11px 8px;
  border-radius: 14px;
  border: 1px dashed rgba(0, 0, 0, 0.14);
}

.recipe-item {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ============================================================
   DAILY LOGIN MODAL SCREEN
   ============================================================ */
.daily-modal-card {
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 24px;
}

.daily-modal-header {
  margin-bottom: 16px;
}

.daily-modal-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #e65100, #ff8f00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.daily-modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.daily-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  padding: 4px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  color: #e65100;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.daily-card {
  background: #fff;
  border: 2px solid #e0d0c5;
  border-radius: 16px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.22s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.daily-card.grand-card {
  grid-column: span 3;
  background: linear-gradient(135deg, #fffde7, #fff8e1);
  border-color: #ffd54f;
  flex-direction: row;
  justify-content: space-around;
  padding: 14px 20px;
}

.daily-card.today {
  border-color: #ff9800;
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.35), 0 8px 22px rgba(255, 152, 0, 0.25);
  animation: todayCardGlow 1.5s infinite alternate ease-in-out;
}

@keyframes todayCardGlow {
  0% { transform: scale(1); }
  100% { transform: scale(1.02); }
}

.daily-card.claimed {
  background: #f1f8e9;
  border-color: #c8e6c9;
  opacity: 0.85;
}

.daily-card.locked {
  background: #f7f4f2;
  border-color: #e0d5cf;
  opacity: 0.6;
}

.daily-day-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  background: #ff6f00;
  padding: 2px 8px;
  border-radius: 8px;
  margin-bottom: 6px;
}

.daily-card.claimed .daily-day-label {
  background: #43a047;
}

.daily-card.locked .daily-day-label {
  background: #8d6e63;
}

.daily-reward-icon {
  font-size: 32px;
  margin: 4px 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.daily-card.grand-card .daily-reward-icon {
  font-size: 40px;
}

.daily-reward-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.daily-reward-sub {
  font-size: 11px;
  font-weight: 600;
  color: #e65100;
  margin-bottom: 6px;
}

.daily-status-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: uppercase;
}

.badge-ready {
  background: #ff9800;
  color: #fff;
  animation: badgeGlowPulse 1s infinite alternate;
}

.badge-claimed {
  background: #43a047;
  color: #fff;
}

.badge-locked {
  background: #bdbdbd;
  color: #fff;
}

.daily-modal-footer {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-claim-daily {
  background: linear-gradient(135deg, #2e7d32, #43a047) !important;
  font-size: 15px !important;
  padding: 12px 24px !important;
  border-radius: 16px !important;
}

.btn-claim-daily:disabled {
  background: #9e9e9e !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-close-daily {
  background: #795548 !important;
  padding: 12px 20px !important;
  border-radius: 16px !important;
}

/* ============================================================
   CHEF'S PANTRY BOOSTERS CARD (IN LEFT PANEL)
   ============================================================ */
.pantry-card {
  padding: 14px 16px;
}

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

.btn-pantry-daily {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  padding: 3px 8px;
  display: flex;
  align-items: center;
  position: relative;
  transition: all 0.2s ease;
}

.btn-pantry-daily:hover {
  transform: scale(1.08);
  border-color: #ff9800;
}

.daily-dot {
  width: 8px;
  height: 8px;
  background: #e53935;
  border-radius: 50%;
  position: absolute;
  top: -3px;
  right: -3px;
  border: 1.5px solid #fff;
  display: none;
}

.daily-dot.active {
  display: block;
  animation: badgeGlowPulse 1s infinite alternate;
}

.pantry-boosters-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn-booster {
  background: #fff;
  border: 1.5px solid #e0d0c5;
  border-radius: 12px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.btn-booster:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #ff9800;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.25);
}

.btn-booster:active:not(:disabled) {
  transform: scale(0.96);
}

.btn-booster .booster-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.btn-booster .booster-name {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dark);
}

.btn-booster .booster-count {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: #ff6f00;
  padding: 1px 5px;
  border-radius: 6px;
  margin-top: 3px;
  min-width: 16px;
  text-align: center;
}

.booster-moves .booster-count {
  background: #0288d1;
}

/* ============================================================
   STORY MODE LEVEL SELECTION MODAL
   ============================================================ */
.level-modal-card {
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
}

.level-modal-header {
  margin-bottom: 20px;
}

.logo-badge-small {
  font-size: 32px;
  margin-bottom: 4px;
}

.level-modal-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #d32f2f;
  margin-bottom: 6px;
}

.level-modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.level-card {
  background: #fff;
  border: 2px solid #e0d0c5;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.level-card:not(.locked):hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #ff6f00;
  box-shadow: 0 8px 20px rgba(255, 111, 0, 0.22);
}

.level-card.active-level {
  border-color: #e53935;
  box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.3), 0 8px 20px rgba(229, 57, 53, 0.25);
}

.level-card.locked {
  background: #f5f2ef;
  border-color: #d7ccc8;
  opacity: 0.65;
  cursor: not-allowed;
}

.level-number-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  background: #ff6f00;
  padding: 2px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.level-card.locked .level-number-badge {
  background: #8d6e63;
}

.level-dish-icon {
  font-size: 40px;
  margin: 4px 0;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.15));
}

.level-dish-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-targets-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: #faf6f2;
  padding: 6px 10px;
  border-radius: 10px;
  width: 100%;
}

.level-moves-pill {
  font-size: 11px;
  font-weight: 700;
  color: #d32f2f;
  margin-bottom: 8px;
}

.level-stars-display {
  display: flex;
  gap: 4px;
  font-size: 16px;
  margin-bottom: 12px;
}

.btn-cook-level {
  width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #ff6f00, #e53935);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
}

.btn-cook-level:hover {
  transform: scale(1.03);
}

.level-card.locked .btn-cook-level {
  background: #bdbdbd;
  cursor: not-allowed;
  box-shadow: none;
}

.level-modal-footer {
  margin-top: 15px;
  display: flex;
  justify-content: center;
}

.btn-back-menu {
  background: #5d4037 !important;
}

/* ============================================================
   VICTORY & DEFEAT RESULT MODALS
   ============================================================ */
.result-modal-card {
  max-width: 440px;
  padding: 32px 28px;
}

.victory-banner {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #2e7d32;
  background: rgba(46, 125, 50, 0.12);
  padding: 8px 16px;
  border-radius: 16px;
  display: inline-block;
  margin-bottom: 12px;
}

.defeat-banner {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.12);
  padding: 8px 16px;
  border-radius: 16px;
  display: inline-block;
  margin-bottom: 12px;
}

.result-dish-icon {
  font-size: 64px;
  margin: 10px 0;
  animation: floatBounce 2s infinite ease-in-out;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2));
}

.result-dish-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.result-dish-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.result-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 32px;
  margin-bottom: 18px;
}

.result-stars .star-item {
  animation: starPop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  filter: drop-shadow(0 2px 5px rgba(255, 193, 7, 0.4));
}

@keyframes starPop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

.result-stats-card {
  background: #fbf8f5;
  border: 1px solid #e7ded6;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
  text-align: left;
}

.result-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
  margin: 4px 0;
}

.result-stat-row strong {
  color: var(--text-dark);
}

.text-success {
  color: #2e7d32 !important;
}

.result-stat-divider {
  height: 1px;
  background: #e0d0c5;
  margin: 8px 0;
}

.total-row {
  font-size: 16px;
  font-weight: 800;
}

.total-row strong {
  font-size: 20px;
  color: #e65100 !important;
}

.missing-ingredients-box {
  background: #fff3f3;
  border: 1px dashed #ef9a9a;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 20px;
  text-align: left;
}

.missing-title {
  font-size: 12px;
  font-weight: 700;
  color: #c62828;
  margin-bottom: 6px;
}

.missing-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.missing-item {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.btn-next-level {
  background: linear-gradient(135deg, #2e7d32, #43a047) !important;
  font-size: 15px !important;
  padding: 12px !important;
}

.btn-replay {
  background: linear-gradient(135deg, #ff6f00, #ffa000) !important;
}

/* ============================================================
   MAIN GAME LAYOUT (CENTERED BOARD + SIDE PANELS)
   ============================================================ */
.game-container {
  display: none; /* Shown as grid in startGame */
  position: relative;
  z-index: 1;
  grid-template-columns: 290px 580px 290px;
  justify-content: center;
  align-items: center;
  gap: 24px;
  min-height: 100vh;
  width: 100%;
  max-width: 1280px;
  padding: 16px;
  margin: 0 auto;
}

/* Panels */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.panel-card {
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  border-radius: 20px;
  border: 2px solid var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 16px 18px;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel-card:hover {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
}

.card-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Brand Card */
.brand-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #d32f2f, #ff6f00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.mode-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff6f00, #d32f2f);
  color: #fff;
  letter-spacing: 0.5px;
}

/* ============================================================
   SCOREBOARD & MOVES
   ============================================================ */
.scoreBoard {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px;
  margin: 0 !important;
  background: var(--card-bg);
  border-radius: 20px;
  color: var(--text-dark);
}

.score-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.high-score-label {
  font-size: 12px;
  font-weight: 700;
  color: #e65100;
  background: rgba(255, 152, 0, 0.15);
  padding: 3px 8px;
  border-radius: 10px;
}

#score {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  margin: 4px 0;
  background: linear-gradient(135deg, #d32f2f, #ff6f00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(229, 57, 53, 0.25));
  transition: transform 0.15s ease;
}

.score-bump {
  animation: scoreBump 0.2s ease-out;
}

@keyframes scoreBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* Moves Left Display in Story Mode */
.moves-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 111, 0, 0.09);
  border: 1px solid rgba(255, 111, 0, 0.2);
  border-radius: 14px;
  padding: 6px 16px;
  margin: 6px 0 12px 0;
  width: 100%;
}

.moves-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #e65100;
}

.moves-count {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  color: #d32f2f;
  transition: all 0.2s ease;
}

.moves-low {
  color: #b71c1c !important;
  animation: moveWarningPulse 0.8s infinite alternate ease-in-out;
}

@keyframes moveWarningPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); }
}

/* Infinity Mode Timer */
.timer-display {
  font-size: 13px;
  font-weight: 700;
  color: #0288d1;
  background: rgba(3, 169, 244, 0.12);
  padding: 6px 14px;
  border-radius: 12px;
  margin: 6px 0 12px 0;
  width: 100%;
}

.card-buttons {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.card-buttons .btn-action {
  padding: 8px 4px;
  font-size: 11px;
}

.btn-action {
  padding: 8px 10px;
  border-radius: 12px;
  border: none;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.btn-change-mode {
  background: linear-gradient(135deg, #5d4037, #795548);
}

.btn-level-select {
  background: linear-gradient(135deg, #0288d1, #0277bd);
}

.btn-restart {
  background: linear-gradient(135deg, #ff6f00, #e65100);
}

.btn-credits {
  background: linear-gradient(135deg, #7b1fa2, #512da8);
}

/* ============================================================
   RECIPE ORDER CARD (STORY MODE)
   ============================================================ */
.recipe-card {
  padding: 16px;
}

.recipe-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.recipe-level-badge {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #d32f2f;
  padding: 2px 8px;
  border-radius: 10px;
}

.recipe-dish-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.recipe-dish-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.recipe-dish-details {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.recipe-dish-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.recipe-dish-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.recipe-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 6px 0 8px 0;
}

.recipe-targets-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-align: left;
  margin-bottom: 8px;
}

.recipe-ingredients-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recipe-target-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 6px 10px;
  transition: all 0.2s ease;
}

.recipe-target-item.completed {
  background: rgba(46, 125, 50, 0.1);
  border-color: rgba(46, 125, 50, 0.35);
}

.recipe-target-thumb {
  width: 28px;
  height: 28px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.recipe-target-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.recipe-target-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
}

.recipe-target-count {
  font-size: 11px;
  font-weight: 800;
  color: #ff6f00;
}

.recipe-target-item.completed .recipe-target-count {
  color: #2e7d32;
}

.recipe-progress-wrap {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.recipe-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff9800, #4caf50);
  border-radius: 4px;
  transition: width 0.25s ease;
}

.recipe-target-check {
  font-size: 14px;
  color: #2e7d32;
  display: none;
}

.recipe-target-item.completed .recipe-target-check {
  display: block;
}

/* Guide Card */
.guide-card {
  padding: 16px;
}

.guide-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.03);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.guide-icon {
  font-size: 22px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.guide-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.guide-info strong {
  font-size: 13px;
  color: var(--text-dark);
}

.guide-info small {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   CENTER VEGETABLE BOARD
   ============================================================ */
.board-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.board-frame {
  position: relative;
  padding: 10px;
  background: rgba(28, 14, 10, 0.82);
  backdrop-filter: blur(14px);
  border: 4px solid rgba(255, 204, 188, 0.45);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), inset 0 0 25px rgba(255, 111, 0, 0.2);
}

.grid {
  display: flex;
  flex-wrap: wrap;
  height: 560px;
  width: 560px;
  background-color: rgba(20, 10, 6, 0.68);
  padding: 0;
  margin: 0 !important;
  border-radius: 14px;
  box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.7);
  position: relative;
}

.grid div {
  height: 70px;
  width: 70px;
  background-size: 82% 82%;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  cursor: grab;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.18s ease;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.grid div:active {
  cursor: grabbing;
}

.grid div:hover {
  transform: scale(1.12);
  filter: drop-shadow(0 6px 12px rgba(255, 255, 255, 0.35)) brightness(1.1);
  z-index: 10;
}

/* Floating Combo Notification on Board */
.combo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
}

.floating-combo-popup {
  position: absolute;
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  font-size: 38px;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8), 0 0 30px currentColor;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: comboPopAnimation 1.1s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  pointer-events: none;
}

.floating-combo-popup .combo-sub {
  font-size: 22px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 3px 16px;
  border-radius: 20px;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

@keyframes comboPopAnimation {
  0% {
    opacity: 0;
    transform: scale(0.4) translateY(35px);
  }
  20% {
    opacity: 1;
    transform: scale(1.22) translateY(0);
  }
  40% {
    transform: scale(1.1) translateY(-8px);
  }
  75% {
    opacity: 1;
    transform: scale(1.02) translateY(-25px);
  }
  100% {
    opacity: 0;
    transform: scale(0.9) translateY(-50px);
  }
}

/* ============================================================
   RIGHT SIDE PANEL (COMBOS & ACTION LOGS)
   ============================================================ */

/* Combos Card */
.combo-card {
  padding: 18px;
}

.combo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.max-combo-badge {
  font-size: 11px;
  font-weight: 700;
  color: #c2185b;
  background: rgba(233, 30, 99, 0.12);
  padding: 3px 8px;
  border-radius: 10px;
}

.combo-display {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0;
}

.combo-multiplier {
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  color: #888;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
  transition: color 0.2s ease, transform 0.2s ease;
  min-width: 65px;
}

.combo-pop {
  animation: comboBadgePop 0.25s ease-out;
}

@keyframes comboBadgePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.combo-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.combo-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #888;
  text-transform: uppercase;
}

.combo-progress-bg {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.combo-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff6f00, #ffd700);
  border-radius: 6px;
  transition: width 0.1s linear;
}

.combo-stats {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* Action Logs Card */
.logs-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px;
}

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

.logs-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logs-icon {
  font-size: 15px;
}

.btn-clear-logs {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-logs:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-dark);
}

.logs-feed {
  height: 165px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  scroll-behavior: smooth;
}

/* Custom Scrollbar for Logs */
.logs-feed::-webkit-scrollbar {
  width: 5px;
}

.logs-feed::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
}

.logs-feed::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.logs-feed::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
}

/* Log Item */
.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  padding: 8px 10px;
  border-left: 3px solid #ccc;
  animation: slideInLog 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: left;
}

@keyframes slideInLog {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.log-entry.log-match {
  border-left-color: #ff9800;
}

.log-entry.log-bomb,
.log-entry.log-create-bomb {
  border-left-color: #ff3d00;
  background: rgba(255, 61, 0, 0.08);
}

.log-entry.log-choco,
.log-entry.log-create-choco {
  border-left-color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
}

.log-entry.log-xbomb,
.log-entry.log-create-xbomb {
  border-left-color: #ffb300;
  background: rgba(255, 179, 0, 0.09);
}

.log-entry.log-megabomb {
  border-left-color: #d50000;
  background: rgba(213, 0, 0, 0.09);
}

.log-entry.log-supernova {
  border-left-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 64, 129, 0.12));
}

.log-entry.log-system {
  border-left-color: #ff6f00;
  background: rgba(255, 111, 0, 0.08);
}

.log-icon {
  font-size: 16px;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 1px;
}

.log-content {
  flex: 1;
  min-width: 0;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.log-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-combo-tag {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff6f00, #d32f2f);
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
}

.log-pts {
  font-size: 11px;
  font-weight: 800;
  color: #2e7d32;
  background: rgba(46, 125, 50, 0.12);
  padding: 1px 6px;
  border-radius: 8px;
  flex-shrink: 0;
}

.log-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
  word-break: break-word;
}

.log-time {
  font-size: 9px;
  color: #999;
  display: block;
  margin-top: 3px;
}

/* ============================================================
   RESPONSIVE DESIGN (Ensuring Center Board on All Screens)
   ============================================================ */
@media (max-width: 1220px) {
  .game-container {
    grid-template-columns: 260px 580px 260px;
    gap: 16px;
    padding: 12px;
  }
}

@media (max-width: 1120px) {
  body {
    overflow-y: auto;
  }
  .game-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "board"
      "left"
      "right";
    height: auto;
    min-height: 100vh;
    gap: 20px;
    padding: 24px 16px;
  }
  .board-wrapper {
    grid-area: board;
    margin: 0 auto;
  }
  .left-panel {
    grid-area: left;
    max-width: 580px;
    margin: 0 auto;
  }
  .right-panel {
    grid-area: right;
    max-width: 580px;
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .board-frame {
    transform: scale(0.85);
    transform-origin: center center;
  }
  .game-container {
    padding: 10px 4px;
  }
  .daily-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .daily-card.grand-card {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .board-frame {
    transform: scale(0.68);
    transform-origin: center center;
  }
  .daily-grid {
    grid-template-columns: 1fr;
  }
  .daily-card.grand-card {
    grid-column: span 1;
    flex-direction: column;
  }
}

/* ============================================================
   CREDITS MODAL & MENU BUTTON STYLING
   ============================================================ */
.btn-menu-credits {
  margin-top: 14px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(121, 85, 72, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-menu-credits:hover {
  background: #ffffff;
  border-color: #ff6f00;
  color: #d32f2f;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(255, 111, 0, 0.25);
}

.credits-modal-card {
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: left;
  padding: 28px 26px;
}

.credits-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.credits-modal-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #d32f2f, #ff6f00, #ffa000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.credits-modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.credits-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.credits-section {
  background: #faf6f2;
  border: 1.5px solid rgba(121, 85, 72, 0.16);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.credits-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.credits-section-icon {
  font-size: 20px;
}

.credits-section-title {
  font-size: 14px;
  font-weight: 800;
  color: #5d4037;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.credits-info-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.credits-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.credits-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.credits-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
}

.credits-highlight {
  color: #d32f2f;
  background: #ffebee;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px dashed #ef9a9a;
  letter-spacing: 0.5px;
  font-family: monospace;
  font-size: 13px;
}

.credit-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.credit-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.credit-item-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #fff3e0;
  border-radius: 10px;
  flex-shrink: 0;
}

.credit-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.credit-item-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.credit-source-line {
  font-size: 12px;
  color: #5d4037;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #fdfaf6;
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid #ff9800;
}

.credit-source-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #ff6f00;
  letter-spacing: 0.5px;
}

.credit-link {
  color: #0288d1;
  text-decoration: underline;
  word-break: break-all;
  font-weight: 600;
  transition: color 0.15s ease;
}

.credit-link:hover {
  color: #d32f2f;
}

.credit-text-value {
  font-weight: 700;
  color: #2e7d32;
}

.credits-modal-footer {
  display: flex;
  justify-content: center;
}

.btn-close-credits {
  background: linear-gradient(135deg, #5d4037, #795548) !important;
  font-size: 14px !important;
  padding: 10px 30px !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 12px rgba(93, 64, 55, 0.3) !important;
}

.btn-close-credits:hover {
  background: linear-gradient(135deg, #4e342e, #5d4037) !important;
  transform: translateY(-2px);
}
