/* Darkoria website theme: dark medieval fantasy. Original work, no third-party assets. */

:root {
    --bg: #0a090c;
    --bg-raised: #121017;
    --panel: #18141d;
    --panel-edge: #241d29;
    --border: #3b2f23;
    --border-bright: #6b5433;
    --gold: #c9a45c;
    --gold-bright: #ecd08c;
    --gold-dim: #8a7040;
    --blood: #8e2222;
    --blood-bright: #c23b3b;
    --text: #e4dac7;
    --text-muted: #9c9180;
    --success: #6fae62;
    --info: #6f94b8;
    --focus: #ecd08c;

    --font-display: "Cinzel", "Trajan Pro", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

    --radius: 4px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    --container: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    background: #000;
}

a {
    color: var(--gold);
    text-decoration: none;
}

a:hover {
    color: var(--gold-bright);
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

img {
    max-width: 100%;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--gold);
    color: #140f08;
}

.skip-link:focus {
    top: 1rem;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.container--narrow {
    max-width: 520px;
}

.muted {
    color: var(--text-muted);
}

/* ---------- Page layout (classic Tibia website structure) ---------- */

/* Big banner behind the top of the page. It scrolls away with the page and fades into the black body. */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: max(42.4vw, 600px);
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.75) 80%, #000 100%),
        url("../header/banner-web.jpg") center top / cover no-repeat;
    pointer-events: none;
}

.page {
    position: relative;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

.page__body {
    padding-top: 16px;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 180px;
    grid-template-areas: "menu main side";
    gap: 20px;
    align-items: start;
}

.menu-column {
    grid-area: menu;
    width: 180px;
}

.content-column {
    grid-area: main;
}

.side-column {
    grid-area: side;
    width: 180px;
}

/* The logo is a bit wider than the column and overhangs it evenly on both sides. */
.menu-column__logo {
    display: block;
    width: 220px;
    margin: 0 -20px 6px;
}

.menu-column__logo img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.85));
}

/* Temporary backdrop for the pages not yet rebuilt with the center column boxes. */
.content-legacy {
    min-height: 400px;
    padding-bottom: 2rem;
    background: rgba(8, 7, 10, 0.9);
    border: 1px solid var(--border);
}

/* ---------- Center column boxes ---------- */

:root {
    --cbox-bg: rgba(14, 13, 16, 0.94);
    --cbox-side: #81807f;
    --cbox-side-inner: #31312e;
    --cbox-text: #d7c9a3;
}

.cbox {
    position: relative;
    margin-bottom: 18px;
}

.cbox__edge {
    position: relative;
    height: 6px;
    background: url("../content/border-1.gif") repeat-x;
}

.cbox__edge::before,
.cbox__edge::after {
    content: "";
    position: absolute;
    z-index: 1;
    width: 17px;
    height: 17px;
    background: no-repeat;
}

.cbox__edge--top::before { top: 0; left: 0; background-image: url("../content/corner-tl.gif"); }
.cbox__edge--top::after { top: 0; right: 0; background-image: url("../content/corner-tr.gif"); }
.cbox__edge--bottom::before { bottom: 0; left: 0; background-image: url("../content/corner-bl.gif"); }
.cbox__edge--bottom::after { bottom: 0; right: 0; background-image: url("../content/corner-br.gif"); }

.info-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 18px;
    padding: 7px 20px;
    background: var(--cbox-bg);
    border-left: 1px solid var(--cbox-side);
    border-right: 1px solid var(--cbox-side);
    box-shadow: inset 2px 0 0 var(--cbox-side-inner), inset -2px 0 0 var(--cbox-side-inner);
    font-family: var(--menu-font);
    font-size: 12px;
    line-height: 16px;
}

.info-bar__social {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-bar__social li {
    display: flex;
}

.info-bar__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cbox-text);
}

.info-bar__link:hover {
    color: #fff;
    text-decoration: none;
}

/* Social item without a URL yet: same look, but no hover since it is not clickable. */
.info-bar__link--static:hover {
    color: var(--cbox-text);
}

