/* Dragon's Exodus website — Copyright (c) 2026 Dragon's Exodus. MIT License; see LICENSE. */
:root {
  --de-green: #70883c;
  --de-green-lt: #809536;
  --bg: #0a0f0a;
  --bg-2: #121a12;
  --bg-3: #18221a;
  --line: #2a3a28;
  --fg: #cccccc;
  --fg-dim: #8a9a86;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Segoe UI", system-ui, Arial, sans-serif;
  display: flex;
  flex-direction: column;
}

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  background: linear-gradient(#18221a, #0d130d);
  border-bottom: 2px solid var(--de-green);
}
.brand { color: var(--de-green-lt); font-weight: 700; font-size: 18px; text-decoration: none; }
.topbar a { color: var(--fg-dim); text-decoration: none; }
.topbar a:hover { color: var(--de-green-lt); }
.topbar .nav { margin-left: auto; display: flex; gap: 14px; }

.controls {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.controls input[type="text"], .controls select {
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 9px;
  font-size: 14px;
}
.controls input[type="text"] { flex: 1 1 220px; min-width: 180px; }
.controls input:focus, .controls select:focus { outline: none; border-color: var(--de-green); }
#count { color: var(--fg-dim); font-size: 13px; margin-left: auto; }
#status { padding: 14px; color: var(--fg-dim); }

.db-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 0;
}
.list { overflow-y: auto; border-right: 1px solid var(--line); }
.detail { overflow-y: auto; padding: 16px 20px; }

.row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid var(--bg-3);
  cursor: pointer;
  font-size: 14px;
}
.row:hover { background: var(--bg-3); }
.r-lvl, .r-type, .r-slot { color: var(--fg-dim); font-size: 12px; }
.r-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#pager { flex: 0 0 auto; display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
#pager button {
  background: var(--bg-3);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
}
#pager button:disabled { opacity: .4; cursor: default; }

.d-name, .help-title { margin: 0 0 10px; color: var(--de-green-lt); }
.detail h3 { color: var(--de-green-lt); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 6px; }
.d-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 16px; }
.d-mrow { display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px solid var(--bg-3); padding: 2px 0; }
.d-mk { color: var(--fg-dim); }
.d-info, .help-text {
  font-family: Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  margin: 0;
}
.d-srcgroup { margin: 6px 0; }
.d-srcmethod { color: var(--de-green-lt); font-size: 12px; text-transform: capitalize; }
.d-srcline { font-size: 13px; padding-left: 10px; }

.topic { padding: 7px 12px; border-bottom: 1px solid var(--bg-3); cursor: pointer; font-size: 14px; }
.topic:hover { background: var(--bg-3); }

@media (max-width: 800px) {
  .db-body { display: flex; flex-direction: column; }
  .list { max-height: 42vh; border-right: none; border-bottom: 1px solid var(--line); }
}
