* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --motion-soft-duration: 0.38s;
    --motion-overlay-duration: 0.24s;
    --motion-soft-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --surface-blur-strength: 0px;
    --panel-blur-strength: 4px;
    --decorative-animation-loops: 1;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #07111C;
    background-image:
        radial-gradient(circle at top left, rgba(255, 223, 143, 0.08), transparent 26%),
        radial-gradient(circle at top right, rgba(84, 116, 255, 0.08), transparent 22%),
        linear-gradient(135deg, rgba(14, 16, 24, 0.82) 0%, rgba(18, 22, 33, 0.84) 42%, rgba(12, 15, 24, 0.88) 100%),
        url('/static/image/medieval-night-background.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    min-height: 100vh;
    padding: 15px;
    color: #fff9e7;
    font-size: 14px;
    overflow-x: hidden;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)), rgba(17, 21, 32, 0.94);
    border-radius: 28px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 223, 143, 0.12);
    position: relative;
    z-index: 30;
    overflow: visible;
}

.desktop-title {
    display: block;
    font-family: 'Cinzel', serif;
    color: #ffdf8f;
    font-size: 1.9em;
    margin-bottom: 20px;
    text-shadow: 0 0 12px rgba(255, 223, 143, 0.6);
    font-weight: 700;
    letter-spacing: 0.04em;
    position: relative;
}

.mobile-nav-header {
    display: none;
    justify-content: initial;
    align-items: center;
    margin-bottom: 5px;
    position: relative;
    padding: 0 6px;
    min-height: 50px;
}

.mobile-nav-header::after {
    content: '';
    display: block;
    width: 28px;
    height: 24px;
    flex: 0 0 28px;
}

.mobile-title {
    display: none;
    font-family: 'Cinzel', serif;
    color: #ffdf8f;
    text-align: center;
    text-shadow: 0 0 12px rgba(255, 223, 143, 0.6);
    font-weight: 700;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 6px;
    font-size: 1.55em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 16px;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 40;
    overflow: visible;
}

.site-nav,
.site-nav__secondary,
.site-nav__auth {
    overflow: visible;
}

.nav-left {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-left: 4px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 4px;
}

.nav-btn {
    padding: 8px 12px;
    background: linear-gradient(145deg, #2a2f42, #1e2332);
    color: #ffdf8f;
    border: 2px solid #3a3f5a;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    white-space: nowrap;
}

.nav-btn.active {
    background: linear-gradient(145deg, #ffdf8f, #e6c97d);
    color: #181c29;
    border-color: #ffdf8f;
    box-shadow: 0 0 15px rgba(255, 223, 143, 0.4);
}

.nav-btn[data-page]:disabled {
    cursor: default;
    pointer-events: none;
}

.nav-btn.nav-btn-locked {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    font-size: 14px;
    opacity: 0.88;
    color: #c9b4a8;
    border-color: rgba(165, 118, 96, 0.44);
    border-style: dashed;
    background:
        linear-gradient(145deg, rgba(51, 41, 43, 0.96), rgba(34, 30, 36, 0.98)),
        repeating-linear-gradient(
            -45deg,
            rgba(189, 120, 92, 0.12) 0,
            rgba(189, 120, 92, 0.12) 8px,
            rgba(126, 118, 122, 0.06) 8px,
            rgba(126, 118, 122, 0.06) 16px
        );
    box-shadow:
        inset 0 0 0 1px rgba(205, 177, 164, 0.06),
        0 8px 18px rgba(23, 16, 18, 0.18);
    letter-spacing: 0.4px;
}

.nav-btn.nav-btn-locked .nav-btn-lock {
    font-size: 12px;
    line-height: 1;
    opacity: 0.9;
    margin-left: -2px;
}

.nav-btn:not(.active):hover {
    background: linear-gradient(145deg, #32374e, #242940);
    border-color: rgba(255, 223, 143, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 223, 143, 0.2);
}

.nav-btn.active:hover {
    background: linear-gradient(145deg, #ffe6a8, #f0d58a);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 223, 143, 0.6);
}

.main-nav .nav-left .nav-btn[data-page="civ-plus"] {
    background: linear-gradient(145deg, #304957, #20323d);
    border-color: #587585;
    color: #dcecf0;
}

.main-nav .nav-left .nav-btn[data-page="civ-plus"]:not(.active):hover {
    background: linear-gradient(145deg, #395766, #27404c);
    border-color: #7094a6;
    box-shadow: 0 4px 15px rgba(76, 112, 124, 0.24);
}

.main-nav .nav-left .nav-btn[data-page="civ-plus"].active {
    background: linear-gradient(145deg, #84a6b4, #658595);
    border-color: #b4d1da;
    color: #14222a;
    box-shadow: 0 0 15px rgba(126, 164, 176, 0.34);
}

#horn-btn {
    background: linear-gradient(145deg, #3a2e2e, #2a1f1f);
    border: 2px solid #8b4513;
    color: #d4af37;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
    white-space: nowrap;
    min-width: 80px;
}

#horn-btn:hover:not(.horn-disabled) {
    background: linear-gradient(145deg, #4a3a3a, #3a2a2a);
    border-color: #a0522d;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

#horn-btn.horn-disabled {
    background: linear-gradient(145deg, #2a2525, #1a1515);
    border-color: #654321;
    color: #8b7355;
    cursor: not-allowed;
    opacity: 0.8;
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#horn-btn.pulse {
    animation: hornPulse 1.2s ease-in-out 4 alternate;
}

@keyframes hornPulse {
    from {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
    }
    to {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
    }
}

#horn-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(212, 175, 55, 0.1) 0%,
        rgba(139, 69, 19, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(45deg);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#horn-btn:hover:not(.horn-disabled)::before {
    animation: hornShine 1.5s ease-in-out;
}

@keyframes hornShine {
    0% {
        transform: rotate(45deg) translateX(-100%);
    }
    100% {
        transform: rotate(45deg) translateX(100%);
    }
}

.horn-popover[hidden],
.horn-popover [hidden] {
    display: none !important;
}

.horn-popover {
    position: fixed;
    z-index: 1200;
    box-sizing: border-box;
    width: min(290px, calc(100vw - 16px));
    padding: 13px;
    border: 1px solid #b88a32;
    border-radius: 11px;
    background: linear-gradient(145deg, #111f2d, #0a1622);
    color: #eef1f4;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 224, 138, 0.08);
}

.horn-popover::before {
    content: '';
    position: absolute;
    top: -5px;
    left: var(--horn-arrow-x, 50%);
    width: 9px;
    height: 9px;
    transform: translateX(-50%) rotate(45deg);
    border-top: 1px solid #b88a32;
    border-left: 1px solid #b88a32;
    background: #111f2d;
}

.horn-popover.is-above::before {
    top: auto;
    bottom: -5px;
    transform: translateX(-50%) rotate(225deg);
    background: #0a1622;
}

.horn-popover-header {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 11px;
}

.horn-popover-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(243, 201, 93, 0.4));
}

.horn-popover-header h2 {
    margin: 0 13px 2px 0;
    color: #ffdf89;
    font-size: 0.78rem;
    line-height: 1.2;
}

.horn-popover-header p,
.horn-popover-hint,
.horn-popover-success p {
    margin: 0;
    color: #aeb9c5;
    font-size: 0.62rem;
}

.horn-popover-close {
    align-self: flex-start;
    margin: -4px -3px 0 auto;
    padding: 0 3px;
    border: 0;
    background: none;
    color: #eef1f4;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}

.horn-input-row {
    display: flex;
    gap: 7px;
}

.horn-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

#horn-message {
    box-sizing: border-box;
    width: 100%;
    height: 34px;
    padding: 0 38px 0 9px;
    border: 1px solid #77613e;
    border-radius: 7px;
    background: #1b2837;
    color: #fff;
    font: inherit;
    font-size: 0.7rem;
}

#horn-message::placeholder {
    color: #c5cbd1;
    opacity: 1;
}

#horn-message:focus-visible,
.horn-popover button:focus-visible {
    outline: 2px solid #f3c95d;
    outline-offset: 2px;
}

#horn-message-count {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    color: #aeb9c5;
    font-size: 0.6rem;
    pointer-events: none;
}

#horn-popover-submit {
    display: grid;
    flex: 0 0 36px;
    height: 34px;
    place-items: center;
    padding: 3px;
    border: 1px solid #d7a748;
    border-radius: 7px;
    background: linear-gradient(145deg, #b47728, #6c4314);
    cursor: pointer;
}

#horn-popover-submit img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

#horn-popover-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.horn-popover-hint {
    margin-top: 7px;
}

.horn-success-banner {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    padding: 9px 10px;
    border: 1px solid #2f9a68;
    border-radius: 7px;
    background: rgba(26, 112, 71, 0.28);
    color: #a9edb9;
    font-weight: 700;
    font-size: 0.7rem;
}

.horn-success-banner span {
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 50%;
    background: #59c97e;
    color: #103c25;
}

@media (max-width: 480px) {
    .horn-popover {
        padding: 11px;
    }
    .horn-popover-header {
        gap: 6px;
    }
    .horn-popover-icon {
        width: 25px;
        height: 25px;
    }
    .horn-popover-header h2 {
        font-size: 0.74rem;
    }
}

.discord-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    background: linear-gradient(145deg, #5865F2, #4752c4) !important;
    border: 2px solid #7289da !important;
    color: white !important;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease !important;
    box-shadow: 0 3px 12px rgba(88, 101, 242, 0.3) !important;
}

.discord-btn svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.discord-btn-label {
    display: none;
}

.discord-btn:hover {
    background: linear-gradient(145deg, #4752c4, #3c45a5) !important;
    border-color: #5b6eae !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5) !important;
}

.auth-section {
    display: flex;
    align-items: center;
    position: relative;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-login-btn, .auth-register-btn {
    padding: 8px 14px;
    background: linear-gradient(145deg, #2a2f42, #1e2332);
    color: #ffdf8f;
    border: 2px solid #3a3f5a;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    min-width: 90px;
    white-space: nowrap;
}

.auth-login-btn {
    padding: 8px 11px;
    min-width: 74px;
}

.auth-login-btn:hover, .auth-register-btn:hover {
    background: linear-gradient(145deg, #3a3f5a, #2a2f42);
    border-color: #ffdf8f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 223, 143, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    background: rgba(30, 35, 50, 0.8);
    padding: 5px 12px;
    border-radius: 8px;
    border: 2px solid rgba(255, 223, 143, 0.2);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.user-info:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 223, 143, 0.42);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.user-info:focus-visible {
    outline: none;
    border-color: rgba(255, 223, 143, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 223, 143, 0.18);
}

.user-info.is-open {
    border-color: rgba(255, 223, 143, 0.62);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
    background: rgba(36, 42, 60, 0.96);
}

#username-display {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #ffdf8f;
    font-weight: 600;
    font-size: 13px;
}

#username-display > .user-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
}

.user-role.admin {
    background: linear-gradient(145deg, #ff6b6b, #c82333);
    color: white;
}

.user-role.user {
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
}

.user-icon {
    font-size: 14px;
}

.user-info.logged-in {
    animation: glow 2.4s ease-in-out var(--decorative-animation-loops) alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 4px rgba(255, 223, 143, 0.3); }
    to { box-shadow: 0 0 12px rgba(255, 223, 143, 0.6); }
}

.auth-logout-btn {
    background: #121d2a;
    color: #c6c4c0;
    border: 1px solid rgba(255, 223, 143, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.auth-logout-btn:hover {
    background: rgba(255, 200, 80, 0.06);
    color: #ffd56a;
    border-color: rgba(255, 223, 143, 0.2);
    transform: none;
    box-shadow: none;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, 92vw);
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(35, 41, 58, 0.98) 0%, rgba(20, 25, 37, 0.98) 100%);
    border: 1px solid rgba(255, 223, 143, 0.22);
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.34);
    z-index: 2200;
}

.profile-dropdown.is-open {
    display: block;
}

.profile-summary-compact {
    margin-bottom: 10px;
    padding: 8px 10px;
    gap: 4px;
    border-radius: 10px;
}

.profile-dropdown .change-password-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-dropdown .change-password-form input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(33, 39, 56, 0.92);
    border: 1px solid rgba(126, 136, 164, 0.24);
    border-radius: 12px;
    color: #fff9e7;
    font-size: 14px;
}

.profile-dropdown .change-password-form input::placeholder {
    color: #8a8fa3;
}

.profile-dropdown .change-password-form input:focus {
    outline: none;
    border-color: #ffdf8f;
    box-shadow: 0 0 0 4px rgba(255, 223, 143, 0.08);
}

.profile-dropdown .change-password-form button {
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #7ac7ff, #4a92dd);
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
    box-shadow: 0 16px 28px rgba(74, 146, 221, 0.2);
}

.profile-dropdown .change-password-form button:hover {
    transform: translateY(-1px);
    background: linear-gradient(145deg, #89d2ff, #5aa1eb);
    box-shadow: 0 4px 15px rgba(90, 161, 235, 0.45);
}

.profile-dropdown .error-message {
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 12px;
}

.profile-dropdown .profile-summary-label {
    font-size: 11px;
    letter-spacing: 0.06em;
}

.profile-dropdown .profile-summary-value,
.profile-dropdown .profile-role-badge {
    display: none;
}

.profile-dropdown .profile-actions {
    margin-top: 12px;
}

.player-dlc-profile {
    padding: 13px;
    margin: 10px 0;
    border: 1px solid rgba(255, 223, 143, .24);
    border-radius: 12px;
    background: rgba(11, 19, 31, .56);
    color: #f8edce;
}
#player-link-modal { z-index: 2300; }
.player-dlc-heading { font-weight: 700; margin-bottom: 8px; }
.player-dlc-note, .player-dlc-profile p { font-size: 12px; line-height: 1.45; margin: 7px 0; color: #c8c1ad; }
.player-dlc-form { display: grid; gap: 9px; margin-top: 10px; }
.player-dlc-option { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; }
.player-dlc-option input { width: 17px; height: 17px; accent-color: #f4c75a; }
.player-dlc-option input:disabled { cursor: not-allowed; }
.player-dlc-button, .player-link-form button {
    padding: 10px 12px; border: 0; border-radius: 9px; cursor: pointer;
    color: #261b04; background: #f4c75a; font-weight: 700;
}
.player-dlc-button:disabled { opacity: .5; cursor: not-allowed; }
.player-dlc-message.is-error, #player-link-error { color: #ff9b9b; }
.player-link-form { display: grid; gap: 9px; margin-top: 16px; }
.player-link-form select {
    padding: 11px; border-radius: 9px; border: 1px solid rgba(255, 223, 143, .3);
    color: #fff9e7; background: #202a38;
}

.page {
    display: none;
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.985);
}

.support-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 22px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 223, 143, 0.18);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 223, 143, 0.12), rgba(255, 223, 143, 0.03)),
        rgba(24, 29, 42, 0.92);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
}

.support-banner[hidden] {
    display: none !important;
}

.support-banner-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.support-banner-kicker {
    color: #ffdf8f;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.support-banner-text {
    color: rgba(255, 249, 231, 0.82);
    line-height: 1.5;
    font-size: 0.95rem;
}

.support-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.support-banner-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 223, 143, 0.28);
    background: linear-gradient(145deg, #ffdf8f, #e6c97d);
    color: #181c29;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 24px rgba(255, 223, 143, 0.2);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    cursor: pointer;
}

.support-banner-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 14px 28px rgba(255, 223, 143, 0.28);
}

