/* ===================== 围达网 2003 客户端风格 ===================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "宋体", SimSun, "Microsoft YaHei", sans-serif;
  font-size: 13px;
  color: #000;
  background: #3a6ea5; /* 窗外背景 */
  user-select: none;
}
#app {
  position: absolute; inset: 14px;
  display: flex; flex-direction: column;
  background: #c0c0c0;
  border: 2px solid #fff;
  border-right-color: #404040; border-bottom-color: #404040;
  box-shadow: 2px 2px 0 #000;
  min-width: 980px; min-height: 600px;
}

/* 标题栏 */
#titlebar {
  height: 26px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 0 6px;
  background: linear-gradient(90deg, #0a246a, #3a5fcd 60%, #a6caf0);
  color: #fff; cursor: default;
}
.tb-left { display: flex; align-items: center; gap: 6px; }
.tb-logo {
  display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center;
  background: #fff; color: #c0392b; font-weight: bold; border-radius: 3px; font-size: 13px;
}
.tb-title { font-weight: bold; letter-spacing: 1px; }
.tb-title small { font-weight: normal; opacity: .85; letter-spacing: 0; }
.tb-right { display: flex; gap: 2px; }
.winbtn {
  width: 18px; height: 16px; line-height: 14px; text-align: center; cursor: default;
  background: #c0c0c0; color: #000; border: 1px solid #fff; border-right-color: #404040; border-bottom-color: #404040;
  font-size: 11px;
}

