/* style.css - Donghae Smart Farm Simulation Premium Cyber-Bio Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Noto+Sans+KR:wght@400;500;600;700;900&family=Gaegu:wght@700&display=swap');

:root {
  --bg-dark: #06120d;
  --bg-darker: #030a07;
  --panel-bg: rgba(12, 28, 20, 0.88);
  --panel-border: rgba(16, 185, 129, 0.35);
  --panel-glow: rgba(16, 185, 129, 0.2);
  --neon-green: #10b981;
  --neon-emerald: #059669;
  --neon-cyan: #06b6d4;
  --neon-yellow: #facc15;
  --neon-gold: #f59e0b;
  --neon-pink: #f43f5e;
  --neon-purple: #a855f7;
  --gold-grad: linear-gradient(135deg, #fef08a, #f59e0b, #b45309);
  --green-grad: linear-gradient(135deg, #6ee7b7, #10b981, #047857);
  --cyan-grad: linear-gradient(135deg, #67e8f9, #06b6d4, #0e7490);
  --text-main: #f0fdf4;
  --text-muted: #86efac;
  --text-sub: #94a3b8;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 5%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(244, 63, 94, 0.08) 0%, transparent 40%);
  color: var(--text-main);
  font-family: 'Outfit', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 30px;
}

/* ==========================================================================
   Header & Neon Signboard
   ========================================================================== */
.game-header {
  width: 100%;
  max-width: 1240px;
  padding: 16px 20px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.neon-title-banner {
  text-align: center;
  position: relative;
  padding: 8px 24px;
}

.header-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--neon-cyan);
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 6px;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.neon-title-banner h1 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff, #6ee7b7, #10b981, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.neon-subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #6ee7b7;
  opacity: 0.9;
  text-transform: uppercase;
}

/* Status Bar Container */
.status-bar-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 10px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 15px var(--panel-glow);
}

.stat-pills-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(6, 20, 14, 0.7);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.stat-pill:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.stat-icon {
  font-size: 1.4rem;
}

.stat-label {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
}

.stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.stat-value.gold {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.stat-value.green {
  color: #34d399;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
}

.stat-value.highlight {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.quick-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-tool {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--neon-green);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-tool:hover {
  background: var(--neon-green);
  color: #042f1f;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* Microbit Special Button */
.microbit-btn {
  background: rgba(6, 182, 212, 0.18);
  border-color: var(--neon-cyan);
  color: #67e8f9;
}

.microbit-btn:hover {
  background: var(--neon-cyan);
  color: #042b33;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

.microbit-btn.connected {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #6ee7b7;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  animation: pulseConnected 2s infinite;
}

@keyframes pulseConnected {
  0%, 100% { border-color: #34d399; }
  50% { border-color: #67e8f9; }
}

/* Market Ticker Banner */
.market-ticker-banner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 0.85rem;
}

.ticker-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-badge {
  background: #10b981;
  color: #032b1d;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.ticker-text {
  color: #e2e8f0;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.ticker-timer {
  color: var(--neon-yellow);
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

/* Greenhouse Tabs */
.machine-tabs-wrapper {
  width: 100%;
  display: flex;
  gap: 10px;
}

.machine-tab-btn {
  flex: 1;
  background: rgba(13, 33, 23, 0.8);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.machine-tab-btn:hover:not(.locked) {
  border-color: var(--neon-green);
  color: #fff;
  background: rgba(16, 185, 129, 0.15);
}

.machine-tab-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(6, 182, 212, 0.25));
  border: 1.5px solid var(--neon-green);
  color: #fff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.machine-tab-btn.locked {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* ==========================================================================
   Main Game Arena Layout
   ========================================================================== */
.game-main-arena {
  width: 100%;
  max-width: 1240px;
  padding: 8px 20px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

/* Cabinet Harvester Section */
.cabinet-wrapper {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(16, 185, 129, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cabinet-top-marquee {
  background: linear-gradient(90deg, #0a1f15, #0f2e21, #081a12);
  border-bottom: 1px solid var(--panel-border);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.marquee-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.marquee-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.marquee-cost {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--neon-cyan);
}

.sensor-hud-bar {
  display: flex;
  gap: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: #cbd5e1;
  flex-wrap: wrap;
}

.sensor-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sensor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 6px var(--neon-green);
  animation: blinkDot 1.5s infinite;
}

.sensor-dot.blue {
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}

.sensor-dot.yellow {
  background: var(--neon-yellow);
  box-shadow: 0 0 6px var(--neon-yellow);
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Canvas Viewport */
.canvas-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #020805;
  padding: 10px;
  position: relative;
}

#clawCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: #040d08;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(16, 185, 129, 0.15);
}

/* Control Deck */
.arcade-control-deck {
  background: linear-gradient(180deg, #0d261b, #07150e);
  border-top: 1px solid var(--panel-border);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.actions-group {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 12px;
}

.btn-big-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.btn-big-action .btn-sub {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.85;
}

.btn-insert-coin {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border-color: rgba(52, 211, 153, 0.6);
}

.btn-insert-coin:hover {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
}

.btn-drop-claw {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.6);
  font-size: 1.1rem;
}

.btn-drop-claw:hover {
  box-shadow: 0 0 22px rgba(6, 182, 212, 0.6);
  transform: translateY(-2px);
}

.btn-magnet-skill {
  background: linear-gradient(135deg, #9333ea, #a855f7);
  color: #ffffff;
  border-color: rgba(192, 132, 252, 0.6);
}

.btn-magnet-skill:hover {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
  transform: translateY(-2px);
}

.btn-big-action:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Virtual Joystick Pad */
.joystick-pad {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 40px);
  gap: 4px;
  justify-content: center;
  margin: 2px 0;
}

.joy-btn {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #fff;
  font-size: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.joy-btn:hover {
  background: var(--neon-green);
  color: #032b1d;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.joy-btn:active {
  transform: scale(0.92);
}

.joy-btn.up { grid-column: 2; grid-row: 1; }
.joy-btn.left { grid-column: 1; grid-row: 2; }
.joy-btn.center {
  grid-column: 2; grid-row: 2;
  background: rgba(0, 0, 0, 0.5);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--neon-green);
  cursor: default;
}
.joy-btn.right { grid-column: 3; grid-row: 2; }
.joy-btn.down { grid-column: 2; grid-row: 3; }

/* Keyboard & Micro:bit Hints */
.keyboard-hints {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.kbd-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  color: #fff;
  font-family: monospace;
}

/* ==========================================================================
   Sidebar Hub
   ========================================================================== */
.sidebar-hub {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.character-card {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.character-title-holder {
  display: flex;
  justify-content: center;
}

.active-title-pill {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(251, 191, 36, 0.5);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fef08a;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.active-title-pill:hover {
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

.speech-bubble-wrapper {
  position: relative;
}

.speech-bubble {
  background: rgba(18, 42, 30, 0.95);
  border: 1.5px solid var(--neon-green);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #f0fdf4;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  min-height: 54px;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 30px;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: var(--neon-green) transparent;
  display: block;
  width: 0;
}

.character-art-frame {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  background: #020805;
  position: relative;
}

.character-art-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.character-art-frame:hover img {
  transform: scale(1.03);
}

.char-role-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(3, 15, 9, 0.85);
  backdrop-filter: blur(4px);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  color: var(--neon-green);
  border-top: 1px solid rgba(16, 185, 129, 0.3);
}

/* Realtime Produce Basket Canvas */
.transparent-bag-box {
  background: rgba(3, 15, 9, 0.75);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bag-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  padding: 0 4px;
}

.bag-box-title {
  font-weight: 700;
  color: #6ee7b7;
}

.bag-box-count {
  font-size: 0.7rem;
  color: #94a3b8;
}

#bagCanvas {
  width: 100%;
  height: auto;
  display: block;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(16, 185, 129, 0.25);
  cursor: pointer;
}

/* Sidebar Actions */
.sidebar-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-sidebar-action {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #f0fdf4;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.btn-sidebar-action:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--neon-green);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
  transform: translateX(2px);
}

.btn-sidebar-action.real-estate-btn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.btn-sidebar-action.real-estate-btn:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--neon-gold);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

.btn-sidebar-action.titles-btn {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.35);
}

.btn-sidebar-action.titles-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: var(--neon-purple);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
}

.btn-sidebar-action.sell-all {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #ffffff;
  font-weight: 900;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-sidebar-action.sell-all:hover {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  transform: translateY(-1px);
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-window {
  background: #091a13;
  border: 1.5px solid var(--neon-green);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(16, 185, 129, 0.3);
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-window.microbit-modal-window {
  max-width: 740px;
  border-color: var(--neon-cyan);
}

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

.modal-header {
  padding: 16px 20px;
  background: linear-gradient(90deg, #0f2e21, #0a1f16);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--neon-pink);
}

.modal-header-summary {
  background: rgba(3, 15, 9, 0.7);
  padding: 12px 20px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

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

/* Micro:bit Guide Modal Styles */
.microbit-guide-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.microbit-feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(6, 24, 16, 0.7);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.code-tabs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #06170f;
  padding: 8px 14px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-bottom: none;
}

.code-tab {
  font-weight: 800;
  font-size: 0.82rem;
  color: #67e8f9;
}

.btn-copy-code {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-code:hover {
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

.link-makecode {
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.link-makecode:hover {
  text-decoration: underline;
}

.microbit-code-display {
  background: #030a07;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 14px;
  color: #a7f3d0;
  font-family: 'Consolas', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
  max-height: 220px;
}

.microbit-steps-guide {
  background: rgba(15, 38, 27, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.82rem;
}

.microbit-steps-guide h4 {
  color: #fbbf24;
  margin-bottom: 6px;
}

.microbit-steps-guide ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #e2e8f0;
}

/* Produce Item Cards in Storage */
.produce-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 38, 27, 0.8);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.produce-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.produce-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.produce-emoji-icon {
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.4);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.produce-name-group h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.produce-subdesc {
  font-size: 0.75rem;
  color: #94a3b8;
}

.produce-price-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.current-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fbbf24;
}

.multiplier-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.multiplier-tag.up {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.multiplier-tag.down {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.multiplier-tag.steady {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.btn-sell-single {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-sell-single:hover {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

/* Facility / Real Estate Cards */
.facility-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 38, 27, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  gap: 14px;
}

.facility-icon {
  font-size: 2.2rem;
}

.facility-details h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.facility-income {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--neon-green);
}

.facility-level-badge {
  font-size: 0.72rem;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.btn-upgrade-facility {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.btn-upgrade-facility:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

/* Upgrade Cards */
.upgrade-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 38, 27, 0.8);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  gap: 14px;
}

.upgrade-item-card h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.upgrade-desc {
  font-size: 0.78rem;
  color: #94a3b8;
}

.btn-buy-upgrade {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.btn-buy-upgrade:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Toast Notification */
.game-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(9, 26, 19, 0.95);
  border: 1.5px solid var(--neon-green);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.4);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .game-main-arena {
    grid-template-columns: 1fr;
  }
  .sidebar-hub {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
  }
  .microbit-feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .game-header {
    padding: 10px 12px;
  }
  .neon-title-banner h1 {
    font-size: 1.6rem;
  }
  .status-bar-container {
    flex-direction: column;
    gap: 10px;
  }
  .stat-pills-group {
    justify-content: center;
  }
  .machine-tabs-wrapper {
    flex-direction: column;
  }
  .actions-group {
    grid-template-columns: 1fr;
  }
}