.support-banner-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 249, 231, 0.18);
    color: #fff9e7;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.support-banner-option:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.support-banner-option-primary {
    background: linear-gradient(145deg, rgba(255, 223, 143, 0.2), rgba(230, 201, 125, 0.16));
    border-color: rgba(255, 223, 143, 0.3);
}

.support-banner-option-secondary {
    background: rgba(12, 16, 25, 0.88);
}

.support-donation-modal-content {
    max-width: 420px;
    text-align: center;
}

.support-donation-modal-text {
    margin: 10px 0 18px;
    color: rgba(255, 249, 231, 0.82);
    line-height: 1.5;
}

.support-donation-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-content.build-info-modal-content {
    width: min(100%, 460px);
    max-width: 460px;
    padding: 22px 22px 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 223, 143, 0.24);
    background:
        linear-gradient(180deg, rgba(48, 55, 77, 0.98), rgba(22, 28, 42, 0.98)),
        rgba(18, 22, 33, 0.96);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

@media (min-width: 900px) {
    .modal-content.build-info-modal-content {
        width: min(100%, 500px);
        max-width: 500px;
    }
}

.build-info-modal-content p {
    color: rgba(255, 249, 231, 0.84);
    line-height: 1.5;
}

.build-info-section {
    padding: 14px 0;
    border-top: 1px solid rgba(255, 223, 143, 0.12);
}

.build-info-section:first-of-type {
    padding-top: 0;
    border-top: none;
}

.build-info-section-title {
    margin-bottom: 8px;
    color: #ffdf8f;
    font-weight: 700;
}

.build-info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.build-info-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 223, 143, 0.18);
    color: #fff9e7;
    font-size: 0.84rem;
    line-height: 1.35;
}

.build-info-chip-rare {
    background: linear-gradient(145deg, rgba(255, 223, 143, 0.14), rgba(230, 201, 125, 0.08));
    border-color: rgba(255, 223, 143, 0.3);
}

.build-info-detail-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.build-info-detail-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 11px 9px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 223, 143, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.build-info-detail-row p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.4;
}

.build-info-detail-label {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(19, 25, 37, 0.7);
    border: 1px solid rgba(255, 223, 143, 0.2);
    color: #ffdf8f;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.build-info-number-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.build-info-number-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255, 223, 143, 0.16), rgba(230, 201, 125, 0.08));
    border: 1px solid rgba(255, 223, 143, 0.28);
    color: #fff5d1;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.support-banner-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 249, 231, 0.16);
    border-radius: 50%;
    background: rgba(12, 16, 25, 0.88);
    color: rgba(255, 249, 231, 0.82);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.support-banner-close:hover {
    transform: scale(1.06);
    border-color: rgba(255, 223, 143, 0.46);
    color: #ffdf8f;
}

.page.active {
    display: block;
    opacity: 1;
    transform: none;
}

.page.page-transition-in {
    animation: pageSwitchIn var(--motion-soft-duration) var(--motion-soft-ease) both;
}

.page.page-transition-in > * {
    animation: pageContentRise 0.5s var(--motion-soft-ease) both;
}

.scroll-top-button {
    position: fixed;
    right: max(24px, calc((100vw - 1180px) / 2 - 68px));
    bottom: 30px;
    z-index: 980;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 223, 143, 0.34);
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(43, 50, 70, 0.94), rgba(24, 29, 42, 0.98)),
        linear-gradient(145deg, rgba(255, 223, 143, 0.14), transparent 66%);
    color: #ffdf8f;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    cursor: pointer;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, 12px, 0) scale(0.94);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.scroll-top-button.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
}

