/*
 * The-Angelz Archiv – angelehnt an den Skin „The-Hopeful-Angelz“ (IPB 2.1, 2006), modernisiert.
 * Farben zentral als Variablen.
 */
:root {
  --ink: #222;
  --muted: #5d6b80;
  --link: #072a66;
  --link-hover: #34498b;
  --border: #072a66;
  --border-soft: #9fb9d4;
  --page: #e9eef5;
  --row1: #f5f8fc;
  --row2: #e9eff6;
  --post1: #f5f9fd;
  --post2: #eef2f7;
  --head: #d1dceb;
  --head-ink: #3a4f6c;
  --quote-bg: #fafcfe;
  --quote-head: #e4eaf2;
  --quote-bar: #8394b2;
  --code-head: #fddbcc;
  --accent: #ffc9a5;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.55 Verdana, Tahoma, "Segoe UI", Arial, sans-serif;
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; vertical-align: middle; border: 0; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }

/* ---------------------------------------------------------------- Kopf */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #3b7bd4 url(skin/tile_cat.gif);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0 14px 0 0;
  overflow: hidden;
}
.banner .logo img { display: block; }
.banner-note {
  color: #fff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(7, 42, 102, .35); padding: 4px 10px; border-radius: 99px; white-space: nowrap;
}

.userbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  background: var(--head); border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 8px 12px; margin-bottom: 14px; font-size: 13px; color: var(--head-ink);
}
.userbar .boards { display: flex; gap: 4px; }
.userbar .boards a {
  text-decoration: none; font-weight: bold; color: var(--head-ink);
  padding: 4px 10px; border-radius: 4px;
}
.userbar .boards a.active, .userbar .boards a:hover { background: #fff; color: var(--link); }
.userbar .search { flex: 1 1 220px; }
.userbar .search input {
  width: 100%; padding: 6px 10px; border: 1px solid var(--border-soft); border-radius: 4px; font: inherit;
}
.userbar .user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.userbar .user em { font-style: normal; color: #8a4b00; }
button, .userbar button {
  font: inherit; font-weight: bold; cursor: pointer;
  background: #bfcde0; color: var(--ink); border: 1px solid var(--border); border-radius: 4px; padding: 4px 10px;
}
button:hover { background: #fff; }

.crumbs { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.crumbs span { margin: 0 6px; }

.intro { margin: 4px 0 12px; }
.intro h1 { margin: 0 0 2px; font-size: 22px; color: var(--link); }
.intro p { margin: 0; color: var(--muted); }

/* ---------------------------------------------------------------- Kästen / Tabellen */
.box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 16px; overflow: hidden;
}
.maintitle {
  margin: 0; padding: 7px 12px; font-size: 14px; color: #fff;
  background: #3b7bd4 url(skin/tile_cat.gif); border-bottom: 1px solid #5176b5;
}
.maintitle a { color: #fff; text-decoration: none; }
.maintitle a:hover { text-decoration: underline; }
.boxbody { padding: 14px 16px; }

table.ipb { width: 100%; border-collapse: collapse; }
table.ipb th {
  background: var(--head); color: var(--head-ink); text-align: left; font-size: 12px;
  padding: 6px 10px; border-bottom: 1px solid var(--border-soft);
}
table.ipb td { padding: 9px 10px; border-bottom: 1px solid #d5deea; vertical-align: middle; }
table.ipb tr:last-child td { border-bottom: 0; }
table.ipb tr.row1 td { background: var(--row1); }
table.ipb tr.row2 td { background: var(--row2); }
table.ipb tr:hover td { background: #fff; }
table.ipb .icon { width: 36px; text-align: center; }
table.ipb .num { width: 90px; text-align: center; white-space: nowrap; }
table.ipb .last { width: 220px; font-size: 12px; }
table.ipb a.title { font-weight: bold; text-decoration: none; }
table.ipb a.title:hover { text-decoration: underline; }
.desc, .subforums, .by { font-size: 12px; color: var(--muted); }
.subforums a { color: var(--muted); }
.minipages { font-size: 11px; }
.minipages a { border: 1px solid #c2cfdf; padding: 0 4px; text-decoration: none; background: #f0f5fa; }

.badge {
  display: inline-block; font-size: 10px; font-weight: bold; text-transform: uppercase; letter-spacing: .04em;
  background: var(--accent); color: #6b2f00; border-radius: 3px; padding: 1px 5px; vertical-align: 1px;
}
.badge.intern { background: #e4d4f4; color: #4b2a73; }
.badge.poll { background: #d4ecd9; color: #1e5b2b; }
.empty { color: var(--muted); }

/* ---------------------------------------------------------------- Seitenzahlen */
.pages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0 12px; font-size: 12px; }
.pages .info { margin-right: 6px; color: var(--muted); }
.pages a, .pages .current, .pages .gap {
  min-width: 28px; text-align: center; padding: 3px 7px; border-radius: 4px;
}
.pages a { background: #f0f5fa; border: 1px solid var(--border); text-decoration: none; }
.pages a:hover { background: #fff; }
.pages .current { background: var(--accent); border: 1px solid var(--border); font-weight: bold; }

/* ---------------------------------------------------------------- Beiträge */
.post {
  display: grid; grid-template-columns: 180px 1fr;
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: #fff;
}
.post .author {
  background: var(--head); border-right: 1px solid var(--border-soft);
  padding: 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; font-size: 12px;
}
.post.post2 .author { background: #dbe4f0; }
.avatar { width: 90px; height: 90px; object-fit: contain; border-radius: 4px; }
.avatar.initial {
  display: grid; place-items: center; background: #3b7bd4 url(skin/tile_cat.gif); color: #fff;
  font-size: 36px; font-weight: bold; border: 1px solid var(--border);
}
.author .name { font-size: 14px; color: var(--link); word-break: break-word; }
.author .mtitle { font-style: italic; color: var(--head-ink); }
.author .group { font-weight: bold; color: #8a4b00; }
.author .stats { color: var(--muted); }
.post .content { min-width: 0; display: flex; flex-direction: column; }
.post.post1 .content { background: var(--post1); }
.post.post2 .content { background: var(--post2); }
.post header {
  font-size: 12px; color: var(--muted); padding: 6px 14px; border-bottom: 1px solid #d5deea; background: rgba(209, 220, 235, .45);
}
.post header a { color: var(--muted); text-decoration: none; font-weight: bold; }
.postbody { padding: 14px; overflow-wrap: anywhere; flex: 1; }
.postbody img { max-height: 900px; }
.postbody img.emo { max-height: 40px; }
.postbody .center { text-align: center; }
.postbody .right { text-align: right; }
.postbody table { border-collapse: collapse; max-width: 100%; }
.postbody td, .postbody th { border: 1px solid #c2cfdf; padding: 3px 6px; }
.edited { font-size: 11px; color: var(--muted); padding: 6px 14px; border-top: 1px dashed #c2cfdf; }

/* Zitate & Code wie im alten Skin */
.quotetop, .codetop, .sqltop, .htmltop {
  margin: 8px 0 0; padding: 3px 8px; font-size: 11px; font-weight: bold; color: #000;
  border: 1px dotted #000; border-bottom: 0; border-left: 4px solid var(--quote-bar);
}
.quotetop { background: var(--quote-head) url(skin/css_img_quote.gif) no-repeat right; }
.codetop, .sqltop, .htmltop { background: var(--code-head) url(skin/css_img_code.gif) no-repeat right; }
.quotemain, .codemain, .sqlmain, .htmlmain {
  margin: 0 0 8px; padding: 6px 10px; background: var(--quote-bg); color: #465584;
  border: 1px dotted #000; border-left: 4px solid var(--quote-bar); border-top: 0;
}
.quotemain:first-child, .codemain:first-child { border-top: 1px dotted #000; }
.codemain, .sqlmain, .htmlmain { font-family: Consolas, "Courier New", monospace; white-space: pre-wrap; }

.attach { display: inline-block; margin: 4px 4px 4px 0; }
.attach.image img { border: 1px solid var(--border); padding: 2px; background: #fff; max-height: 360px; }
.attach.file { background: #f0f5fa; border: 1px solid var(--border-soft); border-radius: 4px; padding: 3px 8px; text-decoration: none; }
.attach.missing { color: var(--muted); font-size: 12px; font-style: italic; }

/* ---------------------------------------------------------------- Suche */
.results .result { padding: 10px 14px; border-bottom: 1px solid #d5deea; }
.results .result:nth-child(odd) { background: var(--row1); }
.results .result:last-child { border-bottom: 0; }
.results .title { font-weight: bold; }
.results p { margin: 4px 0 0; font-size: 13px; }

/* ---------------------------------------------------------------- Anmeldung */
.login { max-width: 460px; margin: 30px auto; }
.login form { display: grid; gap: 12px; margin: 14px 0; }
.login label { display: grid; gap: 4px; font-weight: bold; font-size: 13px; color: var(--head-ink); }
.login input { font: inherit; padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: 4px; }
.login input:focus { outline: 2px solid var(--link-hover); outline-offset: 1px; }
.login button { padding: 8px; font-size: 15px; }
.login .error { background: #fde3e3; border: 1px solid #c94a4a; color: #7a1d1d; padding: 8px 10px; border-radius: 4px; }
.login .hint { font-size: 12px; color: var(--muted); }

.login .ok { background: #e3f4e6; border: 1px solid #4a9a5a; color: #1d5a2a; padding: 8px 10px; border-radius: 4px; }
.notice { background: #e3f4e6; border: 1px solid #4a9a5a; color: #1d5a2a; padding: 8px 12px; border-radius: var(--radius); margin: 0 0 12px; }
.notice.warn { background: #fff4d6; border-color: #c9a23a; color: #6b4b00; }

.boardcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.boardcard p { margin: 0 0 10px; }
.button {
  display: inline-block; font-weight: bold; text-decoration: none; color: var(--ink);
  background: #bfcde0; border: 1px solid var(--border); border-radius: 4px; padding: 6px 14px;
}
.button:hover { background: #fff; }

footer { margin: 24px 0 8px; text-align: center; font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------------- Mobil */
@media (max-width: 760px) {
  .wrap { padding: 8px; }
  .banner { padding-right: 8px; }
  .banner .logo img { width: 260px; height: auto; }
  .banner-note { display: none; }
  table.ipb .num, table.ipb th.num { display: none; }
  table.ipb .last { width: 120px; font-size: 11px; }
  .post { grid-template-columns: 1fr; }
  .post .author { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; border-right: 0; border-bottom: 1px solid var(--border-soft); padding: 8px 12px; }
  .avatar { width: 40px; height: 40px; }
  .avatar.initial { font-size: 18px; }
  .author .stats, .author .mtitle { display: none; }
  .userbar .user { margin-left: 0; }
}
