/* ===== 江湖风云 · 网页版 - 水墨风样式 ===== */
:root {
  --bg-0: #0a0a0f;
  --bg-1: #12121a;
  --bg-2: #1a1a24;
  --panel: rgba(24, 24, 34, 0.92);
  --panel-border: #2c2c3a;
  --ink: #e8e4d8;
  --ink-dim: #8a8678;
  --gold: #c9a86a;
  --gold-bright: #e8c88a;
  --red: #c05a3a;
  --blue: #6a9ec9;
  --green: #6a9a6a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Serif SC", "SimHei", serif;
  background: var(--bg-0);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(60, 50, 80, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(40, 60, 70, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  color: var(--ink);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  user-select: none;
}

/* ===== 顶部状态栏 ===== */
#status-bar {
  height: 60px;
  background: linear-gradient(180deg, var(--bg-2), var(--panel));
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 15px;
  letter-spacing: 1px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#status-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 4px rgba(201, 168, 106, 0.4));
}

#status-name {
  color: var(--gold-bright);
  font-size: 17px;
  font-weight: bold;
}

.badge {
  background: rgba(201, 168, 106, 0.15);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 106, 0.4);
  border-radius: 4px;
  padding: 2px 10px;
  font-size: 13px;
}

#status-right {
  display: flex;
  gap: 20px;
}

.stat {
  color: var(--ink-dim);
}
.stat b {
  color: var(--ink);
  font-weight: normal;
}
.stat.hp b { color: #e08a6a; }
.stat.mp b { color: var(--blue); }
.stat.gold b { color: #e6c15a; }
.stat.lv b { color: var(--gold); }

/* ===== 主内容区 ===== */
#main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

#output-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  position: relative;
}

/* 场景图（右侧大图，1:3 布局） */
#scene-image {
  position: relative;
  flex: 3;
  min-width: 0;
  margin: 16px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.4);
}

#scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85) brightness(0.92);
}

#scene-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,15,0.1) 0%, rgba(10,10,15,0.45) 100%);
  pointer-events: none;
}

#scene-caption {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-bright);
  font-size: 16px;
  letter-spacing: 4px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  white-space: nowrap;
}

#output {
  position: relative;
  z-index: 1;
  font-size: 18px;
  line-height: 1.9;
  white-space: pre-wrap;
  letter-spacing: 0.5px;
  max-width: 800px;
}

/* 可点击列表项 */
#output .clickable-item {
  cursor: pointer;
  padding: 8px 14px;
  margin: 2px 0;
  border-radius: 5px;
  border: 1px solid transparent;
  color: var(--ink);
  transition: all 0.15s;
  line-height: 1.6;
}
#output .clickable-item:hover {
  background: rgba(201, 168, 106, 0.12);
  border-color: rgba(201, 168, 106, 0.4);
  color: var(--gold-bright);
  padding-left: 20px;
}
#output .clickable-item:active {
  background: rgba(201, 168, 106, 0.2);
}

/* 输出文字样式 */
#output .location { color: var(--gold-bright); font-size: 26px; font-weight: bold; letter-spacing: 3px; }
#output .desc { color: var(--ink-dim); }
#output .event { color: #d4c9a8; }
#output .battle { color: #e08a6a; }
#output .win { color: var(--gold-bright); }
#output .lose { color: var(--red); }
#output .system { color: var(--ink-dim); font-size: 15px; }
#output .separator { color: var(--panel-border); letter-spacing: 2px; }

/* ===== 右侧状态面板 ===== */
#side-panel {
  width: 260px;
  border-left: 1px solid var(--panel-border);
  background: var(--panel);
  padding: 20px;
  overflow-y: auto;
  flex-shrink: 0;
}

#panel-title {
  color: var(--gold);
  font-size: 16px;
  letter-spacing: 3px;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 12px;
  margin-bottom: 16px;
  text-align: center;
}

#panel-content {
  font-size: 14px;
  line-height: 2;
  color: var(--ink-dim);
}

#panel-content .attr-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}

#panel-content .attr-row .label { color: var(--ink-dim); }
#panel-content .attr-row .value { color: var(--ink); }

#panel-content .skill-item {
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 1px dashed rgba(44, 44, 58, 0.6);
}

#panel-content .weapon-item {
  color: var(--gold);
}

/* ===== 底部操作区 ===== */
#menu {
  height: 150px;
  background: linear-gradient(0deg, var(--bg-2), var(--panel));
  border-top: 1px solid var(--panel-border);
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 24px;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

button {
  background: linear-gradient(180deg, #23232f, #1a1a24);
  color: var(--ink);
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  padding: 12px 22px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.2s;
  min-width: 100px;
}

button:hover {
  background: linear-gradient(180deg, #2c2c3a, #23232f);
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: 0 0 12px rgba(201, 168, 106, 0.2);
}

button:active {
  transform: scale(0.96);
}

button.primary {
  border-color: rgba(201, 168, 106, 0.6);
  color: var(--gold);
}

button.danger {
  border-color: rgba(192, 90, 58, 0.6);
  color: #d4896b;
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ===== 弹窗 ===== */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(3px);
}

#modal {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  min-width: 420px;
  max-width: 640px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#modal h3 {
  color: var(--gold);
  font-size: 20px;
  margin-bottom: 18px;
  letter-spacing: 3px;
  text-align: center;
}

#modal .option {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  padding: 12px 16px;
}

#modal .group-title {
  color: var(--gold);
  margin: 16px 0 6px;
  font-size: 14px;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 5px;
}

input[type="text"], input[type="password"] {
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  padding: 11px 14px;
  font-size: 16px;
  font-family: inherit;
  width: 100%;
  letter-spacing: 1px;
}

input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(201, 168, 106, 0.3);
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: #2c2c3a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a4a;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  #scene-image {
    display: none;
  }
}

@media (max-width: 900px) {
  #side-panel {
    display: none;
  }
  #scene-image {
    display: none;
  }
}