.scroll-top-button:hover {
    transform: translate3d(0, -2px, 0) scale(1.04);
    border-color: rgba(255, 223, 143, 0.62);
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.38),
        0 0 18px rgba(255, 223, 143, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.scroll-top-button:focus-visible {
    outline: 2px solid rgba(255, 223, 143, 0.7);
    outline-offset: 4px;
}

.scroll-top-button:active {
    transform: translate3d(0, 0, 0) scale(0.97);
}

.ui-reveal {
    animation: uiRevealUp 0.46s var(--motion-soft-ease) both;
    animation-delay: calc(var(--ui-reveal-index, 0) * 0.045s);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pageSwitchIn {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes pageContentRise {
    from {
        opacity: 0;
        transform: translate3d(0, 16px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes uiRevealUp {
    from {
        opacity: 0;
        transform: translate3d(0, 14px, 0) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.modal {
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--motion-overlay-duration) ease, visibility 0s linear var(--motion-overlay-duration);
}

.modal.is-visible,
.modal.is-opening,
.modal.is-closing {
    display: flex !important;
}

.modal.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.modal.is-closing {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal.is-visible .modal-content,
.modal.is-opening .modal-content,
.auto-split-map-dialog {
    animation: modalLiftIn 0.34s var(--motion-soft-ease) both;
}

.modal.is-closing .modal-content {
    animation: modalLiftOut 0.18s ease both;
}

.auto-split-map-modal {
    animation: fadeIn 0.22s ease;
}

#player-comparison-modal .close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 5;
}

@keyframes modalLiftIn {
    from {
        opacity: 0;
        transform: translate3d(0, 22px, 0) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes modalLiftOut {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale(0.98);
    }
}

.players-list h2,
.page-title {
    margin-bottom: 20px;
    color: #ffdf8f;
    text-align: center;
    font-size: 1.7em;
    font-weight: 700;
}

.beta-corner-compact {
    position: absolute;
    top: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    right: 0;
    background: linear-gradient(145deg, #d4af37, #ffdf8f);
    color: #181c29;
    padding: 8px 16px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(255, 223, 143, 0.4);
    animation: float 4s ease-in-out var(--decorative-animation-loops);
    z-index: 2;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 85% 100%, 0 100%);
    transform: rotate(2deg);
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.beta-corner-compact:hover {
    filter: brightness(1.04);
    box-shadow: 0 8px 20px rgba(255, 223, 143, 0.45);
}

.beta-corner-compact:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 223, 143, 0.24), 0 8px 20px rgba(255, 223, 143, 0.45);
}


@keyframes float {
    0%, 100% { transform: rotate(2deg) translateY(0px); }
    50% { transform: rotate(2deg) translateY(-5px); }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
        font-size: 13px;
    }

    .container {
        padding: 10px;
        border-radius: 12px;
    }

    .desktop-title {
        display: none !important;
    }

    .mobile-title {
        display: block !important;
        font-size: 1.7em !important;
        margin: 0 !important;
        line-height: 1.1 !important;
        text-align: center !important;
        width: auto !important;
        max-width: none !important;
        padding: 0 8px !important;
        position: static !important;
    }

    .beta-corner-compact {
        display: none !important;
    }

    .mobile-nav-header {
        display: flex !important;
        justify-content: initial;
        align-items: center;
        margin-bottom: 8px;
        padding: 0 5px;
        gap: 8px;
        min-height: 44px;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 24px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        position: relative;
        margin-left: 0;
        flex-shrink: 0;
        z-index: 1001;
    }

    .nav-toggle span {
        display: block;
        flex: 0 0 3px;
        height: 3px;
        width: 100%;
        background-color: #ffdf8f;
        border-radius: 3px;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        transform-origin: center;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(10.5px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-10.5px) rotate(-45deg);
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: rgba(24, 28, 41, 0.98);
        padding: 20px 15px;
        display: flex;
        flex-direction: column;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
        z-index: 1000;
        gap: 8px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        user-select: none;
        border-left: 2px solid rgba(255, 223, 143, 0.2);
        display: none;
        justify-content: flex-start;
        align-items: stretch;
    }

    .main-nav.active {
        right: 0;
        display: flex;
    }

    .main-nav .nav-left,
    .main-nav .nav-right {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        margin-top: 20px;
        margin-bottom: 15px;
    }

    .main-nav .nav-btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 10px;
        text-align: center;
        background: linear-gradient(145deg, rgba(42, 47, 66, 0.95), rgba(30, 35, 50, 0.95));
        border: 2px solid rgba(58, 63, 90, 0.8);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.25s ease;
        white-space: normal;
        line-height: 1.3;
        word-break: break-word;
    }

    .main-nav .nav-btn.active {
        background: linear-gradient(145deg, rgba(255, 223, 143, 0.95), rgba(230, 201, 125, 0.95));
        color: #181c29;
        border-color: #ffdf8f;
        font-weight: 700;
        box-shadow: 0 0 20px rgba(255, 223, 143, 0.6);
    }

    .main-nav .nav-btn:not(.active):hover {
        background: linear-gradient(145deg, rgba(58, 63, 90, 0.95), rgba(42, 47, 66, 0.95));
        border-color: rgba(255, 223, 143, 0.6);
        transform: translateX(-3px);
    }

    .main-nav #horn-btn {
        width: 100%;
        padding: 6px 7px !important;
        font-size: 14px !important;
        min-height: 44px !important;
        border-radius: 10px !important;
        background: linear-gradient(145deg, rgba(58, 46, 46, 0.95), rgba(42, 31, 31, 0.95)) !important;
        border: 2px solid rgba(139, 69, 19, 0.8) !important;
        color: #d4af37 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
        box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.25s ease !important;
        margin: 0 !important;
        white-space: normal !important;
        gap: 6px !important;
        line-height: 1.3;
    }

    .main-nav #horn-btn:not(.horn-disabled):hover {
        background: linear-gradient(145deg, rgba(74, 58, 58, 0.95), rgba(58, 42, 42, 0.95)) !important;
        border-color: rgba(160, 82, 45, 0.8) !important;
        transform: translateX(-3px) !important;
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3) !important;
    }

    .main-nav #horn-btn.horn-disabled {
        background: linear-gradient(145deg, rgba(42, 37, 37, 0.95), rgba(26, 21, 21, 0.95)) !important;
        border-color: rgba(101, 67, 33, 0.8) !important;
        color: #8b7355 !important;
        cursor: not-allowed !important;
        opacity: 0.8 !important;
        transform: none !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    }

    .main-nav .discord-btn {
        width: auto !important;
        height: auto !important;
        margin: 8px 0 !important;
        padding: 6px 12px !important;
        min-height: 44px !important;
        background: linear-gradient(145deg, #5865F2, #4752c4) !important;
        border: 2px solid #7289da !important;
        color: white !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        text-align: center !important;
        text-transform: uppercase !important;
        font-weight: 600 !important;
        letter-spacing: 0.2px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        transition: all 0.25s ease !important;
        white-space: nowrap !important;
        line-height: 1.3 !important;
    }

    .main-nav .discord-btn .discord-btn-label {
        display: inline !important;
    }

    .main-nav .discord-btn:hover {
        background: linear-gradient(145deg, #4752c4, #3c45a5) !important;
        transform: translateX(-3px);
        box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6) !important;
    }

    .main-nav .auth-section {
        border-top: 2px solid rgba(255, 223, 143, 0.2);
        padding-top: 15px;
        margin-top: 10px;
        width: 100%;
    }

    .main-nav .auth-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .main-nav .auth-login-btn,
    .main-nav .auth-register-btn {
        width: 100%;
        padding: 12px 14px !important;
        font-size: 14px !important;
        min-height: 44px !important;
        background: linear-gradient(145deg, rgba(42, 47, 66, 0.95), rgba(30, 35, 50, 0.95)) !important;
        color: #ffdf8f !important;
        border: 2px solid rgba(58, 63, 90, 0.8) !important;
        border-radius: 10px !important;
        text-align: center !important;
        text-transform: uppercase !important;
        font-weight: 600 !important;
        letter-spacing: 0.2px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.25s ease !important;
        margin: 0 !important;
        white-space: normal !important;
        line-height: 1.3;
    }

    .main-nav .auth-login-btn:hover,
    .main-nav .auth-register-btn:hover {
        background: linear-gradient(145deg, rgba(58, 63, 90, 0.95), rgba(42, 47, 66, 0.95)) !important;
        border-color: rgba(255, 223, 143, 0.6) !important;
        transform: translateX(-3px) !important;
        box-shadow: 0 6px 20px rgba(255, 223, 143, 0.2) !important;
    }

    .main-nav .user-info {
        flex-direction: column;
        gap: 10px;
        padding: 12px 14px;
        text-align: center;
        background: rgba(30, 35, 50, 0.9);
        border-radius: 10px;
        border: 2px solid rgba(255, 223, 143, 0.3);
        margin-top: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .profile-dropdown {
        display: none !important;
    }

    .main-nav #username-display {
        display: block;
        text-align: center;
        width: 100%;
    }

    .main-nav #username-display > .user-icon,
    .main-nav #username-display > .user-name {
        display: inline-block;
        vertical-align: middle;
        line-height: 1.3;
    }

    .main-nav .user-icon {
        font-size: 16px;
        margin-right: 6px;
    }

    .main-nav .user-name {
        font-size: 13px;
        font-weight: 600;
        color: #ffdf8f;
    }

    .main-nav .user-role {
        display: block;
        font-size: 8px;
        padding: 2px 6px;
        margin-top: 4px;
        width: auto;
        max-width: 80px;
        margin-left: auto;
        margin-right: auto;
        border-radius: 4px;
        font-weight: 600;
        text-transform: uppercase;
        text-align: center;
    }

    .main-nav .auth-logout-btn {
        width: 100%;
        padding: 12px 14px !important;
        font-size: 13px !important;
        min-height: 44px !important;
        background: #121d2a !important;
        color: #c6c4c0 !important;
        border: 1px solid rgba(255, 223, 143, 0.18) !important;
        border-radius: 10px !important;
        text-align: center !important;
        text-transform: uppercase !important;
        font-weight: 600 !important;
        letter-spacing: 0.2px !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.25s ease !important;
        margin: 0 !important;
        white-space: normal !important;
        line-height: 1.3;
    }

    .main-nav .auth-logout-btn:hover {
        background: rgba(255, 200, 80, 0.06) !important;
        border-color: rgba(255, 223, 143, 0.2) !important;
        color: #ffd56a !important;
        transform: translateX(-3px) !important;
        box-shadow: none !important;
    }

    .main-nav .nav-btn-row {
        display: none;
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    .main-nav.active {
        animation: slideInRight 0.4s ease-out;
    }

@media (max-width: 360px) {
        .mobile-title {
            font-size: 1.28em !important;
        }

        .main-nav {
            width: 90%;
            max-width: 300px;
            padding: 15px 10px;
        }

        .main-nav .nav-btn,
        .main-nav #horn-btn,
        .main-nav .discord-btn,
        .main-nav .auth-login-btn,
        .main-nav .auth-register-btn,
        .main-nav .auth-logout-btn {
            padding: 10px 12px !important;
            min-height: 40px !important;
            font-size: 13px !important;
        }

        .main-nav .user-name {
            font-size: 12px;
        }
    }
}

/* Navbar composition fixes: one shell, one navigation border. */
.site-header {
    min-height: 72px !important;
    margin-top: 6px !important;
    padding: 7px 12px !important;
    gap: 12px !important;
    background:
        linear-gradient(180deg, rgba(11, 20, 29, 0.97), rgba(6, 13, 21, 0.94)),
        rgba(6, 13, 21, 0.96) !important;
    border-color: rgba(218, 166, 72, 0.32) !important;
    overflow: visible !important;
}

.site-header .site-brand {
    align-self: stretch !important;
    flex: 0 0 240px !important;
    min-width: 240px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 8px !important;
    border: 0 !important;
    background: transparent !important;
}

.site-header .site-brand .header-crest {
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 56px !important;
}

.site-header .site-brand .desktop-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 56px !important;
}

.site-header .main-nav {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 54px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.site-header .site-nav {
    min-width: 0 !important;
    height: 54px !important;
    gap: 0 !important;
    padding: 0 8px 0 0 !important;
    border: 1px solid rgba(218, 166, 72, 0.27) !important;
    border-radius: 10px !important;
    background: linear-gradient(180deg, rgba(14, 25, 37, 0.94), rgba(8, 16, 25, 0.92)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
    overflow: visible !important;
}

.site-header .site-nav__primary {
    min-width: 0 !important;
    overflow: hidden !important;
    border-radius: 9px 0 0 9px !important;
}

.site-header .site-nav__secondary {
    min-width: max-content !important;
    height: 100% !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    gap: 10px !important;
    padding-left: 12px !important;
    margin-left: 0 !important;
    border-left: 1px solid rgba(218, 166, 72, 0.14) !important;
    overflow: visible !important;
}

.site-header .site-nav__discord {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto !important;
}

.site-header .site-nav__auth {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
}

.site-header .main-nav .user-info {
    max-width: 190px !important;
}

.site-header .beta-corner-compact {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 18px !important;
    border-radius: 999px !important;
    border-color: rgba(218, 166, 72, 0.46) !important;
    background: linear-gradient(180deg, rgba(20, 27, 34, 0.98), rgba(5, 10, 15, 0.98)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 227, 153, 0.07),
        0 8px 22px rgba(0, 0, 0, 0.34) !important;
}

@media (max-width: 1280px) and (min-width: 481px) {
    .site-header .site-brand {
        flex-basis: 210px !important;
        min-width: 210px !important;
        gap: 9px !important;
        padding: 0 4px !important;
    }

    .site-header .site-nav__secondary {
        gap: 7px !important;
        padding-left: 8px !important;
    }

    .site-header .main-nav .discord-btn {
        min-width: 98px !important;
        padding: 0 11px !important;
    }
}

@media (max-width: 480px) {
    .site-header {
        margin-top: 0 !important;
    }

    .site-header .site-brand {
        display: none !important;
    }

    .site-header .site-nav {
        height: auto !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .site-header .site-nav__primary {
        overflow: visible !important;
    }

    .site-header .site-nav__secondary {
        min-width: 0 !important;
        padding: 8px 0 0 !important;
        border-left: 0 !important;
        border-top: 1px solid rgba(218, 166, 72, 0.14) !important;
    }
}

/* Final page width lock: keep content aligned with the redesigned navbar. */
:root {
    --page-wide: 1440px;
}

.site-header,
.container {
    width: min(calc(100% - 48px), var(--page-wide)) !important;
    max-width: var(--page-wide) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}

@media (max-width: 1280px) {
    .site-header,
    .container {
        width: min(calc(100% - 32px), var(--page-wide)) !important;
    }
}

@media (max-width: 480px) {
    .site-header,
    .container {
        width: 100% !important;
    }
}

/* Navbar final composition. Keep this after legacy responsive rules. */
.site-header {
    min-height: 72px !important;
    margin-top: 6px !important;
    padding: 7px 12px !important;
    gap: 12px !important;
    border-color: rgba(218, 166, 72, 0.32) !important;
    background:
        linear-gradient(180deg, rgba(11, 20, 29, 0.97), rgba(6, 13, 21, 0.94)),
        rgba(6, 13, 21, 0.96) !important;
}

.site-header .site-brand {
    align-self: stretch !important;
    flex: 0 0 240px !important;
    min-width: 240px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 8px !important;
    border: 0 !important;
    background: transparent !important;
}

.site-header .site-brand .header-crest {
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 56px !important;
}

.site-header .site-brand .desktop-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 56px !important;
}

.site-header .main-nav {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 54px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.site-header .site-nav {
    min-width: 0 !important;
    height: 54px !important;
    gap: 0 !important;
    padding: 0 8px 0 0 !important;
    border: 1px solid rgba(218, 166, 72, 0.27) !important;
    border-radius: 10px !important;
    background: linear-gradient(180deg, rgba(14, 25, 37, 0.94), rgba(8, 16, 25, 0.92)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
    overflow: visible !important;
}

.site-header .site-nav__primary {
    min-width: 0 !important;
    overflow: hidden !important;
    border-radius: 9px 0 0 9px !important;
}

.site-header .site-nav__secondary {
    min-width: max-content !important;
    height: 100% !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    gap: 10px !important;
    padding-left: 12px !important;
    border-left: 1px solid rgba(218, 166, 72, 0.14) !important;
    overflow: visible !important;
}

.site-header .site-nav__discord,
.site-header .site-nav__auth {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto !important;
}

.site-header .site-nav__auth {
    min-width: 0 !important;
}

.site-header .main-nav .user-info {
    max-width: 190px !important;
}

.site-header .beta-corner-compact {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 18px !important;
    border-radius: 999px !important;
    border-color: rgba(218, 166, 72, 0.46) !important;
    background: linear-gradient(180deg, rgba(20, 27, 34, 0.98), rgba(5, 10, 15, 0.98)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 227, 153, 0.07),
        0 8px 22px rgba(0, 0, 0, 0.34) !important;
}

@media (max-width: 1280px) and (min-width: 481px) {
    .site-header .site-brand {
        flex-basis: 210px !important;
        min-width: 210px !important;
        gap: 9px !important;
        padding: 0 4px !important;
    }

    .site-header .site-nav__secondary {
        gap: 7px !important;
        padding-left: 8px !important;
    }

    .site-header .main-nav .discord-btn {
        min-width: 98px !important;
        padding: 0 11px !important;
    }
}

@media (max-width: 480px) {
    .site-header {
        margin-top: 0 !important;
    }

    .site-header .site-brand {
        display: none !important;
    }

    .site-header .site-nav {
        height: auto !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .site-header .site-nav__primary {
        overflow: visible !important;
    }

    .site-header .site-nav__secondary {
        min-width: 0 !important;
        padding: 8px 0 0 !important;
        border-left: 0 !important;
        border-top: 1px solid rgba(218, 166, 72, 0.14) !important;
    }
}

/* Reference layout pass: header/build badge polish. */
.container {
    width: min(calc(100% - 48px), 1440px) !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 0 0 24px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.container::before {
    display: none !important;
}

.site-header .main-nav .discord-btn {
    cursor: pointer !important;
    pointer-events: auto !important;
}

.site-header .main-nav .discord-btn:focus-visible,
.site-header .main-nav .auth-login-btn:focus-visible,
.site-header .main-nav .auth-register-btn:focus-visible,
.site-header .main-nav .user-info:focus-visible {
    outline: none !important;
    border-color: rgba(255, 225, 140, 0.78) !important;
    box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.18) !important;
}

.site-header .main-nav .user-info {
    min-width: 0 !important;
    max-width: 220px !important;
    overflow: hidden !important;
}

.site-header .main-nav #username-display {
    min-width: 0 !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
}

.site-header .main-nav .user-icon {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 15px !important;
    font-size: 0 !important;
    background: currentColor !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a4.25 4.25 0 1 0 0-8.5 4.25 4.25 0 0 0 0 8.5Zm0 2c-4.25 0-7.5 2.05-7.5 4.7 0 .99.81 1.8 1.8 1.8h11.4c.99 0 1.8-.81 1.8-1.8 0-2.65-3.25-4.7-7.5-4.7Z'/%3E%3C/svg%3E") center / contain no-repeat !important;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a4.25 4.25 0 1 0 0-8.5 4.25 4.25 0 0 0 0 8.5Zm0 2c-4.25 0-7.5 2.05-7.5 4.7 0 .99.81 1.8 1.8 1.8h11.4c.99 0 1.8-.81 1.8-1.8 0-2.65-3.25-4.7-7.5-4.7Z'/%3E%3C/svg%3E") center / contain no-repeat !important;
}

.site-header .main-nav .user-name {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.site-header .beta-corner-compact {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    clip-path: none !important;
    animation: none !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 17px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(218, 166, 72, 0.52) !important;
    background: linear-gradient(180deg, rgba(24, 34, 42, 0.92), rgba(8, 15, 23, 0.94)) !important;
    color: #f5c961 !important;
    font-family: "Manrope", system-ui, sans-serif !important;
    font-size: 12px !important;
    line-height: 14px !important;
    font-weight: 900 !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 232, 166, 0.12),
        inset 0 0 0 1px rgba(255, 232, 166, 0.035),
        0 10px 26px rgba(0, 0, 0, 0.28),
        0 0 18px rgba(217, 164, 65, 0.08) !important;
    text-shadow: none !important;
}

.site-header .beta-corner-compact:hover {
    color: #ffdc78 !important;
    border-color: rgba(255, 220, 120, 0.72) !important;
    background: linear-gradient(180deg, rgba(32, 44, 54, 0.96), rgba(10, 19, 29, 0.96)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 232, 166, 0.16),
        inset 0 0 0 1px rgba(255, 232, 166, 0.055),
        0 12px 28px rgba(0, 0, 0, 0.34),
        0 0 20px rgba(217, 164, 65, 0.13) !important;
}

.site-header .beta-corner-compact:active {
    transform: translateY(1px) !important;
}

.site-header .beta-corner-compact:focus-visible {
    outline: none !important;
    border-color: rgba(255, 225, 140, 0.9) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 232, 166, 0.14),
        0 0 0 3px rgba(217, 164, 65, 0.18),
        0 12px 28px rgba(0, 0, 0, 0.34) !important;
}

.site-header .beta-corner-compact::before,
.site-header .beta-corner-compact::after {
    content: none !important;
    display: none !important;
}

.site-header .beta-corner-compact .beta-hammer {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 15px !important;
    fill: currentColor !important;
    opacity: 0.96 !important;
    filter: drop-shadow(0 0 6px rgba(245, 201, 97, 0.22)) !important;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        border-radius: 12px;
    }

    .support-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .support-banner-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .support-banner-link {
        flex: 1;
    }

    .support-donation-modal-actions {
        width: 100%;
    }

    .support-banner-option {
        flex: 1;
    }

    .modal-content.build-info-modal-content {
        width: min(100%, 420px);
        max-width: 420px;
        padding: 20px 18px 16px;
    }

    .build-info-civ-grid {
        grid-template-columns: 1fr;
    }


    .mobile-nav-header {
        min-height: 44px;
        margin-bottom: 2px;
        padding: 0 4px;
    }

    .mobile-title {
        padding: 0 4px;
    }

    .desktop-title {
        font-size: 1.6em;
        margin-bottom: 15px;
    }

    .main-nav {
        gap: 8px;
    }

    .nav-btn {
        padding: 8px 11px;
        font-size: 12px;
    }

    #horn-btn {
        padding: 5px 7px;
        font-size: 12px;
        min-width: 70px;
    }

    .nav-right .discord-btn {
        width: 38px;
        height: 38px;
        padding: 0;
        font-size: 12px;
    }

    .auth-login-btn, .auth-register-btn {
        padding: 7px 12px;
        font-size: 11px;
        min-width: 80px;
    }

    .user-info {
        padding: 4px 10px;
    }

    #username-display {
        font-size: 11px;
    }

    .players-list h2, .page-title {
        font-size: 1.32em;
    }
}

@media (min-width: 481px) {
    .mobile-nav-header {
        display: none !important;
    }

    .mobile-title {
        display: none !important;
    }

    .desktop-title {
        display: block !important;
    }

    .beta-corner-compact {
        display: block !important;
    }

    .nav-toggle {
        display: none !important;
    }

    .main-nav {
        position: static !important;
        width: auto !important;
        height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        background: transparent !important;
        box-shadow: none !important;
        border-left: none !important;
        padding: 0 16px !important;
        transition: none !important;
        overflow: visible !important;
    }

    .main-nav .nav-left,
    .main-nav .nav-right {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        width: auto !important;
        margin: 0 !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .main-nav .nav-btn {
        width: auto !important;
        padding: 8px 12px !important;
        font-size: 14px !important;
        min-height: auto !important;
        border-radius: 8px !important;
        background: linear-gradient(145deg, #2a2f42, #1e2332) !important;
        border: 2px solid #3a3f5a !important;
        color: #ffdf8f !important;
    }

    .main-nav .nav-btn.nav-btn-locked {
        padding: 8px 12px !important;
        font-size: 14px !important;
        gap: 0 !important;
        color: #c9b4a8 !important;
        border: 2px dashed rgba(165, 118, 96, 0.44) !important;
        background:
            linear-gradient(145deg, rgba(51, 41, 43, 0.96), rgba(34, 30, 36, 0.98)),
            repeating-linear-gradient(
                -45deg,
                rgba(189, 120, 92, 0.12) 0,
                rgba(189, 120, 92, 0.12) 8px,
                rgba(126, 118, 122, 0.06) 8px,
                rgba(126, 118, 122, 0.06) 16px
            ) !important;
        box-shadow:
            inset 0 0 0 1px rgba(205, 177, 164, 0.06),
            0 8px 18px rgba(23, 16, 18, 0.18) !important;
        opacity: 0.88 !important;
        letter-spacing: 0.4px !important;
    }

    .main-nav .nav-btn.active {
        background: linear-gradient(145deg, #ffdf8f, #e6c97d) !important;
        color: #181c29 !important;
        border-color: #ffdf8f !important;
    }

    .main-nav #horn-btn {
        width: auto !important;
        padding: 5px 8px !important;
        font-size: 14px !important;
        min-height: auto !important;
        border-radius: 8px !important;
        background: linear-gradient(145deg, #3a2e2e, #2a1f1f) !important;
        border: 2px solid #8b4513 !important;
        color: #d4af37 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
        box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        min-width: 80px !important;
    }

    .main-nav .auth-section {
        border-top: none !important;
        padding-top: 0 !important;
        margin-top: 0 !important;
        flex-direction: row !important;
    }

    .main-nav .auth-buttons {
        flex-direction: row !important;
        gap: 8px !important;
    }

    .main-nav .auth-login-btn,
    .main-nav .auth-register-btn {
        width: auto !important;
        padding: 8px 14px !important;
        font-size: 13px !important;
        min-height: auto !important;
        border-radius: 8px !important;
        background: linear-gradient(145deg, #2a2f42, #1e2332) !important;
        border: 2px solid #3a3f5a !important;
        color: #ffdf8f !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    }

    .main-nav .auth-login-btn {
        padding: 8px 11px !important;
        min-width: 74px !important;
    }

    .main-nav .auth-logout-btn {
        width: auto !important;
        padding: 6px 12px !important;
        font-size: 13px !important;
        min-height: auto !important;
        border-radius: 6px !important;
        background: linear-gradient(145deg, #dc3545, #c82333) !important;
        border: 1px solid rgba(220, 53, 69, 0.3) !important;
    }

    .main-nav .discord-btn {
        width: 42px !important;
        height: 42px !important;
        padding: 0 !important;
        font-size: 14px !important;
        min-height: 42px !important;
        border-radius: 8px !important;
        background: linear-gradient(145deg, #5865F2, #4752c4) !important;
        border: 2px solid #7289da !important;
        color: white !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
        white-space: nowrap !important;
        box-shadow: 0 2px 8px rgba(88, 101, 242, 0.28) !important;
    }

    .main-nav .discord-btn .discord-btn-label {
        display: none !important;
    }

    .main-nav .nav-btn-row {
        display: inline-flex !important;
        align-items: center;
    }

    .main-nav #feedback-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        min-height: auto !important;
        font-size: 13px !important;
        line-height: 1.2 !important;
    }

    .main-nav #feedback-btn[hidden] {
        display: none !important;
    }

    .main-nav .user-info {
        flex-direction: row !important;
        padding: 5px 12px !important;
        text-align: left !important;
        background: rgba(30, 35, 50, 0.8) !important;
        border: 2px solid rgba(255, 223, 143, 0.2) !important;
        border-radius: 8px !important;
    }

    .main-nav #username-display {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .main-nav .user-icon {
        font-size: 13px;
    }

    body.mobile-nav-open {
        overflow: auto !important;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    .desktop-title {
        font-size: 1.9em;
    }

    .main-nav {
        flex-direction: column;
        gap: 12px;
    }

    .nav-left, .nav-right {
        justify-content: center;
    }
}

.civ-quiz-widget {
    position: fixed;
    right: 30px;
    bottom: 24px;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

.civ-quiz-launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    overflow: visible;
}

.civ-quiz-panel {
    width: min(360px, calc(100vw - 92px));
    max-height: min(72vh, 620px);
    overflow-y: auto;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
        rgba(20, 24, 36, 0.96);
    border: 1px solid rgba(255, 223, 143, 0.18);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(var(--panel-blur-strength));
    padding: 18px;
    color: #fff9e7;
    transform: translateX(22px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.civ-quiz-widget.open .civ-quiz-panel {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.civ-quiz-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 223, 143, 0.38);
    background: linear-gradient(145deg, #2d354c, #1e2434);
    color: #ffdf8f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    animation: civ-quiz-toggle-wiggle 2.6s ease-in-out var(--decorative-animation-loops);
    transform-origin: center bottom;
}

.civ-quiz-widget.open .civ-quiz-toggle,
.civ-quiz-widget.is-dismissed .civ-quiz-toggle {
    animation: none;
}

.gpu-lite {
    --surface-blur-strength: 0px;
    --panel-blur-strength: 0px;
    --decorative-animation-loops: 1;
}

.gpu-lite .container,
.gpu-lite .civ-quiz-panel,
.gpu-lite .user-info {
    backdrop-filter: none;
}

.gpu-lite .beta-corner-compact,
.gpu-lite .user-info.logged-in,
.gpu-lite .civ-quiz-toggle,
.gpu-lite #horn-btn.pulse {
    animation: none !important;
}

.civ-quiz-toggle:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 223, 143, 0.7);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
}

.civ-quiz-dismiss {
    position: absolute;
    top: -16px;
    right: -14px;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 223, 143, 0.35);
    border-radius: 50%;
    background: rgba(12, 16, 25, 0.92);
    color: rgba(255, 249, 231, 0.82);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    z-index: 3;
}

.civ-quiz-dismiss:hover {
    transform: scale(1.08);
    border-color: rgba(255, 223, 143, 0.6);
    color: #ffdf8f;
}

.civ-quiz-widget.is-dismissed .civ-quiz-panel,
.civ-quiz-widget.is-dismissed .civ-quiz-launcher {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.92);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.civ-quiz-toggle-icon {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

@keyframes civ-quiz-toggle-wiggle {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
    }
    8% {
        transform: translateY(-3px) rotate(-8deg) scale(1.02);
        box-shadow: 0 18px 32px rgba(0, 0, 0, 0.38);
    }
    14% {
        transform: translateY(-5px) rotate(7deg) scale(1.05);
        box-shadow: 0 20px 36px rgba(0, 0, 0, 0.42);
    }
    20% {
        transform: translateY(-2px) rotate(-5deg) scale(1.02);
    }
    26% {
        transform: translateY(0) rotate(3deg) scale(1);
    }
    34% {
        transform: translateY(-1px) rotate(0deg) scale(1.01);
    }
}

.civ-quiz-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.civ-quiz-title {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: #ffdf8f;
}

.civ-quiz-subtitle {
    margin-top: 4px;
    color: rgba(255, 249, 231, 0.72);
    font-size: 12px;
}

.civ-quiz-close {
    background: transparent;
    border: none;
    color: rgba(255, 249, 231, 0.7);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.civ-quiz-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.civ-quiz-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 223, 143, 0.12);
    border-radius: 14px;
    padding: 8px 10px;
}

.civ-quiz-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 249, 231, 0.62);
}

.civ-quiz-stat-value {
    margin-top: 3px;
    font-size: 16px;
    font-weight: 800;
    color: #ffdf8f;
}

.civ-quiz-status {
    min-height: 18px;
    font-size: 12px;
    color: rgba(255, 249, 231, 0.7);
    margin-bottom: 12px;
}

.civ-quiz-status.success {
    color: #73e2a7;
}

.civ-quiz-status.error {
    color: #ff8d8d;
}

.civ-quiz-difficulty {
    margin-bottom: 14px;
}

.civ-quiz-difficulty-label {
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 249, 231, 0.62);
}

