/* ==========================================================================
   Nusantara Cooking Chaos: The Corrs Edition - Main Stylesheet
   ========================================================================== */

:root {
  --bg-dark: #0f172a;
  --bg-panel: rgba(30, 41, 59, 0.85);
  --primary: #f59e0b;
  --primary-glow: rgba(245, 158, 11, 0.4);
  --accent-red: #ef4444;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.12);
  --radius-lg: 16px;
  --radius-md: 10px;
  --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

body {
  background: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 100%);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
}

/* App Container */
#app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100vw;
  overflow-y: auto;
}

/* Header & Top Bar */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.btn-header {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

/* Screen Transitions */
.screen {
  display: none !important;
  flex: 1;
  width: 100%;
}

.screen.active {
  display: flex !important;
  flex-direction: column;
}

/* Cover / Splash Screen - Grand & Cinematic */
#screen-cover {
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 24px 16px 60px;
  overflow-y: auto !important;
  min-height: calc(100vh - 70px);
  background: radial-gradient(circle at 50% 20%, #3b112c 0%, #151128 50%, #0a0d18 100%);
}

.cover-wrapper {
  max-width: 1060px;
  width: 100%;
  background: rgba(22, 27, 46, 0.9);
  border: 2px solid rgba(245, 158, 11, 0.55);
  border-radius: 20px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.8), 0 0 50px rgba(245, 158, 11, 0.35);
  overflow: hidden;
  backdrop-filter: blur(20px);
  animation: fadeIn 0.4s ease-out;
  margin: 0 auto;
}

.cover-image-container {
  position: relative;
  width: 100%;
  max-height: 560px;
  overflow: hidden;
  background: #000;
  display: block;
}

.cover-image-container img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.cover-image-container:hover img {
  transform: scale(1.015);
}

.cover-badge-floating {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.7);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fbbf24;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.cover-content-box {
  padding: 24px 32px 36px;
  text-align: center;
  background: linear-gradient(180deg, rgba(20, 24, 40, 0.95) 0%, rgba(12, 16, 28, 0.98) 100%);
  border-top: 1px solid rgba(245, 158, 11, 0.3);
}

.cover-title-text {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 50%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(249, 115, 22, 0.3));
}

.cover-sub-text {
  font-size: 1.05rem;
  color: #e2e8f0;
  margin-bottom: 22px;
}

.cover-actions-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.btn-start-huge {
  width: 100%;
  max-width: 520px;
  padding: 16px 36px;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 45%, #dc2626 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(234, 88, 12, 0.55), 0 0 25px rgba(245, 158, 11, 0.4);
  transition: all 0.25s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.btn-start-huge:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(234, 88, 12, 0.75), 0 0 35px rgba(245, 158, 11, 0.6);
}

.cover-secondary-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

/* Spice Themed Buttons (Matching Cover Palette) */
.btn-spice-emerald {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.35), rgba(16, 185, 129, 0.25)) !important;
  border-color: #10b981 !important;
  color: #6ee7b7 !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25) !important;
  font-weight: 700 !important;
  padding: 12px 20px !important;
  border-radius: var(--radius-md) !important;
}
.btn-spice-emerald:hover {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.65), rgba(16, 185, 129, 0.5)) !important;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.45) !important;
  transform: translateY(-2px);
}

.btn-spice-flame {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.35), rgba(245, 158, 11, 0.25)) !important;
  border-color: #ea580c !important;
  color: #fdba74 !important;
  box-shadow: 0 4px 15px rgba(234, 88, 12, 0.25) !important;
  font-weight: 700 !important;
  padding: 12px 20px !important;
  border-radius: var(--radius-md) !important;
}
.btn-spice-flame:hover {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.65), rgba(245, 158, 11, 0.5)) !important;
  box-shadow: 0 6px 22px rgba(234, 88, 12, 0.45) !important;
  transform: translateY(-2px);
}