.info-bar__online strong {
    color: var(--gold-bright);
}

/* Box body with the title bar and parchment content (News Ticker, Featured Article...). */
:root {
    --parchment-odd: #f1e0c6;
    --parchment-even: #d4c0a1;
    --parchment-text: #3b2a14;
    --parchment-hover: #e6d3b3;
    --parchment-link: #004294;
}

.cbox__title,
.cbox__content {
    border-left: 1px solid var(--cbox-side);
    border-right: 1px solid var(--cbox-side);
    box-shadow: inset 2px 0 0 var(--cbox-side-inner), inset -2px 0 0 var(--cbox-side-inner);
}

.cbox__title {
    height: 28px;
    padding-left: 8px;
    background: url("../content/title-background-green.gif") repeat-x 0 2px, #1c2a24;
}

.cbox__headline {
    margin: 0;
    line-height: 0;
}

.cbox__content {
    padding: 4px 3px;
    background: url("../content/scroll.gif");
    color: var(--parchment-text);
    font-family: var(--menu-font);
    font-size: 12px;
    line-height: 16px;
}

.ticker__row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding: 4px 8px 4px 6px;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ticker__row--odd {
    background: var(--parchment-odd);
}

.ticker__row--even {
    background: var(--parchment-even);
}

.ticker__row:hover {
    background: var(--parchment-hover);
}

.ticker__icon {
    flex: none;
}

/* Collapsed rows show one line cut with "..."; the open row shows the whole text. */
.ticker__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ticker__row[aria-expanded="true"] .ticker__text {
    white-space: normal;
}

.ticker__date {
    margin-right: 2px;
}

.ticker__extend {
    flex: none;
    width: 12px;
    height: 12px;
    margin-top: 2px;
    background: url("../general/plus.gif") no-repeat;
}

.ticker__row[aria-expanded="true"] .ticker__extend {
    background-image: url("../general/minus.gif");
}

.ticker__empty {
    margin: 0;
    padding: 4px 8px;
}

.featured__body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 14px;
}

.featured__thumb {
    flex: none;
    border: 1px solid #5a4630;
}

.featured__text {
    margin: 0;
    line-height: 18px;
}

.featured__text a {
    color: var(--parchment-link);
}

.featured__text a:hover {
    color: #0063dc;
}

@media (max-width: 560px) {
    .featured__body {
        flex-direction: column;
        align-items: center;
    }
}

.latest-news__body {
    padding: 10px 12px;
}

/* Inner table with the classic drop shadow on the right and bottom edges. */
.inner-table {
    padding: 0 4px 5px 0;
    background:
        url("../content/table-shadow-rt.gif") right top no-repeat,
        url("../content/table-shadow-bl.gif") left bottom no-repeat,
        url("../content/table-shadow-br.gif") right bottom no-repeat,
        url("../content/table-shadow-rm.gif") right 5px repeat-y,
        url("../content/table-shadow-bm.gif") left bottom repeat-x;
}

.inner-table__content {
    padding: 3px;
    background: var(--parchment-even);
    border: 1px solid #faf0d7;
}

.news-headline {
    margin: 0;
    height: 28px;
    background: url("../news/newsheadline_background.gif") repeat-x;
    color: #fff;
    font-family: var(--menu-font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 28px;
    text-align: center;
}

.guild-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
    padding: 10px 4px 8px;
    list-style: none;
    text-align: center;
}

.guild-card__link {
    display: block;
    color: var(--parchment-link);
    font-weight: 700;
}

.guild-card__link:hover {
    color: #0063dc;
}

.guild-card__emblem {
    display: block;
    margin: 0 auto 4px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.12);
}

.guild-card__kills {
    display: block;
}

@media (max-width: 560px) {
    .guild-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 14px;
    }
}

.news-entry {
    margin-top: 16px;
}

.news-entry__header {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    background: url("../news/newsheadline_background.gif") repeat-x;
    color: #fff;
    font-family: var(--menu-font);
    font-size: 12px;
}

.news-entry__icon {
    flex: none;
}

