/* 赛博宝宝样式（2026-10-21 从 index.html 的 <style> 原样搬出）：三围条、操作按钮、导航箭头、面板外框、喂饭、灶台、建造。
   index.html 里按 base → yard → controls → panels 的顺序 <link>，层叠顺序跟原来一样，别调换。
   ⚠️ 放在 frontend/ 根目录、别挪进子目录：按钮背景走 --btn-bg: url(./assets/…) 这种 CSS 变量，url 是按引用它的样式表的位置解析的。 */
/* 三围条 */
.stats-bar {
  padding: 8px 16px; display: flex; gap: 10px; justify-content: center;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.03);
}
.stat {
  flex: 1; text-align: center;
}
.stat-label { font-size: 11px; color: #A08D7D; margin-bottom: 3px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.stat-track {
  height: 10px; background: #f0e6da; border-radius: 5px; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}
.stat-fill {
  height: 100%; border-radius: 5px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  position: relative;
}
.stat-fill::after {
  content: ''; position: absolute; inset: 0; border-radius: 5px;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 60%);
}
.stat-fill.hunger { background: linear-gradient(90deg, #FFCC6A, #FFD98A); }
.stat-fill.happy { background: linear-gradient(90deg, #FFA0B8, #FFB6C8); }
.stat-fill.clean { background: linear-gradient(90deg, #A0DDB8, #BFE8D0); }
.stat-val { font-size: 10px; color: #A08D7D; margin-top: 2px; }

/* 操作按钮 */
.actions {
  display: flex; gap: 4px; justify-content: center;
  padding: 4px 16px;
  background: rgba(253,246,238,0.9); backdrop-filter: blur(10px);
}
.action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 0; border: none; border-radius: 0;
  background: transparent; cursor: pointer; transition: transform 0.15s;
  flex: 1; min-width: 0; position: relative;
  aspect-ratio: 1 / 1;
  background-image: var(--btn-bg); background-size: 100% 100%;
  background-repeat: no-repeat; background-position: center;
  margin: 0;
}
.action-btn:hover { transform: scale(1.08); }
.action-btn:active { transform: scale(0.93); }
.action-btn:disabled { opacity: 0.4; pointer-events: none; }
.action-icon { font-size: 22px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1)); }
.action-label { font-size: 9px; color: #6E5A4B; white-space: nowrap; font-weight: 600; }

/* 房间导航箭头 */
.room-nav {
  position: absolute; top: 50%; z-index: 25; transform: translateY(-50%);
  width: 56px; height: 100px; border: none; border-radius: 0;
  background-image: url('./assets/UI/verticle_button.png');
  background-size: 100% 100%; background-position: center;
  background-repeat: no-repeat; background-color: transparent;
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  transition: transform 0.2s;
}
.room-nav:hover { transform: translateY(-50%) scale(1.08); }
.room-nav:active { transform: translateY(-50%) scale(0.93); }
.room-nav-left { left: 4px; }
.room-nav-right { right: 4px; }
.room-nav-icon { font-size: 18px; color: #6E5A4B; }
.room-nav-text { font-size: 10px; color: #6E5A4B; font-weight: 600; }

/* 面板（全屏翻页） */
.panel {
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(180deg, #FDF6EE 0%, #f5ead8 50%, #EEDFCC 100%);
}
.panel-content {
  width: 100%; max-width: 420px; margin: 0 auto;
  height: 100%; overflow-y: auto;
  padding: 20px 16px 32px; animation: page-slide-in 0.3s ease;
}
.panel.slide-left .panel-content { animation: page-slide-left 0.3s ease; }
.panel.slide-right .panel-content { animation: page-slide-right 0.3s ease; }
@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes page-slide-left {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes page-slide-right {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes page-slide-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
/* 弹窗式面板（聊天/探险等） */
.panel-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end;
  background: rgba(0,0,0,0.3);
}
.panel-overlay .panel-content {
  background: #FDF6EE; border-radius: 24px 24px 0 0;
  max-height: 75vh; height: auto;
  animation: slide-up 0.3s ease;
  border-top: 2px solid #EEDFCC;
}
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.panel-title { font-size: 18px; font-weight: bold; color: #6E5A4B; }
.panel-close {
  width: 32px; height: 32px; border-radius: 16px; border: 1px solid #EEDFCC;
  background: #FFFDF9; font-size: 18px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: #A08D7D;
}


/* 喂饭盘子（2026-10-15）：两张同款卡——上面一瓶奶（买的、管饱），下面加餐（自家菜、只给 buff）。
   加餐用小签子不用图：后期背包几十道菜（小玉）。按钮一律右边的橘色小药丸，说明一律同一种浅褐小字 */
.feed-panel { padding-bottom: 24px; }
.feed-card {
  background: #FFFDF9; border: 1.5px solid #EEDFCC; border-radius: 18px;
  padding: 14px; margin-bottom: 12px;
}
.feed-milk { display: flex; align-items: center; gap: 12px; }
.feed-milk-icon { width: 44px; height: 44px; object-fit: contain; font-size: 32px; line-height: 44px; text-align: center; flex-shrink: 0; }
.feed-milk-text { flex: 1; min-width: 0; }
.feed-name { font-size: 15px; font-weight: bold; color: #6E5A4B; }
.feed-muted { font-size: 12px; color: #A08D7D; margin-top: 2px; line-height: 1.5; }
.feed-pill {
  flex-shrink: 0; min-width: 64px; padding: 8px 16px; border-radius: 999px; border: none;
  background: #E8A87C; color: white; font: inherit; font-size: 14px; font-weight: bold;
  cursor: pointer; box-shadow: 0 2px 0 #CF8E63; transition: transform 0.12s;
}
.feed-pill:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 0 #CF8E63; }
.feed-pill:disabled { background: #E6D8CB; box-shadow: none; color: #FFFDF9; cursor: default; }
.feed-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.feed-wait {
  flex-shrink: 0; padding: 6px 12px; border-radius: 14px; background: #FCEBDD;
  color: #C27C55; font-size: 12px; text-align: center; line-height: 1.4;
}
.feed-chips { max-height: 168px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.feed-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px; font: inherit; font-size: 13px;
  border: 1.5px solid #EEDFCC; background: #FFF8EF; color: #6E5A4B; cursor: pointer; transition: all 0.15s;
}
.feed-chip.on { border-color: #D79B6D; background: #FDEBDC; }
.feed-chip.crave { border-color: #F0B9A8; }
.feed-heart { color: #E58C7A; font-size: 11px; margin-right: -2px; }
.feed-crave-bubble {
  position: relative; display: inline-block; padding: 6px 12px; margin-left: 6px;
  background: #FFF0EA; color: #B9644F; border-radius: 14px; font-size: 13px; font-weight: bold;
}
.feed-crave-bubble::before {
  content: ''; position: absolute; left: -5px; top: 50%; margin-top: -5px;
  border: 5px solid transparent; border-right-color: #FFF0EA; border-left: 0;
}
.feed-crave-tag {
  margin-left: 8px; font-size: 11px; font-weight: normal; color: #B9644F;
  background: #FFF0EA; border-radius: 999px; padding: 1px 8px;
}
.feed-detail, .feed-hint { border-top: 1px dashed #EEDFCC; margin-top: 12px; padding-top: 10px; }
.feed-detail { display: flex; align-items: center; gap: 12px; }
.feed-detail-text { flex: 1; min-width: 0; }
.feed-detail-buff { font-size: 13px; color: #6E5A4B; font-weight: bold; }
.feed-hint { font-size: 12px; color: #B5A190; text-align: center; }

/* 灶台做饭 */
.stove-area { position: relative; text-align: center; margin-bottom: 8px; }
.stove-img { width: 90%; max-width: 320px; }
.pan-img {
  /* 2026-08-03 换 kitchen_stove.png：炉眼在图的中下部，原来的 top:5% 会让锅浮在置物架上。
     这组数值是把锅和灶台按前端的真实缩放合成出来一版版比出来的，别凭感觉改。 */
  position: absolute; top: 33%; left: 50%; transform: translateX(-50%);
  width: 30%; max-width: 108px; transition: transform 0.3s;
}
.pan-img.pan-cooking { animation: pan-shake 0.35s ease-in-out infinite alternate; }
@keyframes pan-shake {
  from { transform: translateX(-50%) rotate(-6deg); }
  to { transform: translateX(-50%) rotate(6deg); }
}
.cook-slots {
  display: flex; gap: 8px; justify-content: center; margin: 8px 0;
}
.cook-slot {
  width: 60px; height: 60px; border: 2px dashed #D9C8B4; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(255,253,249,0.8); cursor: pointer; transition: all 0.15s;
}
.cook-slot.filled { border-style: solid; border-color: #D79B6D; background: #FFFDF9; }
.cook-slot.filled:hover { transform: scale(0.95); }
.inv-slot.used-up { opacity: 0.3; pointer-events: none; }
.cook-hint { text-align: center; font-size: 11px; color: #C4A98A; margin: 6px 0 4px; }
/* 建造工作台 */
.workshop-area { position: relative; text-align: center; margin-bottom: 8px; }
.workshop-img { width: 80%; max-width: 280px; }
.hammer-img {
  position: absolute; top: 10%; right: 10%; width: 22%; max-width: 72px;
  transition: transform 0.3s; transform-origin: bottom center;
}
.hammer-img.hammer-building { animation: hammer-hit 0.4s ease-in-out infinite; }
@keyframes hammer-hit {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-30deg); }
}

/* 建造列表 */
.build-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.build-card {
  background: #FFFDF9; border-radius: 14px; padding: 8px 4px; text-align: center;
  cursor: pointer; transition: all 0.15s; border: 1.5px solid #EEDFCC;
  box-shadow: 0 1px 6px rgba(110,90,75,0.06);
}
.build-card:hover { transform: scale(1.02); border-color: #D79B6D; box-shadow: 0 4px 12px rgba(215,155,109,0.15); }
.build-card.owned { opacity: 0.5; border-color: #a5d6a7; }
.build-card.disabled { opacity: 0.3; pointer-events: none; }
.build-name { font-size: 11px; font-weight: bold; color: #6E5A4B; margin-top: 3px; }
.build-materials { font-size: 9px; color: #A08D7D; }