/* 菜单栏 */
#menubar {
  height: 24px; display: flex; align-items: center; gap: 2px; padding: 0 4px;
  background: #c0c0c0; border-top: 1px solid #fff; border-bottom: 1px solid #808080;
}
.menu { padding: 2px 8px; cursor: default; }
.menu u { text-decoration: underline; }
.menu:hover, .menu.active { background: #0a246a; color: #fff; }

/* 下拉菜单 */
#dropdown {
  position: absolute; z-index: 50; background: #c0c0c0;
  border: 1px solid #fff; border-right-color: #404040; border-bottom-color: #404040;
  padding: 2px; min-width: 150px; box-shadow: 2px 2px 0 #000a;
}
#dropdown.hidden { display: none; }
.dd-item { padding: 4px 18px 4px 10px; cursor: default; white-space: nowrap; }
.dd-item:hover { background: #0a246a; color: #fff; }
.dd-sep { height: 1px; background: #808080; margin: 2px 0; border-bottom: 1px solid #fff; }

/* 主区域 */
#main { flex: 1; display: flex; min-height: 0; background: #c0c0c0; }
#col-left { width: 220px; border-right: 1px solid #808080; padding: 6px; overflow: auto; background: #d4d0c8; }
#col-center { flex: 1; padding: 8px; overflow: auto; background: #d4d0c8; }
#col-right { width: 260px; border-left: 1px solid #808080; background: #d4d0c8; display: flex; flex-direction: column; }

/* 通用面板（3D 凸起） */
.panel {
  background: #d4d0c8; border: 2px solid #fff; border-right-color: #808080; border-bottom-color: #808080;
  margin-bottom: 8px;
}
.panel-h {
  background: linear-gradient(90deg, #0a246a, #3a5fcd); color: #fff; padding: 3px 8px; font-weight: bold;
}
.panel-b { padding: 8px; }

/* 按钮（3D） */
.btn {
  display: inline-block; padding: 3px 12px; cursor: default; background: #d4d0c8; color: #000;
  border: 2px solid #fff; border-right-color: #404040; border-bottom-color: #404040; font-size: 13px;
}
.btn:active { border: 2px solid #404040; border-right-color: #fff; border-bottom-color: #fff; }
.btn.primary { background: #0a246a; color: #fff; border-color: #6f8fd6 #10204a #10204a #6f8fd6; }
.btn[disabled] { color: #808080; cursor: default; }

/* 列表 */
.navitem { padding: 5px 8px; cursor: default; border: 1px solid transparent; }
.navitem:hover { background: #cfe0ff; border-color: #7ba1e0; }
.navitem.active { background: #0a246a; color: #fff; }
.listrow { padding: 4px 6px; border-bottom: 1px solid #bdb9af; cursor: default; }
.listrow:hover { background: #cfe0ff; }

/* 表单 */
.field { margin-bottom: 9px; }
.field label { display: block; margin-bottom: 2px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 3px 5px; font-family: inherit; font-size: 13px;
  border: 2px solid #808080; border-right-color: #fff; border-bottom-color: #fff; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #0a246a; }
.err { color: #c0392b; min-height: 16px; margin-top: 4px; }
.hint { color: #555; font-size: 12px; }

/* 登录/注册 居中卡片 */
.auth-wrap { display: flex; align-items: center; justify-content: center; height: 100%; }
.auth-card { width: 360px; }
.auth-tabs { display: flex; margin-bottom: 8px; }
.auth-tabs .tab { flex: 1; text-align: center; padding: 5px; cursor: default; background: #bdb9af; border: 1px solid #808080; }
.auth-tabs .tab.active { background: #d4d0c8; border-bottom: none; font-weight: bold; }

/* 棋盘 */
.board-wrap { display: flex; flex-direction: column; align-items: center; }
#board { border: 2px solid #404040; background: #dcb877; cursor: pointer; box-shadow: inset 1px 1px 3px #0006; }
.goinfo { width: 100%; margin-bottom: 6px; }
.coord-tag { font-size: 11px; color: #444; }

/* 对局信息条 */
.matchbar { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; background: #0a246a; color: #fff; margin-bottom: 6px; }
.matchbar .vs { font-weight: bold; }
.result-banner { text-align: center; padding: 6px; background: #fff3c4; border: 1px solid #d4a017; color: #8a6d00; font-weight: bold; margin-bottom: 6px; }

/* 聊天面板 */
.chat-head { background: linear-gradient(90deg, #0a246a, #3a5fcd); color: #fff; padding: 3px 8px; font-weight: bold; }
.chat-log { flex: 1; overflow: auto; padding: 6px; background: #fff; border: 2px solid #808080; border-right-color: #fff; border-bottom-color: #fff; font-size: 12px; }
.chat-msg { margin-bottom: 4px; line-height: 1.4; }
.chat-msg .who { color: #0a246a; font-weight: bold; }
.chat-msg .ts { color: #999; font-size: 11px; margin: 0 4px; }
.chat-input { display: flex; padding: 4px; gap: 4px; border-top: 1px solid #808080; }
.chat-input input { flex: 1; padding: 3px; border: 2px solid #808080; border-right-color: #fff; border-bottom-color: #fff; }

/* 表格 */
table.grid { width: 100%; border-collapse: collapse; background: #fff; }
table.grid th, table.grid td { border: 1px solid #bdb9af; padding: 3px 6px; text-align: left; }
table.grid th { background: #0a246a; color: #fff; }
table.grid tr:nth-child(even) td { background: #ece9e1; }

/* 状态栏 */
#statusbar {
  height: 22px; display: flex; align-items: center; gap: 16px; padding: 0 8px;
  background: #d4d0c8; border-top: 1px solid #fff; font-size: 12px;
}
#statusbar span { border: 1px solid #808080; border-right-color: #fff; border-bottom-color: #fff; padding: 1px 6px; }
#st-msg { flex: 1; border: none; }

/* 杂项 */
.muted { color: #666; }
.big { font-size: 15px; font-weight: bold; }
.center { text-align: center; }
.right { text-align: right; }
.tag { display: inline-block; padding: 0 5px; background: #0a246a; color: #fff; border-radius: 2px; font-size: 11px; }
.rank-badge { color: #c0392b; font-weight: bold; }
.dialog-mask { position: fixed; inset: 0; background: #0006; display: flex; align-items: center; justify-content: center; z-index: 100; }
.dialog { width: 420px; background: #d4d0c8; border: 2px solid #fff; border-right-color: #404040; border-bottom-color: #404040; }
.dialog .panel-h { background: linear-gradient(90deg, #0a246a, #3a5fcd); color: #fff; padding: 4px 8px; font-weight: bold; }
.dialog .panel-b { padding: 12px; }
.dialog .dlg-btns { text-align: right; margin-top: 10px; }