.civ-quiz-difficulty-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.civ-quiz-difficulty-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    padding: 10px 11px;
    border-radius: 12px;
    border: 1px solid rgba(255, 223, 143, 0.14);
    background: rgba(255, 255, 255, 0.035);
    color: #fff9e7;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.civ-quiz-difficulty-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 223, 143, 0.34);
}

.civ-quiz-difficulty-btn.active {
    border-color: rgba(255, 223, 143, 0.52);
    background: linear-gradient(145deg, rgba(255, 223, 143, 0.16), rgba(230, 201, 125, 0.08));
    box-shadow: inset 0 0 0 1px rgba(255, 223, 143, 0.16);
}

.civ-quiz-difficulty-name {
    font-size: 12px;
    font-weight: 700;
}

.civ-quiz-difficulty-meta {
    font-size: 11px;
    color: rgba(255, 249, 231, 0.68);
}

.civ-quiz-clues {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.civ-quiz-clue {
    background: rgba(255, 255, 255, 0.045);
    border-left: 3px solid rgba(255, 223, 143, 0.5);
    border-radius: 10px;
    padding: 10px 12px;
    color: #fff4d1;
    font-size: 13px;
    line-height: 1.4;
}

.civ-quiz-options {
    display: grid;
    gap: 10px;
}

.civ-quiz-option {
    width: 100%;
    text-align: left;
    background: linear-gradient(145deg, rgba(48, 56, 79, 0.95), rgba(32, 38, 55, 0.95));
    border: 1px solid rgba(255, 223, 143, 0.16);
    border-radius: 12px;
    color: #fff9e7;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.civ-quiz-option:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(255, 223, 143, 0.45);
}

.civ-quiz-option:disabled {
    cursor: default;
    opacity: 0.88;
}

.civ-quiz-option.correct {
    border-color: rgba(115, 226, 167, 0.7);
    background: linear-gradient(145deg, rgba(34, 85, 63, 0.95), rgba(28, 67, 51, 0.95));
}

.civ-quiz-option.wrong {
    border-color: rgba(255, 141, 141, 0.6);
    background: linear-gradient(145deg, rgba(100, 42, 42, 0.95), rgba(79, 31, 31, 0.95));
}

.civ-quiz-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.civ-quiz-action {
    flex: 1;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid rgba(255, 223, 143, 0.2);
    background: linear-gradient(145deg, rgba(255, 223, 143, 0.16), rgba(230, 201, 125, 0.08));
    color: #ffecb9;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.civ-quiz-action:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(255, 223, 143, 0.5);
}

.civ-quiz-action.secondary {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 249, 231, 0.82);
}

