.web-game-toolbar {
    position: relative;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.35rem 0;
    margin-bottom: 0.75rem;
}

.web-game-toolbar__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    min-height: 2.5rem;
}

.web-game-toolbar .web-locale-menu {
    position: relative;
    flex-shrink: 0;
}

.web-game-toolbar .web-locale-menu__panel {
    right: 0;
    left: auto;
}

.web-public-navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.65rem 0;
    z-index: 1030;
}

.web-public-navbar__logo {
    height: 52px;
    width: auto;
}

.web-public-navbar-spacer {
    height: 76px;
}

.web-public-navbar__toggler {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #0f172a;
    background: rgba(15, 23, 42, 0.04);
    font-size: 1.1rem;
}

.web-public-navbar__toggler:focus {
    box-shadow: none;
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.web-public-navbar__toggler[aria-expanded="true"] {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.web-navbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-left: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 1040;
}

.web-locale-menu {
    position: static;
}

.web-locale-menu__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 3.35rem;
    height: 2.5rem;
    padding: 0 0.65rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.04);
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.web-locale-menu__toggle::-webkit-details-marker,
.web-locale-menu__toggle::marker {
    display: none;
    content: "";
}

.web-locale-menu__toggle:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.web-locale-menu[open] > .web-locale-menu__toggle {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.web-locale-menu__toggle .fa-globe {
    font-size: 0.95rem;
}

.web-locale-menu__code {
    letter-spacing: 0.04em;
}

.web-locale-menu__panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 1080;
    min-width: 12rem;
    max-width: min(16rem, calc(100vw - 1.5rem));
    padding: 0.5rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

.web-locale-menu__title {
    padding: 0.25rem 0.55rem 0.45rem;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.web-locale-menu__form {
    margin: 0;
}

.web-locale-menu__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.75rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #1e293b;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.web-locale-menu__option:hover,
.web-locale-menu__option:focus-visible {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    outline: none;
}

.web-locale-menu__option.is-active {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    cursor: default;
}

.web-locale-menu__option .fa-check {
    font-size: 0.75rem;
    color: #2563eb;
}

@media (max-width: 991px) {
    html {
        overflow-x: hidden;
    }

    .web-public-navbar .navbar-brand {
        min-width: 0;
        max-width: calc(100% - 14.5rem);
    }

    .navbar .navbar-collapse,
    .web-public-navbar .navbar-collapse {
        flex-basis: 100%;
        width: 100%;
        max-width: 100%;
        background: #fff;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 16px;
        padding: 0.75rem;
        margin-top: 0.65rem;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
        overflow: hidden;
    }

    .web-public-navbar__logo {
        height: 44px;
    }

    .web-public-navbar-spacer {
        height: 68px;
    }
}

.web-game-toolbar__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.web-game-toolbar__link:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

@media (min-width: 992px) {
    .navbar .navbar-collapse {
        flex-grow: 1;
        justify-content: flex-end;
    }
}

.web-nav-menu {
    width: 100%;
}

.web-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.web-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.7rem;
    border-radius: 10px;
    color: #1e293b;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    text-align: left;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.web-nav-link i {
    width: 1.15rem;
    text-align: center;
    color: #2563eb;
    font-size: 0.95rem;
}

.web-nav-link:hover,
.web-nav-link:focus {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

@media (min-width: 992px) {
    .web-nav-menu {
        width: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 0.35rem;
    }

    .web-nav-links {
        flex-direction: row;
        align-items: center;
        gap: 0.1rem;
    }
}

.web-locale-switcher-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.web-locale-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 2.5rem;
}

.web-locale-switcher__globe {
    color: #2563eb;
    font-size: 0.95rem;
    line-height: 1;
}

.web-locale-switcher__label {
    display: none;
}

.web-locale-switcher__pills {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 2.25rem;
    padding: 3px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.web-locale-switcher__form {
    margin: 0;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.web-locale-switcher__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 2.5rem;
    height: 1.85rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    appearance: none;
    -webkit-appearance: none;
    vertical-align: middle;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.web-locale-switcher__pill:hover,
.web-locale-switcher__pill:focus-visible {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    outline: none;
}

.web-locale-switcher__pill.is-active {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    cursor: default;
}

@media (max-width: 991px) {
    .web-nav-menu {
        gap: 0.75rem;
    }

    .web-nav-link {
        width: 100%;
        padding: 0.85rem 0.9rem;
        font-size: 1rem;
        border-radius: 12px;
    }

    .web-nav-link i {
        width: 1.35rem;
        font-size: 1rem;
    }

    .web-nav-menu .web-profile-menu .dropdown-menu {
        position: static !important;
        transform: none !important;
        inset: auto !important;
        float: none;
        width: 100%;
        margin: 0.5rem 0 0;
    }
}

.dropdown-toggle-no-caret::after {
    display: none !important;
}

.web-public-navbar .dropdown-menu:not(.show) {
    display: none;
}

.web-profile-menu-wrap {
    display: flex;
    align-items: center;
}

.web-profile-menu {
    position: relative;
}

.web-profile-menu__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.web-profile-menu__toggle:hover,
.web-profile-menu__toggle.show {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
    color: #2563eb;
}

.web-profile-menu__toggle:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}

.web-profile-menu__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

.web-profile-menu__avatar--guest {
    background: #e2e8f0;
    color: #64748b;
}

.web-profile-menu__avatar--lg {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.95rem;
}

.web-profile-menu__label {
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.web-profile-menu__caret {
    font-size: 0.65rem;
    opacity: 0.65;
}

.web-profile-menu__panel {
    min-width: 18rem;
    max-width: 20rem;
    padding: 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
}

.web-profile-menu__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.web-profile-menu__header-text {
    min-width: 0;
}

.web-profile-menu__name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.web-profile-menu__meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
    word-break: break-word;
}

.web-profile-menu__badge {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.web-profile-menu__alert {
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.75rem;
    line-height: 1.35;
}

.web-profile-menu__alert-link {
    display: block;
    margin-top: 0.25rem;
    color: #c2410c;
    font-weight: 700;
    text-decoration: none;
}

.web-profile-menu__alert-link:hover {
    text-decoration: underline;
}

.web-profile-menu__section-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.web-profile-menu__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.web-profile-menu__stat {
    padding: 0.55rem 0.6rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.web-profile-menu__stat-label {
    display: block;
    font-size: 0.68rem;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.web-profile-menu__stat-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.web-profile-menu__stat-value small {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 0.1rem;
}

.web-profile-menu__links {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 0.55rem;
}

.web-profile-menu__link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.45rem;
    border-radius: 8px;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.web-profile-menu__link:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

.web-profile-menu__link--danger:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

.web-profile-menu__actions {
    padding-top: 0.25rem;
}

@media (min-width: 992px) {
    .web-nav-menu {
        gap: 0.35rem;
    }

    .web-locale-switcher-wrap,
    .web-profile-menu-wrap {
        width: auto;
        border-top: none;
        margin-top: 0;
        padding-top: 0;
    }
}

@media (max-width: 991px) {
    .web-nav-menu .web-profile-menu-wrap {
        width: 100%;
        padding-top: 0;
        border-top: none;
        margin-top: 0;
        margin-bottom: 0.25rem;
    }

    .web-nav-menu .web-profile-menu__toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .web-nav-menu .web-profile-menu__panel {
        width: 100%;
        max-width: none;
    }

    .web-profile-menu--header {
        position: static;
    }

    .web-navbar-tools .web-profile-menu__toggle {
        height: 2.5rem;
        max-width: 7.25rem;
        padding: 0 0.5rem 0 0.3rem;
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.04);
        border-color: transparent;
    }

    .web-navbar-tools .web-profile-menu__label {
        font-size: 0.8rem;
        max-width: 3.75rem;
    }

    .web-navbar-tools .web-profile-menu__panel {
        position: absolute !important;
        inset: auto 0 auto auto !important;
        top: calc(100% + 0.45rem) !important;
        right: 0 !important;
        left: auto !important;
        transform: none !important;
        float: none;
        width: min(20rem, calc(100vw - 1.5rem));
        max-width: min(20rem, calc(100vw - 1.5rem));
        max-height: min(70vh, 28rem);
        overflow-y: auto;
        margin: 0 !important;
        z-index: 1080;
    }
}

@media (max-width: 380px) {
    .web-public-navbar .navbar-brand {
        max-width: calc(100% - 10rem);
    }

    .web-navbar-tools .web-profile-menu__label,
    .web-navbar-tools .web-profile-menu__caret {
        display: none;
    }

    .web-navbar-tools .web-profile-menu__toggle {
        width: 2.5rem;
        max-width: 2.5rem;
        padding: 0;
        justify-content: center;
    }
}

.web-profile-menu__avatar--img {
    object-fit: cover;
    background: #fff;
}

.web-profile-settings-page {
    background-image: url('/images/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.web-profile-settings-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: -1;
}

.web-profile-settings {
    position: relative;
    z-index: 1;
}

.web-profile-settings__card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.web-profile-settings__section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.web-profile-settings__avatar-preview {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px solid rgba(37, 99, 235, 0.2);
}

.web-profile-settings__avatar-preview--initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 800;
    font-size: 1.5rem;
}

.web-profile-settings__preset-group {
    margin-bottom: 1rem;
}

.web-profile-settings__preset-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.65rem;
}

.web-profile-settings__preset-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.web-profile-settings__preset-option {
    width: 84px;
    text-align: center;
    cursor: pointer;
}

.web-profile-settings__preset-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.web-profile-settings__preset-option img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    object-fit: cover;
    transition: border-color 0.15s ease;
}

.web-profile-settings__preset-option span {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.35rem;
}

.web-profile-settings__preset-option input:checked + img {
    border-color: #2563eb;
}

.web-profile-settings__upload-box {
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.25rem;
    background: #f8fafc;
}

.web-profile-settings__upload-label {
    display: block;
    text-align: center;
    cursor: pointer;
    margin-bottom: 0;
}
