:root {
    --bg: #12171e;
    --bg-2: #171d25;
    --panel: #1f2731;
    --panel-2: #26303b;
    --line: #34404d;
    --text: #efe6d2;
    --muted: #a3a59f;
    --gold: #b8975a;
    --gold-2: #e2cf9f;
    --red: #8b2e2e;
    --red-2: #a83c3c;
    --ok: #3e7a68;
    --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 "Inter", system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; }
h1, h2, h3, .brand { font-family: "Cinzel", Georgia, serif; letter-spacing: .02em; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; hyphens: auto; overflow-wrap: break-word; } /* long German words (Nutzungsbedingungen) in Cinzel are wider than a phone */
main { flex: 1; }
.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(18,23,30, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { font-size: 1.5rem; font-weight: 700; color: var(--gold-2); white-space: nowrap; }
.brand:hover { color: #fff; }
.brand img { display: block; height: 40px; width: auto; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--text); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover, .nav a.active { background: var(--panel-2); color: var(--gold-2); }
.nav .nav-mobile { display: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.lang a { color: var(--muted); font-size: .8rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.lang a.active { background: var(--gold); color: #1a1208; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 1.1rem; cursor: pointer; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--panel-2); color: var(--text); font-weight: 600; cursor: pointer;
    font-size: .95rem; transition: transform .1s, background .15s;
}
.btn:hover { background: #2c3744; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1208; border-color: #7d6539; }
.btn-gold:hover { background: linear-gradient(180deg, #efe2bd, var(--gold-2)); color: #1a1208; }
.btn-red { background: linear-gradient(180deg, var(--red-2), var(--red)); border-color: #5e1f1f; color: #fff; }
.btn-red:hover { background: linear-gradient(180deg, #b84848, var(--red-2)); }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Hero */
.hero {
    position: relative; min-height: 520px; display: flex; align-items: center; padding: 48px 0 88px;
    background: linear-gradient(90deg, rgba(18,23,30,.92) 0%, rgba(18,23,30,.55) 55%, rgba(18,23,30,.2) 100%),
                linear-gradient(0deg, var(--bg) 0%, transparent 35%),
                url("hero.jpg") center/cover no-repeat;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.hero h1 span { color: var(--gold-2); }
.hero p { font-size: 1.15rem; color: #d8cfc4; max-width: 560px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.badge { font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(184,151,90,.15); color: var(--gold-2); border: 1px solid rgba(184,151,90,.35); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: -48px; position: relative; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat b { display: block; font-family: "Cinzel", serif; font-size: 1.8rem; color: var(--gold-2); }
.stat span { color: var(--muted); font-size: .9rem; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); margin-right: 6px; }

/* Sections & cards */
.section { padding: 56px 0; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-title h2 { margin: 0; font-size: 1.8rem; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.class-card { text-align: center; padding-top: 12px; }
.class-card img { display: block; height: 240px; width: auto; max-width: 100%; margin: 0 auto 8px; object-fit: contain; }
.err-art { display: block; width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { color: var(--gold-2); font-size: 1.15rem; }
.card p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.page-head.art { padding: 96px 0 28px; background: linear-gradient(0deg, var(--bg) 0%, rgba(18,23,30,.55) 60%, rgba(18,23,30,.25) 100%), var(--art) center/cover no-repeat; }
.page-head.art h1 { text-shadow: 0 2px 16px rgba(0,0,0,.7); }

.news-item, .feature-card { display: block; overflow: hidden; }
.card-art { display: block; width: calc(100% + 44px); max-width: none; height: auto; aspect-ratio: 2 / 1; object-fit: cover; margin: -22px -22px 14px; }
.news-item time { color: var(--muted); font-size: .85rem; }
.news-item h3 { margin: 4px 0 8px; }
.news-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--red-2); }

/* Page header */
.page-head { padding: 48px 0 24px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

/* Forms */
.form-card { max-width: 460px; margin: 40px auto; }
.auth-bg { max-width: none; padding: 1px 16px 24px; background: linear-gradient(180deg, rgba(18,23,30,.35) 0%, rgba(18,23,30,.75) 70%, var(--bg) 100%), url("registrieren.jpg") center 20%/cover no-repeat; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field select, .field textarea, .filters input, .filters select {
    width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--bg-2); color: var(--text); font: inherit;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .filters input:focus, .filters select:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.field .error, .error-text { color: #ff8a80; font-size: .85rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: 4px; accent-color: var(--gold); }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.alert-ok { background: rgba(76,175,106,.12); border-color: rgba(76,175,106,.4); color: #b6e8c4; }
.alert-err { background: rgba(216,57,47,.12); border-color: rgba(216,57,47,.4); color: #ffc2bd; }
.form-foot { text-align: center; margin-top: 16px; color: var(--muted); font-size: .92rem; }

/* Steps */
.steps { display: flex; gap: 8px; margin-bottom: 20px; }
.steps span { flex: 1; text-align: center; font-size: .8rem; padding: 6px; border-radius: 6px; background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); }
.steps span.on { background: rgba(184,151,90,.15); color: var(--gold-2); border-color: rgba(184,151,90,.4); }

/* Tables */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters > * { flex: 1 1 160px; }
.filters .btn { flex: 0 0 auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.rank { width: 100%; border-collapse: collapse; background: var(--panel); }
.rank th, .rank td { padding: 12px 14px; text-align: left; white-space: nowrap; }
.rank th { background: var(--panel-2); color: var(--gold-2); font-family: "Cinzel", serif; font-size: .9rem; }
.rank tr + tr td { border-top: 1px solid var(--line); }
.rank tr:hover td { background: #211a16; }
.rank .pos { font-weight: 700; width: 64px; }
/* places 1-3: the game's rank medal (digit painted in), the number stays for screen readers */
.rank tr.top1 .pos, .rank tr.top2 .pos, .rank tr.top3 .pos { color: transparent; background-position: left 10px center; background-size: auto 40px; background-repeat: no-repeat; }
.rank tr.top1 .pos { background-image: url(rang-1.png); }
.rank tr.top2 .pos { background-image: url(rang-2.png); }
.rank tr.top3 .pos { background-image: url(rang-3.png); }
.empire-pill { font-size: .8rem; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.empire-1 { color: #ff8a80; border-color: rgba(255,138,128,.4); }
.empire-2 { color: #ffe082; border-color: rgba(255,224,130,.4); }
.empire-3 { color: #82b1ff; border-color: rgba(130,177,255,.4); }
.pager { display: flex; justify-content: space-between; margin-top: 14px; gap: 8px; }
.small { font-size: .85rem; }

/* Account */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.char { display: flex; gap: 16px; align-items: center; }
.char img { width: 56px; height: 56px; object-fit: contain; background: var(--bg-2); border-radius: 8px; border: 1px solid var(--line); }
.char h3 { margin: 0 0 4px; }

/* Download */
.dl-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.req td { padding: 6px 12px 6px 0; vertical-align: top; }
.req td:first-child { color: var(--muted); white-space: nowrap; }
/* events page */
.ev-now { margin: 10px 0 12px; }
.ev-live { color: var(--gold-2); font-weight: 700; }
.ev-week tr.today td { color: var(--gold-2); font-weight: 700; }
.ev-boss { padding: 9px 0; border-top: 1px solid var(--line); }
.ev-boss > div { display: flex; justify-content: space-between; gap: 10px; }
.ev-boss > div > span:last-child { white-space: nowrap; }
.ev-goal { margin-top: 10px; }
.ev-goal.done .small { color: var(--gold-2); }
.ev-bar { height: 8px; margin-top: 4px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.ev-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.ev-goal.done .ev-bar i { background: var(--ok); }
ol.steps-list { padding-left: 20px; }
ol.steps-list li { margin-bottom: 6px; }

/* Prose */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; color: var(--gold-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 28px 0; margin-top: 40px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold-2); }

/* Responsive */
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .dl-hero { grid-template-columns: 1fr; }
    .menu-toggle { display: block; }
    .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
    .nav.open { display: flex; }
    .site-header .wrap { justify-content: space-between; }
}
@media (max-width: 600px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero { min-height: 560px; background: linear-gradient(0deg, var(--bg) 0%, rgba(18,23,30,.7) 45%, rgba(18,23,30,.35) 100%), url("hero-mobil.jpg") center 30%/cover no-repeat; }
    .header-actions .btn { display: none; }
    .nav .nav-mobile { display: block; color: var(--gold-2); }
    .kv { grid-template-columns: 1fr; gap: 2px; }
    .kv dd { margin-bottom: 8px; }
    .rank th, .rank td { padding: 10px; }
    .rank th:nth-child(3), .rank td:nth-child(3), .rank th:nth-child(6), .rank td:nth-child(6) { display: none; } /* class/leader + exp/points: the level fits without side scrolling */
}