.civ-quiz-empty {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 223, 143, 0.18);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
    color: rgba(255, 249, 231, 0.78);
    line-height: 1.45;
    font-size: 13px;
}

@media (max-width: 768px) {
    .scroll-top-button {
        display: none;
    }

    .civ-quiz-widget {
        right: 18px;
        bottom: 14px;
        gap: 10px;
    }

    .civ-quiz-panel {
        width: min(330px, calc(100vw - 82px));
        max-height: 70vh;
        padding: 16px;
    }

    .civ-quiz-toggle {
        width: 54px;
        height: 54px;
    }

    .civ-quiz-dismiss {
        top: -14px;
        right: -12px;
        width: 30px;
        height: 30px;
        font-size: 17px;
    }

    .civ-quiz-stats {
        grid-template-columns: 1fr 1fr;
    }

    .civ-quiz-difficulty-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* AoE rating landing shell */
.container {
    width: min(100%, 1448px);
    max-width: 1448px;
    min-height: calc(100vh - 24px);
    padding: 0 22px 18px;
    border-radius: 20px;
    border: 1px solid rgba(209, 157, 62, 0.42);
    background:
        linear-gradient(180deg, rgba(11, 20, 31, 0.64) 0, rgba(11, 19, 29, 0.98) 190px, rgba(9, 18, 28, 0.98) 100%),
        linear-gradient(90deg, rgba(5, 9, 14, 0.92), rgba(15, 26, 38, 0.76) 48%, rgba(5, 9, 14, 0.94)),
        url('/static/aoe-back-optimized.webp');
    background-size: cover;
    background-position: center top;
    box-shadow:
        0 0 0 1px rgba(255, 223, 143, 0.08) inset,
        0 24px 80px rgba(0, 0, 0, 0.58);
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 9% 10%, rgba(227, 105, 43, 0.12), transparent 13%),
        radial-gradient(circle at 88% 5%, rgba(105, 141, 174, 0.16), transparent 16%),
        linear-gradient(180deg, rgba(255, 223, 143, 0.06), transparent 105px);
    opacity: 0.95;
    z-index: -1;
}

