/* Tibia Nostalgia website - single stylesheet, no external dependencies */

:root {
  --bg: #17130f;
  --bg-2: #241d16;
  --frame: #2e251c;
  --frame-line: #4a3b2a;
  --gold: #e0b453;
  --gold-soft: #c9a24a;
  --parchment: #f3ead6;
  --parchment-2: #e8dcc0;
  --parchment-line: #cdb98f;
  --ink: #2a2017;
  --ink-soft: #6b5a45;
  --link: #7b3f12;
  --button: #6f4319;
  --button-hover: #85521f;
  --danger: #8e2b20;
  --ok: #2d6e2f;
  --info: #2f5677;
  --radius: 4px;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  color: var(--ink);
  font: 15px/1.55 var(--sans);
}

/* page background: original night scene (background.svg). To use another
   picture, put it in this folder and change the url() below. The gradient
   on top keeps the text readable. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(10, 8, 6, .1), rgba(10, 8, 6, .4)),
    url("background.svg") center bottom / cover no-repeat,
    var(--bg);
}

a { color: var(--link); }
a:hover { color: #a35a1c; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* header ------------------------------------------------------------------ */
.brand {
  display: block;
  padding: 44px 0 34px;
  text-decoration: none;
}
.brand-name {
  display: block;
  font: 700 42px/1.1 var(--serif);
  letter-spacing: .02em;
  color: var(--gold);
  text-shadow: 0 2px 0 #000, 0 0 24px rgba(224, 180, 83, .25);
}
.brand-tagline {
  display: block;
  margin-top: 6px;
  color: #d2c09a;
  font: italic 16px var(--serif);
  text-shadow: 0 1px 2px #000;
}

.site-nav { background: rgba(46, 37, 28, .88); border-top: 1px solid var(--frame-line); border-bottom: 1px solid var(--frame-line); backdrop-filter: blur(4px); }
.site-nav .wrap { display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a {
  padding: 11px 14px;
  color: var(--parchment-2);
  text-decoration: none;
  font: 600 14px var(--sans);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--gold); }
.site-nav a.active { color: var(--gold); border-bottom-color: var(--gold); }

/* layout ------------------------------------------------------------------ */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 20px;
  padding-top: 22px;
  padding-bottom: 32px;
}

.panel, .box {
  background: var(--parchment);
  border: 1px solid var(--parchment-line);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.panel { padding: 20px 24px; margin-bottom: 18px; }
.panel.narrow { max-width: 460px; }
.box { padding: 14px 16px; margin-bottom: 16px; }

h1, h2, h3 { font-family: var(--serif); color: #3b2b1b; line-height: 1.25; }
h1 { font-size: 28px; margin: 0 0 14px; }
h2 { font-size: 22px; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 18px 0 8px; }
.box h3 {
  margin: -14px -16px 12px;
  padding: 9px 16px;
  background: var(--parchment-2);
  border-bottom: 1px solid var(--parchment-line);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 16px;
}

.intro p { font-size: 16px; }
.lead { font-size: 18px; }
.meta { margin: -6px 0 12px; color: var(--ink-soft); font-size: 13px; }
.small { font-size: 13px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.nowrap { white-space: nowrap; }
code { background: var(--parchment-2); padding: 1px 5px; border-radius: 3px; font-size: 13px; }

.news header { border-bottom: 1px solid var(--parchment-line); margin-bottom: 12px; }
.news-body { overflow-wrap: anywhere; }

/* tables ------------------------------------------------------------------ */
.table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.table th, .table td { padding: 7px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--parchment-line); }
.table thead th { background: var(--parchment-2); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.table tbody tr:nth-child(even) td { background: rgba(205, 185, 143, .18); }
.table.info th { width: 34%; color: var(--ink-soft); font-weight: 600; }
.table td { overflow-wrap: anywhere; }
.table .num { text-align: right; }
.actions-cell { text-align: right; white-space: nowrap; }

/* forms / buttons --------------------------------------------------------- */
input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--parchment-line);
  border-radius: var(--radius);
  background: #fffaf0;
  color: var(--ink);
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-soft); outline-offset: 0; border-color: var(--gold-soft); }
label { display: block; font-weight: 600; font-size: 14px; }
label input, label select, label textarea { margin-top: 4px; font-weight: 400; }

.stack { display: grid; gap: 10px; }
.narrow-form { max-width: 420px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input, .filters select { width: auto; flex: 1 1 180px; }
.inline { display: inline; }
.inline select { width: auto; padding: 4px 6px; }
.radios { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; }
.radios legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 4px; }
.radios label { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.radios input { width: auto; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

button, .button {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #4e2f10;
  border-radius: var(--radius);
  background: var(--button);
  color: #fdf4df;
  font: 600 14px var(--sans);
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--button-hover); color: #fff; }
.button-quiet { background: transparent; color: var(--button); border-color: var(--parchment-line); }
.button-quiet:hover { background: var(--parchment-2); color: var(--button); }
.button-danger { background: var(--danger); border-color: #5f1b14; }
.button-danger:hover { background: #a63326; }
.button-small { padding: 3px 9px; font-size: 13px; }
.button-big { padding: 12px 24px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }

details.confirm { display: inline-block; text-align: left; }
details.confirm summary { cursor: pointer; color: var(--danger); font-weight: 600; font-size: 14px; }
details.confirm[open] { display: block; padding: 10px; margin-top: 6px; background: var(--parchment-2); border-radius: var(--radius); }

/* messages / badges ------------------------------------------------------- */
.flash { padding: 10px 14px; margin: 0 0 14px; border-radius: var(--radius); border: 1px solid; font-weight: 600; }
.flash-success { background: #e3f0dc; border-color: #9cc48d; color: var(--ok); }
.flash-error { background: #f6dfd9; border-color: #d39b8e; color: var(--danger); }
.flash-info { background: #dfe8f0; border-color: #9fb7cb; color: var(--info); }

.badge { display: inline-block; padding: 0 7px; border-radius: 10px; background: var(--parchment-line); color: var(--ink); font-size: 12px; font-weight: 600; }
.badge-online { background: var(--ok); color: #fff; }

.status { font: 700 18px var(--serif); margin: 0 0 8px; }
.status-online { color: var(--ok); }
.status-offline { color: var(--danger); }
.facts { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; font-size: 14px; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

.pager { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.pager a, .pager span { padding: 3px 10px; border: 1px solid var(--parchment-line); border-radius: var(--radius); background: var(--parchment); text-decoration: none; }
.pager .current { background: var(--button); color: #fff; border-color: var(--button); }

ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 4px 0; }
.steps li { margin-bottom: 8px; font-size: 16px; }

/* staff ------------------------------------------------------------------- */
.staff-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--parchment-line); margin-bottom: 16px; }
.tabs a { padding: 8px 14px; text-decoration: none; font-weight: 600; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.tabs a.active { background: var(--parchment-2); border-color: var(--parchment-line); color: var(--ink); }
.credentials { background: #fffaf0; border: 2px dashed var(--gold-soft); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; }
.credentials h3 { margin-top: 0; }
.credentials pre { margin: 0; white-space: pre-wrap; font-size: 15px; user-select: all; }

/* footer ------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--frame-line); background: rgba(20, 16, 12, .9); color: #a8977a; font-size: 13px; }
.site-footer p { margin: 0; padding: 16px 0; }

/* small screens ----------------------------------------------------------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .brand-name { font-size: 32px; }
  .panel { padding: 16px; }
  .table:not(.info) { display: block; overflow-x: auto; }
  .table.info th { width: 40%; }
  .site-nav .wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .site-nav a { white-space: nowrap; padding: 11px 10px; }
}
