/* 芸媖方块大作战 - 暖色调 UI（奶油底 · 琥珀点缀） */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fdf6ec;
  --panel: #fffdf8;
  --border: #f0dfc8;
  --text: #40311f;
  --muted: #96826b;
  --accent: #e07b39;
  --accent-dark: #c9632a;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: linear-gradient(160deg, #fdf6ec 0%, #faecd9 55%, #f7e3cf 100%);
  color: var(--text);
  min-height: 100vh;
}

header {
  display: flex; align-items: baseline; gap: 14px;
  padding: 14px 28px;
  background: linear-gradient(90deg, #fff8ec, #fdeed9);
  border-bottom: 2px solid #f3ddba;
  box-shadow: 0 2px 10px rgba(160, 110, 50, .08);
}
header h1 { font-size: 22px; background: linear-gradient(90deg, #e0653a, #d9912f); -webkit-background-clip: text; background-clip: text; color: transparent; }
header .sub { color: var(--muted); font-size: 13px; }
header .online { margin-left: auto; font-size: 13px; color: #cf6a2d; font-weight: bold; }

main {
  display: flex; gap: 20px;
  padding: 20px;
  justify-content: center;
  align-items: flex-start;
}
section h2 { font-size: 15px; margin-bottom: 10px; color: var(--text); }
section h2 small { color: var(--muted); font-weight: normal; font-size: 11px; margin-left: 6px; }

/* 左侧 */
.left { display: flex; flex-direction: column; gap: 10px; }
.me-info { display: flex; justify-content: space-between; align-items: center; }
.my-name { font-size: 16px; font-weight: bold; color: #c05a1f; }
.stats { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.stats b { color: var(--text); font-size: 14px; }
.board-wrap { position: relative; width: 300px; }
#board {
  display: block; width: 300px; height: 600px;
  background: #2a2013;
  border-radius: 12px;
  border: 3px solid #e8c893;
  box-shadow: 0 8px 28px rgba(150, 95, 30, .28);
}
.banner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  background: rgba(42, 28, 12, .74);
  color: #fff6e8; border-radius: 10px;
  font-size: 16px; padding: 20px;
  backdrop-filter: blur(2px);
}
.banner .big { font-size: 26px; font-weight: bold; color: #ffcf5c; }
.count {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 110px; font-weight: 900; color: #ffcf5c;
  text-shadow: 0 4px 24px rgba(0,0,0,.6);
  pointer-events: none;
}
.next { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
#nextCv { background: #2a2013; border: 2px solid #e8c893; border-radius: 8px; width: 72px; height: 72px; }

/* 道具槽 */
.item-box {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, #fff3d6, #ffe4d1);
  border: 1px solid #eec27e;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  animation: glow 1.6s ease-in-out infinite;
}
.item-box #itemIcon { font-size: 24px; }
.item-box .item-hint { color: #96690f; }
.item-box .item-hint b { color: #d43f2f; font-size: 15px; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 4px rgba(235, 160, 50, .4); }
  50% { box-shadow: 0 0 16px rgba(235, 160, 50, .9); }
}
.debuff-bar {
  font-size: 12px; color: #c0392b; font-weight: bold;
  padding: 4px 2px;
}

/* 中间对手区 */
.mid { width: 420px; }
#minis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.mini {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(150, 95, 30, .08);
}
.mini .nm { font-size: 12px; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini.dead { opacity: .45; }
.mini.dead .nm::after { content: " 💀"; }
.mini canvas { width: 100%; border-radius: 6px; background: #2a2013; display: block; }
.mini .atk { color: #d4492f; font-size: 11px; height: 14px; }
.queue-box {
  margin-top: 16px;
  background: var(--panel);
  border: 1px dashed #e3c495;
  border-radius: 10px;
  padding: 12px 16px;
}
.queue-box h3 { font-size: 14px; margin-bottom: 8px; }
.queue-box ul { list-style: none; font-size: 13px; color: var(--muted); }
.queue-box li { padding: 3px 0; }
.queue-box li b { color: #cf6a2d; }

/* 右侧聊天 */
.right { width: 300px; display: flex; flex-direction: column; }
#chatList {
  height: 560px; overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px;
}
#chatList::-webkit-scrollbar { width: 6px; }
#chatList::-webkit-scrollbar-thumb { background: #e5cfae; border-radius: 3px; }
.cmsg { line-height: 1.45; word-break: break-all; }
.cmsg .who { color: #c05a1f; font-weight: bold; }
.cmsg.sys { color: #b09a80; font-size: 12px; }
.chat-input { display: flex; gap: 8px; margin-top: 10px; }
.chat-input input {
  flex: 1; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; outline: none;
  background: #fffdf8; color: var(--text);
}
.chat-input input:focus { border-color: var(--accent); }
.chat-input button {
  padding: 9px 18px;
  background: linear-gradient(90deg, #e07b39, #d9662f); color: #fff;
  border: none; border-radius: 8px;
  font-size: 13px; cursor: pointer;
}
.chat-input button:hover { filter: brightness(1.08); }

/* 遮罩 */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(80, 48, 16, .45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: linear-gradient(170deg, #fffdf8, #fdf3e2);
  border: 1px solid #f0dcbb;
  border-radius: 18px;
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(120, 70, 20, .35);
  width: 380px;
}
.modal .logo { font-size: 52px; }
.modal h1 {
  font-size: 24px; margin: 8px 0 4px;
  background: linear-gradient(90deg, #e0653a, #d9912f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.modal .tagline { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.modal input {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--border); border-radius: 10px;
  font-size: 16px; text-align: center; outline: none;
  margin-bottom: 14px;
  background: #fffdf8; color: var(--text);
}
.modal input:focus { border-color: var(--accent); }
.mode-btns { display: flex; gap: 10px; }
.mode-btns button {
  flex: 1; padding: 12px;
  color: #fff; border: none; border-radius: 10px;
  font-size: 15px; font-weight: bold; cursor: pointer;
}
.mode-btns .btn-play { background: linear-gradient(90deg, #e0532f, #e8912c); }
.mode-btns .btn-play:hover { filter: brightness(1.08); }
.mode-btns .btn-watch { background: linear-gradient(90deg, #b87333, #d9912f); }
.mode-btns .btn-watch:hover { filter: brightness(1.08); }

#switchBtn {
  width: 100%; margin-top: 4px; padding: 10px;
  background: linear-gradient(90deg, #e0532f, #e8912c);
  color: #fff; border: none; border-radius: 10px;
  font-size: 15px; font-weight: bold; cursor: pointer;
}
#switchBtn:hover { filter: brightness(1.08); }
.modal .tip { margin-top: 14px; font-size: 12px; color: var(--muted); }

.hidden { display: none !important; }