header {
    min-height: 176px;
    margin: 0 0 18px;
    padding: 22px 0 0;
    border-bottom: none;
}

.header-crest {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 124px;
    height: 98px;
    display: grid;
    place-items: center;
    color: #ffd979;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.45));
    z-index: 2;
}

.header-crest::before,
.header-crest::after {
    content: '';
    position: absolute;
    width: 118px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #d2a64f 14%, #fff0b7 50%, #d2a64f 86%, transparent);
    box-shadow: 0 0 10px rgba(255, 223, 143, 0.32);
}

.header-crest::before {
    transform: rotate(43deg);
}

.header-crest::after {
    transform: rotate(-43deg);
}

.header-crest__mark {
    position: relative;
    z-index: 1;
    width: 58px;
    height: 70px;
    display: grid;
    place-items: center;
    padding-top: 4px;
    font-family: 'Cinzel', serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    color: #ffd979;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.72), 0 0 12px rgba(255, 218, 124, 0.38);
    background:
        linear-gradient(180deg, rgba(43, 34, 23, 0.96), rgba(13, 20, 29, 0.98)),
        linear-gradient(135deg, rgba(255, 223, 143, 0.18), transparent);
    border: 2px solid #c99b42;
    clip-path: polygon(50% 0, 92% 14%, 84% 73%, 50% 100%, 16% 73%, 8% 14%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 238, 180, 0.22),
        0 0 18px rgba(231, 177, 68, 0.22);
}

.desktop-title {
    min-height: 80px;
    margin: 0;
    padding: 6px 180px 0;
    color: #ffd979;
    font-size: 3.1rem;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow:
        0 2px 0 rgba(65, 31, 13, 0.72),
        0 0 20px rgba(255, 201, 82, 0.36);
}

.beta-corner-compact {
    top: 2px;
    right: 6px;
    min-height: 38px;
    padding: 0 18px 0 42px;
    border: 1px solid rgba(255, 213, 111, 0.92);
    border-radius: 999px;
    clip-path: none;
    transform: none;
    background: linear-gradient(180deg, rgba(18, 31, 45, 0.96), rgba(8, 16, 27, 0.98));
    color: #ffd979;
    box-shadow:
        inset 0 0 0 1px rgba(255, 239, 185, 0.08),
        0 0 18px rgba(218, 168, 61, 0.18);
    text-shadow: none;
}

.beta-corner-compact::before,
.beta-corner-compact::after {
    content: '';
    position: absolute;
    left: 18px;
    background: #ffd979;
    box-shadow: 0 0 8px rgba(255, 217, 121, 0.4);
}

.beta-corner-compact::before {
    top: 12px;
    width: 18px;
    height: 5px;
    border-radius: 3px;
    transform: rotate(-38deg);
}

.beta-corner-compact::after {
    top: 18px;
    width: 9px;
    height: 13px;
    border-radius: 2px;
    transform: rotate(45deg);
}

.main-nav {
    width: 100%;
    margin: 0;
    padding: 12px !important;
    border: 1px solid rgba(202, 148, 59, 0.48);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(18, 32, 47, 0.92), rgba(8, 17, 28, 0.95)),
        rgba(8, 15, 24, 0.96);
    box-shadow:
        inset 0 1px 0 rgba(255, 223, 143, 0.12),
        0 16px 34px rgba(0, 0, 0, 0.34);
}

.site-nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-nav__primary,
.site-nav__secondary {
    display: flex;
    align-items: center;
}

.site-nav__primary {
    flex: 1 1 auto;
    min-width: 0;
}

.site-nav__secondary {
    flex: 0 0 auto;
    gap: 30px;
}