.news-entry__headline {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    letter-spacing: normal;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.news-entry__body {
    padding: 10px 6px 0;
}

.news-entry__body p {
    margin: 0 0 10px;
}

.news-entry__ornament {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 4px auto 0;
}

/* ---------- Left column boxes ---------- */

:root {
    --menu-sub-bg: #0d2e2b;
    --menu-sub-bg-hover: #1e4a45;
    --menu-sub-text: #d7c9a3;
    --menu-font: Verdana, Arial, "Trebuchet MS", sans-serif;
}

.box {
    width: 180px;
    margin-bottom: 4px;
}

.box__top,
.box__bottom {
    height: 12px;
    background: url("../general/box-top.gif") no-repeat;
}

.box__bottom {
    background-image: url("../general/box-bottom.gif");
}

.box__body {
    background:
        url("../general/chain.gif") 6px 0 repeat-y,
        url("../general/chain.gif") 167px 0 repeat-y,
        url("../loginbox/loginbox-textfield-background.gif") center 0 repeat-y;
}

.loginbox__body {
    padding: 4px 0;
}

.medium-button {
    display: block;
    width: 150px;
    height: 37px;
    margin: 0 auto;
    background: url("../buttons/mediumbutton.gif") no-repeat;
}

.medium-button:hover {
    background-image: url("../buttons/mediumbutton-over.gif");
}

.medium-button img {
    display: block;
}

.loginbox__create {
    display: block;
    width: 124px;
    height: 11px;
    margin: 6px auto 2px;
    background: url("../loginbox/loginbox-font-create-account.gif") no-repeat;
}

.loginbox__create:hover {
    background-image: url("../loginbox/loginbox-font-create-account-over.gif");
}

/* ---------- Right column boxes ---------- */

.side-box {
    margin-bottom: 12px;
}

.side-box__title {
    width: 170px;
    height: 32px;
    margin: 0 5px;
    background: url("../menu/button-background.gif") no-repeat;
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 15px;
    line-height: 32px;
    letter-spacing: 0.06em;
    text-align: center;
    text-shadow: 1px 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.9);
}

.side-box__title a {
    color: inherit;
}

.side-box__title a:hover {
    color: #fff;
    text-decoration: none;
}

.side-box__body {
    padding: 0 13px;
    background:
        url("../general/chain.gif") 6px 0 repeat-y,
        url("../general/chain.gif") 167px 0 repeat-y;
}

.side-list {
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--menu-sub-bg);
}

.side-card {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 4px 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.45);
    font-family: var(--menu-font);
}

.side-card:last-child {
    border-bottom: 0;
}

.side-card:nth-child(even) {
    background: rgba(255, 255, 255, 0.04);
}

