.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: var(--header-h);
    border-bottom: 1px solid transparent;
    transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}

.site-header.is-scrolled,
body:not([data-page="home"]) .site-header {
    background: rgba(7, 8, 11, .86);
    border-color: var(--line);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: 100%;
    gap: 32px;
}

.brand {
    position: relative;
    z-index: 2;
    width: 132px;
}

.brand img {
    width: 132px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(0,0,0,.45));
    transition: transform .35s var(--ease);
}

.brand:hover img {
    transform: scale(1.04) rotate(-1deg);
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.main-nav a {
    position: relative;
    padding: 10px 14px;
    color: var(--text-soft);
    font-size: .9rem;
    font-weight: 700;
    transition: color .2s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    border-radius: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s var(--ease);
    box-shadow: 0 0 12px var(--accent-glow);
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--text);
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-toggle {
    display: none;
}

.button {
    position: relative;
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: -.01em;
    overflow: hidden;
    isolation: isolate;
    transition: transform .22s var(--ease), border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.18), transparent 70%);
    transform: translateX(-130%);
    transition: transform .6s var(--ease);
}

.button:hover::before {
    transform: translateX(130%);
}

.button:hover {
    transform: translateY(-2px);
}

.button:active {
    transform: translateY(0) scale(.985);
}

.button:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.wiki-search input:focus-visible,
.nav-toggle:focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 3px;
}

.button--primary {
    background: linear-gradient(135deg, #bd2028, #e1363d);
    border-color: rgba(255, 123, 128, .35);
    box-shadow: var(--shadow-red), inset 0 1px rgba(255,255,255,.14);
}

.button--primary:hover {
    background: linear-gradient(135deg, #cf2630, #f0464d);
    box-shadow: 0 14px 42px rgba(211,38,46,.34), inset 0 1px rgba(255,255,255,.18);
}

.button--ghost {
    border-color: var(--line);
    background: rgba(255,255,255,.035);
}

.button--ghost:hover {
    border-color: rgba(211,38,46,.35);
    background: rgba(211,38,46,.09);
}

.button--glass {
    border-color: rgba(255,255,255,.18);
    background: rgba(9,10,14,.44);
    backdrop-filter: blur(12px);
}

.button--large {
    min-height: 54px;
    padding-inline: 28px;
    border-radius: 14px;
}

.button--compact {
    min-height: 40px;
    padding-inline: 16px;
    border-radius: 10px;
    font-size: .86rem;
}

.button--wide {
    width: 100%;
    min-height: 52px;
}

.button[disabled] {
    cursor: wait;
    opacity: .65;
    transform: none;
}

.glass-panel {
    border: 1px solid var(--line);
    background:
        linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018)),
        rgba(10, 12, 17, .72);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}

.alert {
    padding: 13px 15px;
    margin-bottom: 18px;
    border: 1px solid;
    border-radius: 10px;
    font-size: .9rem;
}

.alert--error {
    color: #ffc3c5;
    border-color: rgba(255,97,103,.35);
    background: rgba(255,97,103,.08);
}

.alert--success {
    color: #b9f3ca;
    border-color: rgba(101,201,135,.3);
    background: rgba(101,201,135,.08);
}

.field {
    display: grid;
    gap: 8px;
}

.field > span:first-child {
    color: var(--text-soft);
    font-size: .84rem;
    font-weight: 800;
}

.field small {
    color: var(--text-muted);
    font-size: .76rem;
}

.field input,
.field select,
.wiki-search input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: rgba(3,4,7,.58);
    transition: border .2s ease, box-shadow .2s ease, background .2s ease;
}

.field input:hover,
.field select:hover,
.wiki-search input:hover {
    border-color: rgba(255,255,255,.16);
}

.field input:focus,
.field select:focus,
.wiki-search input:focus {
    border-color: rgba(211,38,46,.56);
    background: rgba(7,8,11,.88);
    box-shadow: 0 0 0 4px rgba(211,38,46,.09);
    outline: none;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 80px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    border: 0;
    color: #df8f93;
    background: transparent;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 800;
    transform: translateY(-50%);
}