.btn-spice-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.2)) !important;
  border-color: #f59e0b !important;
  color: #fde68a !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25) !important;
  font-weight: 700 !important;
  padding: 12px 20px !important;
  border-radius: var(--radius-md) !important;
}
.btn-spice-gold:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.6), rgba(217, 119, 6, 0.45)) !important;
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.45) !important;
  transform: translateY(-2px);
}

.btn-spice-chili {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.35), rgba(239, 68, 68, 0.2)) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25) !important;
  font-weight: 700 !important;
  padding: 12px 20px !important;
  border-radius: var(--radius-md) !important;
}
.btn-spice-chili:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.65), rgba(239, 68, 68, 0.45)) !important;
  box-shadow: 0 6px 22px rgba(239, 68, 68, 0.45) !important;
  transform: translateY(-2px);
}

/* Start Menu Screen */
#screen-menu {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  overflow-y: auto;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.05"><path d="M50 0 L100 50 L50 100 L0 50 Z" fill="%23ffffff"/></svg>') repeat;
}

.menu-hero {
  max-width: 680px;
  padding: 30px 40px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
}

.menu-hero h1 {
  font-size: 2.6rem;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fbbf24, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.menu-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 8px 20px var(--primary-glow);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Gameplay Screen HUD */
#screen-game {
  height: 100%;
}

.hud-top {
  display: grid;
  grid-template-columns: 240px 1fr 340px;
  gap: 14px;
  padding: 10px 24px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.hud-time-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 6px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 100;
  pointer-events: auto;
}