.side-card__info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.side-card__name {
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 15px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.side-card__name:hover {
    color: var(--gold-bright);
    text-decoration: none;
}

.side-card__meta {
    color: var(--menu-sub-text);
    font-size: 10px;
    line-height: 14px;
}

.side-card__voc {
    flex: none;
    width: 12px;
    height: 12px;
    object-fit: contain;
    image-rendering: pixelated;
}

.side-card__emblem {
    flex: none;
    border-radius: 6px;
}

.side-box__empty {
    margin: 0;
    padding: 8px;
    background: var(--menu-sub-bg);
    color: var(--menu-sub-text);
    font-family: var(--menu-font);
    font-size: 11px;
}

/* ---------- Left column menu ---------- */

.menu__button {
    position: relative;
    display: block;
    width: 170px;
    height: 32px;
    margin: 0 5px;
    padding: 0;
    border: 0;
    background: url("../menu/button-background.gif") no-repeat;
    cursor: pointer;
}

.menu__button:hover {
    background-image: url("../menu/button-background-over.gif");
}

.menu__lights {
    position: absolute;
    inset: 3px;
    visibility: hidden;
    background:
        url("../menu/green-light.gif") left top no-repeat,
        url("../menu/green-light.gif") left bottom no-repeat,
        url("../menu/green-light.gif") right top no-repeat;
}

.menu__category.is-open .menu__lights {
    visibility: visible;
}

.menu__icon {
    position: absolute;
    top: 0;
    left: 6px;
    width: 32px;
    height: 32px;
    background: no-repeat;
}

.menu__label {
    position: absolute;
    top: 5px;
    left: 34px;
    width: 116px;
    height: 22px;
    background: no-repeat;
}

.menu__extend {
    position: absolute;
    top: 10px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: url("../general/plus.gif") no-repeat;
}

.menu__category.is-open .menu__extend {
    background-image: url("../general/minus.gif");
}

.menu__icon--news { background-image: url("../menu/icon-news.gif"); }
.menu__icon--account { background-image: url("../menu/icon-account.gif"); }
.menu__icon--community { background-image: url("../menu/icon-community.gif"); }
.menu__icon--library { background-image: url("../menu/icon-library.gif"); }
.menu__icon--shop { background-image: url("../menu/icon-shops.gif"); }
.menu__label--news { background-image: url("../menu/label-news.gif"); }
.menu__label--account { background-image: url("../menu/label-account.gif"); }
.menu__label--community { background-image: url("../menu/label-community.gif"); }
.menu__label--library { background-image: url("../menu/label-library.gif"); }
.menu__label--shop { background-image: url("../menu/label-shops.gif"); }

.menu__submenu {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu__category.is-open .menu__submenu {
    display: block;
}

.menu__item {
    background:
        url("../general/chain.gif") 6px 0 repeat-y,
        url("../general/chain.gif") 167px 0 repeat-y;
}

.menu__form {
    margin: 0;
}

.menu__link {
    display: block;
    width: 154px;
    margin: 0 13px;
    padding: 2px 4px 2px 22px;
    border: 0;
    background: var(--menu-sub-bg) no-repeat 7px center;
    color: var(--menu-sub-text);
    font-family: var(--menu-font);
    font-size: 11px;
    line-height: 16px;
    text-align: left;
    cursor: pointer;
}

.menu__link:hover {
    background-color: var(--menu-sub-bg-hover);
    color: #fff;
    text-decoration: none;
}

.menu__item.is-current .menu__link {
    background-image: url("../menu/icon-activesubmenu.gif");
    color: #fff;
}

/* ---------- Page content ---------- */

.page-header {
    padding: 2.75rem 0 1.75rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(142, 34, 34, 0.12), transparent);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.page-header__title {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--gold-bright);
    text-shadow: 0 0 22px rgba(236, 208, 140, 0.2);
}

.page-header__subtitle {
    margin: 0.4rem 0 0;
    color: var(--text-muted);
}

.section {
    margin-top: 3rem;
}

.section__title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    color: var(--gold-bright);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.section__title::before,
.section__title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
}

.panel {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, var(--panel-edge), var(--panel) 40%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(236, 208, 140, 0.08), var(--shadow);
}

.panel__title {
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    font-size: 1.1rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border-bottom: 1px solid var(--border);
}

.panel__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.panel__heading .panel__title {
    margin: 0;
    padding: 0;
    border: 0;
}

.panel__title--spaced {
    margin-top: 1.75rem;
}

.action-list {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.container--medium {
    max-width: 680px;
}

.table__action {
    text-align: right;
    white-space: nowrap;
}

/* ---------- Choice cards (radio buttons) ---------- */

.choice-group {
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    border: 0;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.6rem;
}

.choice-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice {
    position: relative;
    display: block;
    cursor: pointer;
}

.choice__input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.choice__label {
    display: block;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    background: #0c0a0f;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.choice:hover .choice__label {
    border-color: var(--gold);
    color: var(--gold-bright);
}

.choice__input:checked + .choice__label {
    border-color: var(--gold);
    background: linear-gradient(180deg, rgba(163, 41, 31, 0.55), rgba(110, 21, 21, 0.55));
    color: #fff3d6;
    box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.25), 0 0 14px rgba(194, 59, 59, 0.35);
}

.choice__input:focus-visible + .choice__label {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 1.5rem;
    align-items: start;
}

.account-grid > .panel {
    margin-bottom: 0;
}