.site-nav__primary .nav-btn,
.main-nav .nav-btn[data-page] {
    position: relative;
    min-width: 126px !important;
    min-height: 58px !important;
    padding: 0 26px !important;
    border-width: 0 1px 0 0 !important;
    border-color: rgba(255, 223, 143, 0.13) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(255, 249, 231, 0.86) !important;
    box-shadow: none !important;
    font-size: 15px !important;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.site-nav__primary .nav-btn:first-child {
    border-left: 1px solid rgba(255, 223, 143, 0.09) !important;
}

.site-nav__primary .nav-btn.active,
.main-nav .nav-btn[data-page].active {
    background:
        linear-gradient(180deg, rgba(255, 218, 120, 0.15), rgba(255, 218, 120, 0.04)),
        radial-gradient(ellipse at bottom, rgba(255, 221, 114, 0.42), transparent 64%) !important;
    color: #ffe9a6 !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 223, 143, 0.16),
        inset 0 -4px 0 #ffd65d,
        0 12px 28px rgba(255, 203, 71, 0.12) !important;
}

.site-nav__primary .nav-btn:not(.active):hover,
.main-nav .nav-btn[data-page]:not(.active):hover {
    transform: none;
    color: #fff2c2 !important;
    background: rgba(255, 223, 143, 0.07) !important;
    border-color: rgba(255, 223, 143, 0.2) !important;
}

.main-nav .discord-btn {
    min-width: 144px !important;
    width: auto !important;
    height: 50px !important;
    padding: 0 20px !important;
    gap: 10px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(133, 157, 255, 0.72) !important;
    background: linear-gradient(180deg, #506cf0, #263b9d) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 12px 24px rgba(37, 67, 199, 0.32) !important;
}

.main-nav .discord-btn .discord-btn-label {
    display: inline !important;
    color: #fff;
}

.main-nav .discord-btn svg {
    width: 22px;
    height: 22px;
}

.site-nav__auth {
    min-width: 244px;
}

.main-nav .auth-buttons {
    gap: 10px !important;
}

.main-nav .auth-login-btn,
.main-nav .auth-register-btn,
.main-nav .user-info {
    min-height: 50px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 223, 143, 0.18) !important;
    background: #121d2a !important;
    color: #c6c4c0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.main-nav .auth-login-btn,
.main-nav .auth-register-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    padding: 0 18px !important;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.main-nav .auth-login-btn:hover,
.main-nav .auth-register-btn:hover {
    transform: none !important;
    color: #ffd56a !important;
    background: rgba(255, 200, 80, 0.06) !important;
    border-color: rgba(255, 223, 143, 0.2) !important;
    box-shadow: none !important;
}

.main-nav .user-info {
    width: 100%;
    justify-content: flex-start !important;
}

@media (max-width: 1280px) {
    .desktop-title {
        font-size: 2.45rem;
        padding-left: 150px;
        padding-right: 150px;
    }

    .site-nav {
        gap: 12px;
    }

    .site-nav__secondary {
        gap: 12px;
    }

    .site-nav__primary .nav-btn,
    .main-nav .nav-btn[data-page] {
        min-width: 104px !important;
        padding: 0 16px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 1024px) and (min-width: 481px) {
    header {
        min-height: 220px;
    }

    .desktop-title {
        padding: 86px 140px 0;
        font-size: 2.15rem;
    }

    .header-crest {
        left: 50%;
        transform: translateX(-50%);
    }

    .site-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav__primary,
    .site-nav__secondary {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .container {
        min-height: 100vh;
        padding: 0 10px 12px;
        border-radius: 12px;
    }

    header {
        min-height: auto;
        padding-top: 8px;
        margin-bottom: 12px;
    }

    .header-crest {
        display: none;
    }

    .mobile-nav-header {
        min-height: 54px;
    }

    .mobile-title {
        color: #ffd979;
        font-size: 1.34rem !important;
        letter-spacing: 0;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    }

    .main-nav .site-nav,
    .main-nav .site-nav__primary,
    .main-nav .site-nav__secondary {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .main-nav .site-nav__primary .nav-btn,
    .main-nav .nav-btn[data-page] {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        border: 1px solid rgba(255, 223, 143, 0.14) !important;
        border-radius: 8px !important;
    }

    .main-nav .discord-btn {
        width: 100% !important;
        min-width: 0 !important;
    }

    .site-nav__auth {
        min-width: 0;
    }
}

/* Global redesign: premium navbar typography and shell proportions. */
:root {
    --font-ui: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-brand: "Cormorant Garamond", Georgia, serif;
    --font-number: "JetBrains Mono", "Manrope", monospace;
    --page-wide: 1440px;
    --page-gutter: 24px;
}

body {
    font-family: var(--font-ui);
    padding: 12px 0;
}

.container {
    width: min(calc(100% - 48px), var(--page-wide));
    max-width: var(--page-wide);
    padding: 0 var(--page-gutter) 24px;
}

.site-header {
    width: min(calc(100% - 48px), 1600px);
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px auto 14px;
    padding: 8px 16px;
    border: 1px solid rgba(218, 166, 72, 0.28);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(9, 17, 26, 0.84), rgba(7, 14, 22, 0.52)),
        rgba(7, 14, 22, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 18px 50px rgba(0, 0, 0, 0.24);
    position: relative;
    backdrop-filter: blur(10px);
    text-align: left;
}

.header-crest {
    position: relative;
    top: auto;
    left: auto;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter:
        drop-shadow(0 10px 18px rgba(0, 0, 0, 0.52))
        drop-shadow(0 0 14px rgba(217, 164, 65, 0.26));
}

.desktop-title {
    position: static;
    display: flex;
    flex: 0 0 174px;
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    padding: 0;
    text-align: left;
    color: #f1c66d;
    text-shadow: 0 1px 0 #000, 0 0 14px rgba(218, 170, 78, 0.24);
}

.desktop-title__text {
    font-family: var(--font-brand);
    font-size: 29px;
    line-height: 28px;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.desktop-title__subtitle {
    margin-top: 2px;
    font-family: var(--font-ui);
    font-size: 11px;
    line-height: 12px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #e7c072;
    white-space: nowrap;
}

.main-nav {
    flex: 1 1 auto;
    min-width: 0;
    height: 52px;
    padding: 0 8px !important;
    border-radius: 10px;
    border-color: rgba(218, 166, 72, 0.2);
    background:
        linear-gradient(180deg, rgba(11, 20, 30, 0.9), rgba(7, 14, 22, 0.82)),
        rgba(7, 14, 22, 0.82);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 14px 36px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.site-nav {
    height: 100%;
    gap: 12px;
}

.site-nav__primary {
    height: 100%;
    justify-content: flex-start;
}

.site-nav__secondary {
    height: 100%;
    gap: 12px;
}

.site-nav__primary .nav-btn,
.main-nav .nav-btn[data-page] {
    min-width: auto !important;
    min-height: 52px !important;
    padding: 0 13px !important;
    border-width: 0 1px 0 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-family: var(--font-ui) !important;
    font-size: 13px !important;
    line-height: 16px !important;
    font-weight: 800 !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
    color: rgba(238, 232, 218, 0.86) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.055) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.site-nav__primary .nav-btn:first-child {
    border-left: none !important;
}

.site-nav__primary .nav-btn.active,
.main-nav .nav-btn[data-page].active {
    color: #ffd86a !important;
    background:
        linear-gradient(180deg, rgba(217, 164, 65, 0.18), rgba(217, 164, 65, 0.06)),
        radial-gradient(ellipse at bottom, rgba(241, 199, 92, 0.34), transparent 62%) !important;
    box-shadow:
        inset 0 -1px 0 rgba(255, 216, 106, 0.32),
        inset 0 0 22px rgba(217, 164, 65, 0.13),
        0 10px 22px rgba(220, 157, 44, 0.12) !important;
}

.site-nav__primary .nav-btn:not(.active):hover,
.main-nav .nav-btn[data-page]:not(.active):hover {
    color: #f7d879 !important;
    background: rgba(217, 164, 65, 0.07) !important;
}

.site-nav__primary #horn-btn {
    min-height: 52px !important;
    padding: 0 13px !important;
    border-width: 0 1px 0 0 !important;
    border-color: rgba(255, 255, 255, 0.055) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #f1b952 !important;
    box-shadow: none !important;
}

.site-nav__primary #horn-btn::before {
    content: none !important;
    display: none !important;
}

.site-nav__primary #horn-btn:not(.horn-disabled):hover {
    color: #f7d879 !important;
    background: rgba(217, 164, 65, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.055) !important;
    box-shadow: none !important;
}

.site-nav__primary .nav-btn.active::after,
.main-nav .nav-btn[data-page].active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: calc(100% - 36px);
    max-width: 56px;
    height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, #ffd76a, transparent);
    box-shadow: 0 0 12px rgba(255, 215, 106, 0.6);
}

.site-nav__primary .nav-btn.active::before,
.main-nav .nav-btn[data-page].active::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 7px;
    height: 7px;
    transform: translateX(-50%) rotate(45deg);
    background: #f1c75c;
    box-shadow: 0 0 10px rgba(241, 199, 92, 0.45);
}

.main-nav .discord-btn {
    height: 38px !important;
    min-width: 112px !important;
    padding: 0 16px !important;
    font-family: var(--font-ui) !important;
    font-size: 13px !important;
    line-height: 16px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.site-nav__auth {
    min-width: 184px;
}

.main-nav .auth-login-btn,
.main-nav .auth-register-btn,
.main-nav .user-info {
    min-height: 38px !important;
    font-family: var(--font-ui) !important;
    font-size: 13px !important;
    line-height: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.beta-corner-compact {
    position: relative;
    top: auto;
    right: auto;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 18px 0 42px;
    border-radius: 10px;
    border-color: rgba(218, 166, 72, 0.48);
    background:
        linear-gradient(180deg, rgba(60, 43, 20, 0.78), rgba(16, 18, 21, 0.82));
    color: #f5c961;
    font-family: var(--font-ui);
    font-size: 12px;
    line-height: 14px;
    font-weight: 900;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.beta-corner-compact::before,
.beta-corner-compact::after {
    content: none !important;
    display: none !important;
}

.beta-corner-compact .beta-hammer {
    position: static;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    fill: currentColor;
    opacity: 0.98;
    filter: drop-shadow(0 0 8px rgba(245, 201, 97, 0.28));
}

.mobile-title {
    font-family: var(--font-brand);
}

.page-title,
.players-header-title h2,
.players-header h2 {
    font-family: var(--font-brand);
    font-size: 31px;
    line-height: 36px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

@media (max-width: 1280px) {
    .site-header {
        gap: 14px;
    }

    .header-crest {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
    }

    .desktop-title {
        flex-basis: 174px;
    }

    .site-nav__primary .nav-btn,
    .main-nav .nav-btn[data-page] {
        min-width: auto !important;
        padding: 0 10px !important;
        font-size: 12px !important;
    }

    .main-nav .discord-btn {
        min-width: 108px !important;
        padding: 0 12px !important;
    }

    .site-nav__auth {
        min-width: 168px;
    }
}

@media (max-width: 1024px) and (min-width: 481px) {
    .site-header {
        min-height: 190px;
        align-items: flex-start;
        justify-content: center;
        flex-wrap: wrap;
        padding-top: 14px;
    }

    .desktop-title {
        flex-basis: 220px;
        min-height: 70px;
        padding: 0;
    }

    .main-nav {
        flex-basis: 100%;
        height: auto;
        min-height: 58px;
    }

    .beta-corner-compact {
        top: auto;
        right: auto;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .container {
        width: 100%;
        padding: 0 10px 12px;
    }

    .site-header {
        width: 100%;
        min-height: auto;
        margin: 0 0 10px;
        padding: 8px 10px;
        border-radius: 0 0 12px 12px;
    }

    .desktop-title {
        display: none;
    }

    .main-nav {
        height: auto;
        padding: 14px !important;
    }
}

/* Premium medieval navbar: final scoped override. */
:root {
    --nav-bg: rgba(7, 14, 22, 0.86);
    --nav-bg-strong: rgba(10, 20, 31, 0.92);
    --nav-border: rgba(218, 166, 72, 0.22);
    --nav-border-soft: rgba(255, 255, 255, 0.06);
    --gold: #d9a441;
    --gold-light: #f4d06f;
    --gold-text: #f2c866;
    --text-main: #f3ead7;
    --text-muted: rgba(243, 234, 215, 0.72);
}

.site-header {
    width: min(calc(100% - 48px), 1600px) !important;
    min-height: 76px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin: 16px auto 14px !important;
    padding: 8px 16px !important;
    border: 1px solid rgba(218, 166, 72, 0.26) !important;
    border-radius: 16px !important;
    background:
        linear-gradient(180deg, rgba(9, 17, 26, 0.88), rgba(7, 14, 22, 0.62)),
        rgba(7, 14, 22, 0.34) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 18px 50px rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: blur(10px);
    overflow: visible !important;
    text-align: left !important;
}

.site-header .header-crest {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
    transform: none !important;
    object-fit: contain !important;
}

.site-header .desktop-title {
    position: static !important;
    display: flex !important;
    flex: 0 0 174px !important;
    min-height: 58px !important;
    flex-direction: column !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    color: var(--gold-text) !important;
}

.site-header .desktop-title__text {
    font-family: var(--font-brand) !important;
    font-size: 29px !important;
    line-height: 28px !important;
    font-weight: 700 !important;
    letter-spacing: 0.055em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.site-header .desktop-title__subtitle {
    margin-top: 2px !important;
    font-family: var(--font-ui) !important;
    font-size: 11px !important;
    line-height: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.22em !important;
    text-transform: uppercase !important;
    color: #e7c072 !important;
    white-space: nowrap !important;
}

.site-header .main-nav {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 52px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border: 1px solid var(--nav-border) !important;
    border-radius: 10px !important;
    background:
        linear-gradient(180deg, rgba(11, 20, 30, 0.92), rgba(7, 14, 22, 0.86)),
        var(--nav-bg) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 14px 36px rgba(0, 0, 0, 0.28) !important;
    overflow: hidden !important;
}

.site-header .site-nav {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

.site-header .site-nav__primary,
.site-header .site-nav__secondary {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

.site-header .site-nav__primary {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
}

.site-header .site-nav__secondary {
    flex: 0 0 auto !important;
    gap: 12px !important;
}

.site-header .main-nav .nav-btn,
.site-header .site-nav__primary #horn-btn {
    position: relative !important;
    height: 52px !important;
    min-height: 52px !important;
    min-width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 13px !important;
    border: 0 !important;
    border-right: 1px solid var(--nav-border-soft) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    font-family: var(--font-ui) !important;
    font-size: 13px !important;
    line-height: 16px !important;
    font-weight: 800 !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
    color: rgba(238, 232, 218, 0.84) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72) !important;
}

.site-header .main-nav .nav-btn:hover,
.site-header .site-nav__primary #horn-btn:hover {
    transform: none !important;
    color: #f7d879 !important;
    background: rgba(217, 164, 65, 0.07) !important;
    box-shadow: none !important;
}

.site-header .site-nav__primary .nav-btn.active,
.site-header .main-nav .nav-btn[data-page].active {
    color: #ffd86a !important;
    background:
        linear-gradient(180deg, rgba(217, 164, 65, 0.18), rgba(217, 164, 65, 0.06)),
        radial-gradient(ellipse at bottom, rgba(241, 199, 92, 0.34), transparent 62%) !important;
    box-shadow:
        inset 0 -1px 0 rgba(255, 216, 106, 0.32),
        inset 0 0 22px rgba(217, 164, 65, 0.13),
        0 10px 22px rgba(220, 157, 44, 0.12) !important;
}

.site-header .site-nav__primary .nav-btn.active::after,
.site-header .main-nav .nav-btn[data-page].active::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    bottom: -1px !important;
    width: calc(100% - 36px) !important;
    max-width: 56px !important;
    height: 2px !important;
    transform: translateX(-50%) !important;
    background: linear-gradient(90deg, transparent, #ffd76a, transparent) !important;
    box-shadow: 0 0 12px rgba(255, 215, 106, 0.6) !important;
}

.site-header .site-nav__primary .nav-btn.active::before,
.site-header .main-nav .nav-btn[data-page].active::before {
    content: "" !important;
    position: absolute !important;
    bottom: -1px !important;
    left: 50% !important;
    width: 7px !important;
    height: 7px !important;
    transform: translateX(-50%) rotate(45deg) !important;
    background: #f1c75c !important;
    box-shadow: 0 0 10px rgba(241, 199, 92, 0.45) !important;
}

.site-header .site-nav__primary #horn-btn {
    color: #f1b952 !important;
}

.site-header .site-nav__primary #horn-btn::before,
.site-header .site-nav__primary #horn-btn::after {
    display: none !important;
    content: none !important;
}

.site-header .main-nav .discord-btn {
    height: 38px !important;
    min-height: 38px !important;
    min-width: 112px !important;
    gap: 9px !important;
    padding: 0 16px !important;
    border-radius: 9px !important;
    border: 1px solid rgba(133, 157, 255, 0.72) !important;
    background: linear-gradient(180deg, #566ff4, #273da6) !important;
    color: #ffffff !important;
    font-size: 12px !important;
    line-height: 14px !important;
    font-weight: 900 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 12px 24px rgba(37, 67, 199, 0.32) !important;
}

.site-header .main-nav .discord-btn svg {
    width: 18px !important;
    height: 18px !important;
    fill: currentColor !important;
}

.site-header .main-nav .discord-btn .discord-btn-label {
    display: inline !important;
    color: #ffffff !important;
}

.site-header .site-nav__auth {
    min-width: 184px !important;
}

.site-header .main-nav .auth-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.site-header .main-nav .auth-login-btn,
.site-header .main-nav .auth-register-btn,
.site-header .main-nav .user-info {
    height: 38px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 13px !important;
    border-radius: 9px !important;
    border: 1px solid rgba(218, 166, 72, 0.18) !important;
    background: rgba(11, 20, 30, 0.82) !important;
    color: rgba(243, 234, 215, 0.82) !important;
    font-family: var(--font-ui) !important;
    font-size: 12px !important;
    line-height: 14px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.site-header .beta-corner-compact {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    clip-path: none !important;
    flex: 0 0 auto !important;
    height: 38px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(218, 166, 72, 0.48) !important;
    background:
        linear-gradient(180deg, rgba(60, 43, 20, 0.78), rgba(16, 18, 21, 0.82)) !important;
    color: #f5c961 !important;
    font-family: var(--font-ui) !important;
    font-size: 12px !important;
    line-height: 14px !important;
    font-weight: 900 !important;
    letter-spacing: 0.045em !important;
    text-transform: uppercase !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 232, 166, 0.12),
        0 0 20px rgba(217, 164, 65, 0.12) !important;
    animation: none !important;
    text-shadow: none !important;
}

.site-header .beta-corner-compact::before,
.site-header .beta-corner-compact::after {
    display: none !important;
    content: none !important;
}

.site-header .beta-corner-compact .beta-hammer {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 15px !important;
    fill: currentColor !important;
}

@media (max-width: 1280px) {
    .site-header {
        width: min(calc(100% - 32px), 1440px) !important;
        gap: 12px !important;
    }

    .site-header .header-crest {
        width: 52px !important;
        height: 52px !important;
        flex-basis: 52px !important;
    }

    .site-header .desktop-title {
        flex-basis: 160px !important;
    }

    .site-header .desktop-title__text {
        font-size: 25px !important;
        line-height: 25px !important;
    }

    .site-header .desktop-title__subtitle {
        font-size: 10px !important;
        letter-spacing: 0.18em !important;
    }

    .site-header .main-nav .nav-btn,
    .site-header .site-nav__primary #horn-btn {
        padding: 0 9px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .site-header {
        width: 100% !important;
        min-height: auto !important;
        margin: 0 0 10px !important;
        padding: 8px 10px !important;
        border-radius: 0 0 12px 12px !important;
    }

    .site-header .header-crest,
    .site-header .desktop-title,
    .site-header .beta-corner-compact {
        display: none !important;
    }

    .site-header .main-nav {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 86% !important;
        max-width: 340px !important;
        height: 100vh !important;
        padding: 18px 14px !important;
        border-radius: 0 !important;
        border: 0 !important;
        border-left: 1px solid rgba(218, 166, 72, 0.24) !important;
        background:
            linear-gradient(180deg, rgba(10, 20, 31, 0.98), rgba(5, 12, 20, 0.98)) !important;
        box-shadow: -20px 0 48px rgba(0, 0, 0, 0.55) !important;
        overflow-y: auto !important;
        z-index: 1000 !important;
    }

    .site-header .main-nav.active {
        right: 0 !important;
        display: flex !important;
    }

    .site-header .site-nav,
    .site-header .site-nav__primary,
    .site-header .site-nav__secondary {
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .site-header .main-nav .nav-btn,
    .site-header .site-nav__primary #horn-btn,
    .site-header .main-nav .discord-btn,
    .site-header .main-nav .auth-login-btn,
    .site-header .main-nav .auth-register-btn,
    .site-header .main-nav .user-info {
        width: 100% !important;
        min-width: 0 !important;
        height: 44px !important;
        min-height: 44px !important;
        border: 1px solid rgba(218, 166, 72, 0.16) !important;
        border-radius: 9px !important;
        background: rgba(12, 22, 33, 0.92) !important;
    }
}

/* Final page width lock: keep content aligned with the redesigned navbar. */
:root {
    --page-wide: 1440px;
}

.site-header,
.container {
    width: min(calc(100% - 48px), var(--page-wide)) !important;
    max-width: var(--page-wide) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}

@media (max-width: 1280px) {
    .site-header,
    .container {
        width: min(calc(100% - 32px), var(--page-wide)) !important;
    }
}

@media (max-width: 480px) {
    .site-header,
    .container {
        width: 100% !important;
    }

    .container {
        padding: 0 10px 16px !important;
        box-sizing: border-box !important;
    }
}