.form-stack {
    display: grid;
    gap: 17px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.055);
    color: var(--text-soft);
    font-size: .72rem;
    font-weight: 800;
}

.tag--accent {
    background: rgba(211,38,46,.12);
    color: #f19a9e;
}

.loading-state {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
}

.spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,.12);
    border-top-color: var(--accent-bright);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    padding: 52px 24px;
    border: 1px dashed rgba(255,255,255,.12);
    border-radius: var(--radius-lg);
    text-align: center;
    background: rgba(255,255,255,.018);
}

.empty-state--compact {
    padding: 24px 12px;
}

.empty-state__symbol,
.empty-state > span:first-child {
    display: inline-grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin-bottom: 15px;
    border: 1px solid rgba(211,38,46,.26);
    border-radius: 50%;
    color: #f19094;
    background: rgba(211,38,46,.09);
    font-size: 1.35rem;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    margin: 0 auto 18px;
    max-width: 520px;
    color: var(--text-muted);
}

.skeleton {
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,.035), rgba(255,255,255,.08), rgba(255,255,255,.035));
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

.skeleton--line {
    height: 42px;
    margin-bottom: 8px;
}

@keyframes shimmer {
    to { background-position: -200% 0; }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}

.pagination button {
    min-width: 42px;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text-soft);
    background: rgba(255,255,255,.03);
    cursor: pointer;
}

.pagination button.is-active {
    color: #fff;
    border-color: rgba(211,38,46,.45);
    background: rgba(211,38,46,.18);
}

.back-link {
    display: inline-flex;
    margin-bottom: 22px;
    color: #db8d91;
    font-size: .86rem;
    font-weight: 800;
}

.toast-region {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 300;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 40px));
}

.toast {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15,17,22,.96);
    box-shadow: var(--shadow-lg);
    animation: toast-in .3s var(--ease) both;
}

.toast--error {
    border-color: rgba(255,97,103,.35);
}

.toast--success {
    border-color: rgba(101,201,135,.35);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
}

.status-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #737780;
}

.status-dot.is-online {
    background: var(--success);
    box-shadow: 0 0 14px rgba(101,201,135,.7);
}

.site-footer {
    position: relative;
    padding: 60px 0 22px;
    border-top: 1px solid var(--line);
    background: #07080b;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 44px;
}

.site-footer__grid > div:first-child p {
    max-width: 360px;
}

.site-footer__logo {
    width: 140px;
    margin-bottom: 10px;
}

.site-footer h2 {
    margin: 6px 0 16px;
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #d6878b;
}

.site-footer a,
.site-footer p {
    display: block;
    margin: 0 0 9px;
    color: var(--text-muted);
    font-size: .86rem;
}

.site-footer a:hover {
    color: var(--text);
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 42px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: #60636b;
    font-size: .75rem;
}

.server-status-badge {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(8, 10, 14, .64);
    color: var(--text-soft);
    white-space: nowrap;
    backdrop-filter: blur(12px);
}

.server-status-badge__dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #737780;
    box-shadow: none;
    transition: background .2s ease, box-shadow .2s ease;
}

.server-status-badge__label {
    color: var(--text-soft);
    font-size: .76rem;
    font-weight: 700;
}

.server-status-badge__value {
    color: var(--text-muted);
    font-size: .76rem;
    font-weight: 900;
    transition: color .2s ease;
}

.server-status-badge.is-online .server-status-badge__dot,
.status-line.is-online .server-status-badge__dot {
    background: var(--success);
    box-shadow: 0 0 12px rgba(101, 201, 135, .65);
}

.server-status-badge.is-online .server-status-badge__value,
.status-line.is-online [data-game-server-value] {
    color: var(--success);
}

.server-status-badge.is-offline .server-status-badge__dot,
.status-line.is-offline .server-status-badge__dot {
    background: var(--danger);
    box-shadow: 0 0 12px rgba(255, 97, 103, .5);
}

.server-status-badge.is-offline .server-status-badge__value,
.status-line.is-offline [data-game-server-value] {
    color: var(--danger);
}