/* One card per row, each using the full content width (/account). */
.account-grid--stacked {
    grid-template-columns: minmax(0, 1fr);
}

.account-grid--stacked .action-list {
    grid-template-columns: repeat(auto-fill, minmax(12rem, 16rem));
}

/* Recovery Key, shown once right after it is created. */
.recovery-key {
    margin: 0.5rem 0 1.25rem;
    color: var(--gold);
    font-family: Consolas, "Courier New", monospace;
    font-size: 1.6rem;
    letter-spacing: 0.12em;
    text-align: center;
    overflow-wrap: anywhere;
    user-select: all;
}

/* A card that spans every column of the grid (Recent Deaths on /character). */
.account-grid__full {
    grid-column: 1 / -1;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(ellipse 55% 60% at 50% 45%, rgba(142, 34, 34, 0.35), transparent 70%),
        linear-gradient(180deg, #0d0b10, #0a090c);
}

.hero__glow {
    position: absolute;
    inset: auto 0 -60% 0;
    height: 120%;
    background: radial-gradient(ellipse 45% 50% at 50% 50%, rgba(236, 208, 140, 0.12), transparent 70%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
}

.hero__eyebrow {
    margin: 0;
    color: var(--gold-dim);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
}

.hero__title {
    margin: 0.5rem 0 0.25rem;
    font-size: clamp(3rem, 11vw, 7rem);
    letter-spacing: 0.18em;
    line-height: 1;
    color: var(--gold-bright);
    background: linear-gradient(180deg, #fff1c8 0%, #ecd08c 38%, #b78a3e 62%, #6b4d20 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.7)) drop-shadow(0 0 30px rgba(194, 59, 59, 0.35));
}

.hero__tagline {
    margin: 1rem auto 2.25rem;
    max-width: 36rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-style: italic;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ---------- Buttons ---------- */

.button {
    display: inline-block;
    padding: 0.6rem 1.3rem;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    background: var(--bg-raised);
    color: var(--text);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.button:hover {
    text-decoration: none;
    color: var(--gold-bright);
}

.button--primary {
    border-color: #d9b56a;
    background: linear-gradient(180deg, #a3291f, #6e1515);
    color: #fff3d6;
    box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.35), 0 0 0 1px #2a0b09, 0 6px 16px rgba(142, 34, 34, 0.35);
}

.button--primary:hover {
    background: linear-gradient(180deg, #bb3327, #82191a);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.45), 0 0 0 1px #2a0b09, 0 0 22px rgba(194, 59, 59, 0.5);
}

.button--ghost {
    background: rgba(10, 9, 12, 0.6);
    color: var(--gold);
}

.button--large {
    padding: 0.95rem 2.2rem;
    font-size: 1rem;
}

.button--block {
    display: block;
    width: 100%;
}

/* ---------- Stat cards ---------- */

.stat-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: -2.5rem;
    position: relative;
}

.stat-cards--compact {
    margin-top: 0;
    margin-bottom: 1.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-header + .container > .stat-cards {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.4rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, #221b27, #15111a);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(236, 208, 140, 0.12), var(--shadow);
}

.stat-card__label {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.stat-card__value {
    margin: 0.35rem 0 0.4rem;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.stat-card__link,
.stat-card__note {
    font-size: 0.85rem;
}

.stat-card__note {
    color: var(--text-muted);
}

.status--online {
    color: var(--success);
}

.status--offline {
    color: var(--blood-bright);
}

.status--unknown {
    color: var(--text-muted);
}

/* ---------- News ---------- */

.news-item__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.news-item__title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gold-bright);
}

.news-item__date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.news-item p {
    margin: 0 0 0.75rem;
}

.news-item p:last-child {
    margin-bottom: 0;
}

/* ---------- Forms ---------- */

.form__field {
    margin-bottom: 1.15rem;
}

.form__label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form__input {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    background: #0c0a0f;
    color: var(--text);
    font: inherit;
}

.form__input:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.2);
}

.form__input[aria-invalid="true"] {
    border-color: var(--blood-bright);
}

.form__hint {
    margin: 0.3rem 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form__error {
    margin: 0.3rem 0 0;
    color: #ec7b7b;
    font-size: 0.9rem;
}

.form__footer {
    margin: 1.25rem 0 0;
    text-align: center;
    color: var(--text-muted);
}

.search-bar {
    display: flex;
    gap: 0.75rem;
}

/* ---------- Alerts and badges ---------- */

.alert {
    margin: 1.25rem 0;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: var(--radius);
    background: var(--bg-raised);
}

.alert--success {
    border-left-color: var(--success);
}

.alert--error {
    border-left-color: var(--blood-bright);
}

.alert--info {
    border-left-color: var(--info);
}

.badge {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border: 1px solid var(--border-bright);
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

.badge--premium {
    border-color: var(--gold);
    color: var(--gold-bright);
    background: rgba(201, 164, 92, 0.12);
}

.badge--danger {
    border-color: var(--blood-bright);
    color: #ec7b7b;
}

/* ---------- Details and tables ---------- */

.details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.55rem 1.25rem;
    margin: 0;
}

.details dt {
    color: var(--text-muted);
}

.details dd {
    margin: 0;
}

.details--inline {
    margin-bottom: 1.25rem;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(59, 47, 35, 0.7);
}

.table th {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom-color: var(--border-bright);
}

.table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.table tbody tr:hover {
    background: rgba(201, 164, 92, 0.06);
}

.table--ranking .rank {
    width: 4rem;
    color: var(--gold-dim);
    font-family: var(--font-display);
    font-weight: 700;
}

.table--ranking tbody tr:nth-child(-n + 3) .rank {
    color: var(--gold-bright);
}

/* ---------- Highscores ---------- */

.highscores {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.category-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-list__link {
    display: block;
    padding: 0.45rem 0.7rem;
    border-left: 2px solid transparent;
    color: var(--text);
}

.category-list__link:hover {
    text-decoration: none;
    color: var(--gold-bright);
    background: rgba(201, 164, 92, 0.06);
}

.category-list__link.is-active {
    border-left-color: var(--gold);
    color: var(--gold-bright);
    background: rgba(201, 164, 92, 0.1);
}

/* ---------- Pagination ---------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.25rem;
}

.pagination__link {
    min-width: 2.2rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    color: var(--text);
}

.pagination__link:hover {
    text-decoration: none;
    border-color: var(--gold);
    color: var(--gold-bright);
}

.pagination__link.is-current {
    border-color: var(--gold);
    background: rgba(201, 164, 92, 0.15);
    color: var(--gold-bright);
}

.pagination__gap {
    padding: 0.35rem 0.25rem;
    color: var(--text-muted);
}

/* ---------- Character page ---------- */

.death-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.death-list__item {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(59, 47, 35, 0.7);
}

.death-list__item:last-child {
    border-bottom: 0;
}

.death-list__time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.steps {
    margin: 0;
    padding-left: 1.25rem;
}

.steps li {
    margin-bottom: 0.5rem;
}

.debug {
    overflow-x: auto;
    padding: 0.75rem;
    background: #050406;
    border: 1px solid var(--border);
    color: #ec7b7b;
    white-space: pre-wrap;
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 2rem;
    padding: 1.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.site-footer__brand {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    color: var(--gold-dim);
    letter-spacing: 0.3em;
}

.site-footer__text {
    margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .account-grid,
    .highscores {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Narrower screens: the right column moves under the left one. */
@media (max-width: 1060px) {
    .page__body {
        grid-template-columns: 180px minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "menu main"
            "side main";
    }
}

@media (max-width: 760px) {
    .page__body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas:
            "menu"
            "main"
            "side";
    }

    .menu-column,
    .side-column {
        justify-self: center;
    }
}

@media (max-width: 720px) {
    .stat-cards,
    .stat-cards--compact {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 1.5rem;
    }

    .hero {
        padding: 4rem 0 3.5rem;
    }

    .search-bar {
        flex-direction: column;
    }

    .details {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.1rem;
    }

    .details dd {
        margin-bottom: 0.6rem;
    }

    .death-list__item {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