.btn-hud-tool {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.btn-hud-tool:hover {
  background: rgba(56, 189, 248, 0.35);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.btn-hud-tool:active {
  transform: scale(0.93);
}

.btn-tool-reset {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

.btn-tool-reset:hover {
  background: #ef4444;
  border-color: #f87171;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.hud-stat-box {
  background: rgba(30, 41, 59, 0.7);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fbbf24;
}

.meters-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.meter-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meter-title {
  width: 140px;
  font-size: 0.8rem;
  font-weight: 700;
}

.meter-bar {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.meter-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s ease, background 0.3s ease;
}

.meter-val {
  font-size: 0.85rem;
  font-weight: 700;
  width: 65px;
}

/* Orders Carousel */
.orders-banner {
  display: flex;
  gap: 14px;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.3);
  overflow-x: auto;
  border-bottom: 1px solid var(--border-color);
}

.order-ticket {
  min-width: 220px;
  background: var(--bg-panel);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.order-ticket.active-ticket {
  border-color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.ticket-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.recipe-emoji {
  font-size: 1.4rem;
}

.recipe-title {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-origin {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ticket-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.step-tag {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.order-timer-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.order-timer-fill {
  height: 100%;
}

/* Kitchen Arena Grid */
.kitchen-arena {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  padding: 20px 24px;
}

.station-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.station-card:hover {
  transform: translateY(-3px);
  border-color: #f59e0b;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.station-card:active {
  transform: scale(0.98);
}

.station-card.station-burning {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  animation: pulse-burn 0.8s infinite alternate;
}

.station-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.station-icon {
  font-size: 2rem;
}

.station-name {
  font-weight: 700;
  font-size: 1rem;
}

.station-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.station-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.station-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  transition: width 0.1s linear;
}

/* Character Controls Bar */
.bottom-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--border-color);
}

.character-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
}

.char-tab {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.char-tab.active {
  background: #ec4899;
  border-color: #f472b6;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.held-item-badge {
  display: none;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  border: 1px solid #f59e0b;
  padding: 6px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.btn-skill {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-skill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-content {
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* Ingredient Picker Grid */
.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.btn-ingredient {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ingredient:hover {
  background: #f59e0b;
  color: #000;
}

/* Cookbook Encyclopedia Cards */
.cookbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
}

.cookbook-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.card-emoji {
  font-size: 1.8rem;
}

.card-badge {
  font-size: 0.7rem;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.card-name {
  font-size: 1rem;
  font-weight: 700;
}

.card-origin {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-desc {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.card-novel-quote {
  font-size: 0.75rem;
  font-style: italic;
  color: #f472b6;
  background: rgba(244, 114, 182, 0.1);
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #ec4899;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.card-ingredients, .card-steps {
  font-size: 0.75rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.ing-tag {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Toast Notifications & Chaos Banner */
.notification-toast {
  position: fixed;
  bottom: 80px;
  right: 24px;
  background: #1e293b;
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 200;
}

.notification-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-warning { border-color: #ef4444; color: #fca5a5; }
.toast-skill { border-color: #8b5cf6; color: #c4b5fd; }
.toast-info { border-color: #3b82f6; color: #93c5fd; }

.chaos-banner {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 35px rgba(239, 68, 68, 0.5);
  text-align: center;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s ease;
}

.chaos-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.score-popup-float {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  padding: 14px 28px;
  font-size: 1.2rem;
  font-weight: 800;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: float-up-fade 1.5s forwards ease-out;
  z-index: 210;
  pointer-events: none;
}

/* ==========================================================================
   Auto-Demo & Interactive Guide Styles
   ========================================================================== */
.demo-control-overlay {
  display: none;
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 640px;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: 0 16px 45px rgba(245, 158, 11, 0.35);
  backdrop-filter: blur(16px);
  z-index: 250;
  flex-direction: column;
  gap: 10px;
  animation: float-down 0.3s ease-out;
}

.demo-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.demo-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: #f59e0b;
  color: #000;
  padding: 3px 10px;
  border-radius: 12px;
}

.demo-card-body {
  font-size: 0.92rem;
  color: #f8fafc;
  line-height: 1.5;
}

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

.btn-demo {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-demo:hover {
  background: #f59e0b;
  color: #000;
}

/* Glowing Highlight on Target Station */
.demo-highlight-target {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.8) !important;
  animation: demo-pulse 1s infinite alternate !important;
  transform: scale(1.03) !important;
  z-index: 50;
}

@keyframes demo-pulse {
  0% { box-shadow: 0 0 15px rgba(251, 191, 36, 0.5); }
  100% { box-shadow: 0 0 35px rgba(251, 191, 36, 1); }
}

@keyframes float-down {
  0% { opacity: 0; transform: translate(-50%, -20px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}

/* Pointer Hand Floating Icon */
.demo-pointer-hand {
  position: absolute;
  font-size: 2.2rem;
  z-index: 260;
  display: none;
  align-items: center;
  gap: 6px;
  animation: bounce-hand 0.8s infinite alternate ease-in-out;
  pointer-events: none;
}

.pointer-label {
  font-size: 0.8rem;
  background: #f59e0b;
  color: #000;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

@keyframes bounce-hand {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-10px) scale(1.1); }
}

/* ==========================================================================
   AI Bot Autoplay Controller Styles
   ========================================================================== */
.ai-bot-cursor {
  position: fixed;
  z-index: 300;
  display: none;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 6px 18px rgba(16, 185, 129, 0.7));
}

.ai-bot-cursor.is-dragging {
  cursor: grabbing;
  transform: scale(1.1);
  filter: drop-shadow(0 10px 28px rgba(245, 158, 11, 0.9));
}

.ai-bot-avatar {
  font-size: 2.7rem; /* 1.5x dari 1.8rem */
  animation: ai-hover 1.2s infinite alternate ease-in-out;
  cursor: grab;
}

.ai-bot-cursor.is-dragging .ai-bot-avatar {
  animation: none;
  cursor: grabbing;
}

.ai-bot-label {
  font-size: 0.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #000;
  padding: 3px 10px;
  border-radius: 6px;
  margin-top: -4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-drag-hint {
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

@keyframes ai-hover {
  0% { transform: translateY(0) scale(1) rotate(0deg); }
  100% { transform: translateY(-5px) scale(1.04) rotate(4deg); }
}

/* Integrated AI Control Bar (Non-obstructive layout) */
.ai-bot-control-bar {
  display: none;
  width: 100%;
  background: rgba(6, 78, 59, 0.95);
  border-bottom: 2px solid #10b981;
  color: #a7f3d0;
  padding: 8px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.25);
  z-index: 10;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  gap: 12px;
}

.ai-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-badge {
  font-size: 0.75rem;
  font-weight: 800;
  background: #10b981;
  color: #000;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.ai-action-text {
  color: #f0fdf4;
  font-size: 0.88rem;
}

.ai-bar-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-ai-ctrl {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 10px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-ai-ctrl:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.ai-mode-card {
  transition: all 0.2s ease;
}

.ai-mode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.btn-takeover {
  background: #f59e0b;
  color: #000;
  border-color: #fbbf24;
}

.speed-selector-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 6px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-speed-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-speed-pill:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-speed-pill.active {
  background: #10b981;
  color: #000;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.ai-click-pulse {
  animation: ai-pulse 0.4s ease-out !important;
}

@keyframes ai-pulse {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.4); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Engine
   Optimized for Phones (360px - 768px), Tablets, and Touchscreens
   ========================================================================== */

/* Universal Touch & Mobile Enhancements */
button, .char-tab, .station-card, .btn-hud-tool, .btn-speed-pill, .btn-ai-ctrl {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Tablets / Small Screens (<= 1024px) */
@media (max-width: 1024px) {
  .hud-top {
    grid-template-columns: 210px 1fr auto;
    gap: 10px;
    padding: 8px 16px;
  }
  .kitchen-arena {
    padding: 14px 16px;
    gap: 12px;
  }
  .menu-hero {
    max-width: 90%;
  }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  /* 1. Header Navigation */
  .game-header {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px;
    gap: 8px;
  }
  .brand-title {
    font-size: 1.05rem;
    justify-content: center;
    text-align: center;
  }
  .header-actions {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 6px;
    justify-content: flex-start;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .header-actions::-webkit-scrollbar {
    display: none;
  }
  .btn-header {
    padding: 6px 10px;
    font-size: 0.76rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 2. Cover / Splash Screen */
  #screen-cover {
    padding: 8px 8px 36px;
  }
  .cover-wrapper {
    border-radius: 14px;
    width: 100%;
  }
  .cover-image-container {
    max-height: 260px;
  }
  .cover-badge-floating {
    top: 8px;
    left: 8px;
    font-size: 0.65rem;
    padding: 3px 8px;
  }
  .cover-content-box {
    padding: 14px 10px 22px;
  }
  .cover-title-text {
    font-size: 1.35rem;
    line-height: 1.25;
  }
  .cover-sub-text {
    font-size: 0.8rem;
    margin-bottom: 14px;
  }
  .btn-start-huge {
    font-size: 0.95rem;
    padding: 12px 14px;
    width: 100%;
  }
  .cover-secondary-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .cover-secondary-btns .btn-secondary {
    padding: 10px 6px;
    font-size: 0.78rem;
    text-align: center;
  }

  /* 3. Start Menu Screen */
  #screen-menu {
    padding: 12px 8px 36px;
  }
  .menu-hero {
    padding: 16px 10px;
    width: 100%;
  }
  .menu-hero h1 {
    font-size: 1.35rem;
  }
  .menu-hero p {
    font-size: 0.82rem;
    margin-bottom: 14px;
  }
  .menu-hero div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
  .menu-buttons {
    width: 100%;
  }
  .menu-buttons button {
    width: 100%;
    padding: 11px 12px;
    font-size: 0.84rem;
    line-height: 1.3;
  }

  /* 4. Campaign Level Select */
  #screen-campaign > div:first-child {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    text-align: center;
  }
  #screen-campaign h2 {
    font-size: 1.1rem;
  }
  .campaign-grid {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
    gap: 12px !important;
    max-height: none !important;
  }
  .campaign-level-card {
    padding: 14px;
  }

  /* 5. Gameplay Screen HUD */
  .hud-top {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    gap: 8px;
  }
  .hud-stats-group {
    display: flex;
    width: 100%;
    gap: 8px;
    justify-content: space-between;
  }
  .hud-stat-box {
    padding: 4px 10px;
    flex: 1;
    text-align: center;
  }
  .stat-label {
    font-size: 0.65rem;
  }
  .stat-value {
    font-size: 1.15rem;
  }
  .hud-tools-group {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }
  .hud-time-controls {
    padding: 2px 4px;
    gap: 4px;
  }
  .btn-hud-tool {
    padding: 5px 8px;
    font-size: 0.74rem;
  }
  .meters-section {
    width: 100%;
    gap: 4px;
  }
  .meter-wrapper {
    gap: 6px;
  }
  .meter-title {
    width: 100px;
    font-size: 0.68rem;
  }
  .meter-bar {
    height: 10px;
  }
  .meter-val {
    font-size: 0.75rem;
    width: 50px;
  }

  /* 6. Active Orders Carousel */
  .orders-banner {
    padding: 8px 10px;
    gap: 8px;
  }
  .order-ticket {
    min-width: 155px;
    max-width: 180px;
    padding: 8px;
  }
  .recipe-emoji {
    font-size: 1.2rem;
  }
  .recipe-title {
    font-size: 0.8rem;
  }
  .ticket-origin {
    font-size: 0.68rem;
  }
  .step-tag {
    font-size: 0.62rem;
    padding: 2px 4px;
  }

  /* 7. Tutorial Hint Bar */
  #tutorial-hint-bar {
    padding: 6px 10px;
    font-size: 0.78rem;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    text-align: center;
  }
  #btn-quick-guide {
    width: 100%;
    text-align: center;
  }

  /* 8. Core Gameplay: Kitchen Arena Grid (2 Columns on Mobile) */
  .kitchen-arena {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 8px;
    padding: 10px 10px 24px;
    overflow-y: auto;
  }
  .station-card {
    padding: 10px 8px;
    min-height: 115px;
  }
  .station-head {
    gap: 6px;
  }
  .station-icon {
    font-size: 1.45rem;
  }
  .station-name {
    font-size: 0.8rem;
  }
  .station-status {
    font-size: 0.7rem;
  }
  .station-visual-stage {
    height: 60px;
    margin: 4px 0;
  }
  .stage-idle-icon {
    font-size: 1.3rem;
  }
  .cooking-action-badge {
    font-size: 0.6rem;
    padding: 1px 5px;
    top: 2px;
  }

  /* 9. Bottom Control Bar */
  .bottom-control-bar {
    flex-direction: column;
    gap: 8px;
    padding: 8px 10px 14px;
  }
  .character-switcher {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .character-switcher span:first-child {
    display: none;
  }
  .char-tab {
    padding: 6px 2px;
    font-size: 0.7rem;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }
  .held-item-badge {
    width: 100%;
    justify-content: center;
    font-size: 0.8rem;
    padding: 5px 10px;
  }
  .btn-skill {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.88rem;
    text-align: center;
  }

  /* 10. AI Bot Controls & Draggable Avatar */
  #ai-bot-control-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 6px 10px;
  }
  .ai-bar-left {
    white-space: normal;
    font-size: 0.78rem;
    gap: 6px;
  }
  .ai-bar-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
  }
  .btn-ai-ctrl {
    padding: 4px 7px;
    font-size: 0.72rem;
  }
  .speed-selector-group {
    padding: 2px 4px;
    gap: 2px;
  }
  .btn-speed-pill {
    padding: 2px 5px;
    font-size: 0.68rem;
  }
  .ai-bot-avatar {
    font-size: 2.1rem;
  }
  .ai-bot-label {
    font-size: 0.7rem;
    padding: 2px 6px;
  }

  /* 11. Modal Dialogs */
  .modal-overlay {
    padding: 10px;
  }
  .modal-content {
    width: 100%;
    max-width: 100%;
    padding: 16px 12px;
    max-height: 88vh;
    border-radius: 12px;
  }
  .modal-content h2 {
    font-size: 1.2rem;
  }
  .ingredient-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .btn-ingredient {
    padding: 8px 6px;
    font-size: 0.8rem;
  }
  .cookbook-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 55vh;
  }
  .ai-mode-card {
    padding: 10px 12px;
  }
  #ai-recipe-select {
    font-size: 0.8rem;
    padding: 6px 8px;
  }

  /* 12. Auto Demo Overlay */
  .demo-control-overlay {
    top: 55px;
    width: 95%;
    padding: 12px 14px;
    max-height: 80vh;
    overflow-y: auto;
  }
  .demo-card-body {
    font-size: 0.84rem;
  }
  .demo-card-actions {
    flex-wrap: wrap;
    gap: 4px;
  }
  .btn-demo {
    padding: 6px 8px;
    font-size: 0.75rem;
    flex: 1;
  }
}

/* Extra Small Mobile (<= 380px) */
@media (max-width: 380px) {
  .cover-title-text {
    font-size: 1.2rem;
  }
  .char-tab {
    font-size: 0.64rem;
    padding: 5px 2px;
  }
  .station-name {
    font-size: 0.75rem;
  }
  .btn-hud-tool {
    padding: 4px 6px;
    font-size: 0.68rem;
  }
}

/* Orientation Hint Banner for Portrait Mobile */
.orientation-hint-banner {
  display: none;
}

@media (max-width: 768px) and (orientation: portrait) {
  .orientation-hint-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(245, 158, 11, 0.16);
    border-bottom: 1px solid rgba(245, 158, 11, 0.4);
    color: #fde68a;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 6px 12px;
    text-align: center;
    z-index: 20;
    animation: fadeIn 0.4s ease;
  }
}

/* Landscape Mode for Smartphones & Tablets (Height <= 550px) */
@media (max-height: 550px) and (orientation: landscape) {
  #app-container {
    overflow-y: auto;
  }
  .game-header {
    padding: 4px 14px;
    flex-direction: row !important;
  }
  .brand-title {
    font-size: 0.95rem;
  }
  .btn-header {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
  .cover-image-container {
    max-height: 180px;
  }
  .hud-top {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 4px 14px !important;
    gap: 8px !important;
  }
  .hud-stats-group {
    width: auto !important;
    gap: 6px !important;
  }
  .hud-stat-box {
    padding: 2px 8px !important;
  }
  .stat-label {
    font-size: 0.58rem !important;
  }
  .stat-value {
    font-size: 0.98rem !important;
  }
  .meters-section {
    width: 240px !important;
    gap: 2px !important;
  }
  .meter-title {
    width: 85px !important;
    font-size: 0.62rem !important;
  }
  .meter-bar {
    height: 7px !important;
  }
  .meter-val {
    font-size: 0.65rem !important;
    width: 45px !important;
  }
  .hud-tools-group {
    width: auto !important;
    gap: 4px !important;
  }
  .hud-time-controls {
    padding: 2px 4px !important;
    gap: 3px !important;
  }
  .btn-hud-tool {
    padding: 4px 6px !important;
    font-size: 0.7rem !important;
  }
  .orders-banner {
    padding: 4px 12px !important;
  }
  .order-ticket {
    min-width: 140px !important;
    max-width: 160px !important;
    padding: 4px 8px !important;
    gap: 2px !important;
  }
  .kitchen-arena {
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(2, 1fr) !important;
    gap: 6px !important;
    padding: 4px 12px 12px !important;
  }
  .station-card {
    min-height: 80px !important;
    padding: 4px 6px !important;
  }
  .station-icon {
    font-size: 1.15rem !important;
  }
  .station-name {
    font-size: 0.72rem !important;
  }
  .station-status {
    font-size: 0.62rem !important;
  }
  .station-visual-stage {
    height: 38px !important;
    margin: 2px 0 !important;
  }
  .stage-idle-icon {
    font-size: 1.05rem !important;
  }
  .cooking-action-badge {
    font-size: 0.55rem !important;
    padding: 1px 4px !important;
  }
  .bottom-control-bar {
    flex-direction: row !important;
    padding: 4px 14px !important;
    gap: 8px !important;
  }
  .character-switcher {
    width: auto !important;
    display: flex !important;
  }
  .char-tab {
    padding: 4px 8px !important;
    font-size: 0.68rem !important;
  }
  .btn-skill {
    width: auto !important;
    padding: 6px 14px !important;
    font-size: 0.78rem !important;
  }
}


