:root {
    --bg-color: #121214;
    --card-bg: #1a1a1e;
    --border-color: #43382c;
    --accent-gold: #c9a959;
    --accent-fire: #ff5533;
    --text-main: #e0d8c3;
    --text-muted: #a09882;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}
h1, h2, h3, h4 {
    color: var(--accent-gold);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-top: 30px;
}
h1 {
    text-align: center;
    font-size: 2.4em;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 15px;
    color: var(--accent-fire);
}
.source-link {
    color: var(--accent-gold);
    text-underline-offset: 2px;
    font-weight: 600;
}
p, li {
    color: var(--text-main);
}
blockquote {
    border-left: 4px solid var(--accent-gold);
    margin: 20px 0;
    padding: 10px 20px;
    background: rgba(201, 169, 89, 0.05);
    font-style: italic;
    color: var(--text-muted);
}
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #151518;
}
th, td {
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    text-align: left;
}
th {
    background-color: #222228;
    color: var(--accent-gold);
}
tr:nth-child(even) {
    background-color: #1a1a1f;
}
/* Echte Wikipedia-Infobox rechts im Textfluss */
.wiki-infobox {
    float: right;
    clear: right;
    width: 280px;
    margin: 0 0 20px 25px;
    border: 1px solid var(--accent-gold);
    background: #151518;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}
.wiki-infobox img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: contain;
    background: #101013;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.wiki-caption {
    margin-top: 10px;
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 0.9em;
}
.item-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
    color: var(--text-main);
    text-decoration: underline;
    text-decoration-color: var(--border-color);
    text-underline-offset: 2px;
}
.item-link img {
    flex: none;
    width: 30px;
    height: 30px;
    box-sizing: border-box;
    padding: 2px;
    object-fit: contain;
    vertical-align: middle;
    background: #151518;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}
.class-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-right: 7px;
    object-fit: contain;
    vertical-align: middle;
}
.class-icon--header {
    display: inline-block;
    width: 80px;
    height: 80px;
    margin-right: 7px;
    object-fit: contain;
    vertical-align: middle;
}
.ability-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-right: 7px;
    object-fit: contain;
    vertical-align: middle;
}
.attribute-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 5px;
    object-fit: contain;
    vertical-align: middle;
}
.stat-arrow {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
    margin-bottom: 6px;
}
.icon-link {
    display: inline-block;
    vertical-align: middle;
    line-height: 0;
    text-decoration: none;
}
.icon-link:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}
.clear {
    clear: both;
}
.highlight-box {
    background: rgba(255, 85, 51, 0.1);
    border: 1px solid var(--accent-fire);
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}
.highlight-box h3, .highlight-box h4 {
    margin-top: 0;
    color: var(--accent-fire);
    border-bottom: none;
}
ul, ol {
    padding-left: 20px;
}
footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.9em;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}
footer a {
    color: var(--accent-gold);
}
@page {
    size: A4;
    margin: 14mm;
}
@media print {
    html, body {
        background: #fff;
        color: #242424;
    }
    body {
        padding: 0;
        font-size: 10pt;
        line-height: 1.45;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
        background: #fff;
        color: #242424;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    h1, h2, h3, h4 {
        color: #73551b;
        border-color: #d3c7a3;
        break-after: avoid;
        page-break-after: avoid;
    }
    h1 {
        color: #b93e27;
        font-size: 23pt;
    }
    .source-link {
        color: #654a11;
    }
    p, li {
        color: #252525;
    }
    blockquote {
        background: #f8f4e9;
        color: #4a463d;
    }
    table {
        display: table;
        background: #fff;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .spell-table th, .spell-table td {
        padding: 5px 10px;
    }
    .spell-table .ability-icon {
        width: 22px;
        height: 22px;
        margin-right: 5px;
    }
    .attribute-icon {
        width: 20px;
        height: 20px;
        margin-right: 4px;
    }
    th, td {
        border-color: #c8c1af;
        color: #242424;
    }
    th {
        background: #efe8d5;
        color: #5a4516;
    }
    tr:nth-child(even) {
        background: #f8f7f3;
    }
    .wiki-infobox {
        background: #fff;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .wiki-infobox img {
        background: #f4f4f2;
    }
    .wiki-caption {
        color: #624a17;
    }
    .item-link {
        color: #242424;
    }
    .item-link img {
        background: #f4f4f2;
        border-color: #d3c7a3;
    }
    .highlight-box {
        background: #fff6f2;
        border-color: #d35439;
    }
    footer {
        color: #555;
    }
    footer a {
        color: #654a11;
    }
    li {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
