/* Modal: галерея скинов (CDN + манифест, без PHP) */

.skins-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2500;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.skins-modal.skins-modal--visible {
    display: flex;
}

.skins-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.skins-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    max-height: min(90vh, 760px);
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 12px;
    background: linear-gradient(165deg, rgba(14, 18, 26, 0.99), rgba(8, 10, 14, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.skins-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.skins-modal__title-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.skins-modal__title-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(125, 211, 252, 0.2), rgba(47, 181, 107, 0.12));
    color: #9ec9ff;
    font-size: 20px;
    flex-shrink: 0;
}

.skins-modal__header h2 {
    margin: 0 0 2px;
    font-size: 20px;
    font-weight: 700;
    color: #eaf0ff;
}

.skins-modal__subtitle {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
}

.skins-modal__close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #c8d0e0;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skins-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.skins-modal__tabs {
    display: flex;
    gap: 8px;
    padding: 0 18px 12px;
}

.skins-modal__tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted, #8e9199);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.skins-modal__tab:hover {
    color: #dce4f4;
    background: rgba(255, 255, 255, 0.05);
}

.skins-modal__tab.active {
    color: #eaf0ff;
    border-color: rgba(125, 211, 252, 0.45);
    background: rgba(125, 211, 252, 0.12);
}

.skins-modal__tab--active-skin::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2fb56b;
    margin-left: 2px;
}

.skins-modal__panels {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.skins-modal__panel {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    padding: 0 18px 18px;
}

.skins-modal__panel--active {
    display: flex;
}

.skins-catalog-toolbar {
    flex-shrink: 0;
    margin-bottom: 10px;
}

.skins-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.25);
}

.skins-search-wrap i {
    color: rgba(255, 255, 255, 0.35);
    font-size: 14px;
}

.skins-search {
    flex: 1;
    border: none;
    background: transparent;
    color: #eaf0ff;
    font-size: 14px;
    padding: 10px 0;
    outline: none;
    min-width: 0;
}

.skins-search::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.skins-modal__body {
    flex: 1;
    min-height: 160px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.skins-modal__body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.skins-imgur-card {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 8px 0 4px;
    align-items: flex-start;
}

.skins-imgur-card__preview-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.skins-imgur-preview-wrap {
    display: block;
}

.skins-imgur-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #0b0f15 center / cover no-repeat;
    border: 2px solid rgba(125, 211, 252, 0.35);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.skins-imgur-preview--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.25);
    font-size: 32px;
}

.skins-imgur-preview--empty i {
    pointer-events: none;
}

.skins-imgur-card__preview-label {
    font-size: 12px;
}

.skins-imgur-card__form {
    flex: 1;
    min-width: 220px;
}

.skins-imgur-card__hint {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
}

.skins-imgur-card__hint code {
    font-size: 12px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
}

.skins-imgur-card__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(234, 240, 255, 0.7);
    margin-bottom: 6px;
}

.skins-imgur-card__input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #eaf0ff;
    font-size: 14px;
    outline: none;
}

.skins-imgur-card__input:focus {
    border-color: rgba(125, 211, 252, 0.5);
}

.skins-imgur-card__actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: stretch;
}

.skins-imgur-card__save {
    flex: 1;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.skins-imgur-card__clear {
    width: 44px;
    flex-shrink: 0;
}

.skins-imgur-card__msg {
    margin: 10px 0 0;
    font-size: 13px;
    min-height: 1.2em;
}

.skin-gallery .skin.skin--hidden {
    display: none;
}

.skin-gallery-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skin-gallery__section-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(234, 240, 255, 0.55);
}

.skin-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 12px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.skin-gallery .skin {
    list-style-type: none;
    margin: 0;
    max-width: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.12s ease;
}

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

.skin-gallery .skin.skin--selected .circular {
    box-shadow: 0 0 0 3px rgba(125, 249, 255, 0.9), 0 0 16px rgba(125, 211, 252, 0.35);
}

.skin-gallery .circular {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto;
    -webkit-border-radius: 48px;
    -moz-border-radius: 48px;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
    -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
    -moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
    background-size: cover;
    cursor: pointer;
}

.skin-gallery .circular:hover {
    box-shadow: 0 0 14px rgba(31, 111, 235, 0.35);
    -webkit-transition: box-shadow 0.15s ease;
    transition: box-shadow 0.15s ease;
}

.skin-gallery .title {
    margin: 6px 0 0;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    color: #a8b4c8;
    word-break: break-word;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
}

.skin-gallery .title:hover {
    color: #eaf0ff;
}

.imgDescription {
    text-align: center;
    position: relative;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(29, 106, 154, 0.72);
    color: #fff;
    visibility: hidden;
    opacity: 0;
    -webkit-transition: visibility opacity 0.2s;
}

.circular:hover .imgDescription {
    visibility: visible;
    opacity: 1;
}

/* Modal: магазин (пока каркас, без товаров) */

.shop-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2550;
    align-items: stretch;
    justify-content: center;
    padding: 14px 18px;
    box-sizing: border-box;
}

.shop-modal.shop-modal--visible {
    display: flex;
}

.shop-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.shop-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1020px;
    height: 100%;
    max-height: none;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 14px 18px 16px;
    border-radius: 12px;
    background: radial-gradient(1200px 380px at 20% 0%, rgba(31, 111, 235, 0.18), transparent 65%),
        linear-gradient(180deg, rgba(12, 16, 22, 0.98), rgba(8, 11, 16, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

.shop-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.shop-modal__title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.shop-modal__title-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 111, 235, 0.14);
    border: 1px solid rgba(31, 111, 235, 0.18);
    color: #a9c7ff;
    flex-shrink: 0;
}

.shop-modal__header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #eaf0ff;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-modal__header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.shop-modal__balance {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #eaf0ff;
    background: rgba(47, 181, 107, 0.12);
    border: 1px solid rgba(47, 181, 107, 0.22);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.shop-modal__close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #c8d0e0;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.shop-modal__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.shop-modal__section-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(234, 240, 255, 0.62);
    margin-bottom: 10px;
}

.shop-modal__section-title--center {
    text-align: center;
    font-size: 13px;
    margin-bottom: 12px;
}

.shop-modal__catalog {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 14px 16px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.shop-modal__catalog-area {
    flex: 1;
    min-height: 0;
    width: 100%;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Каталог товаров (демо) */

.shop-catalog {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px 10px 8px;
}

.shop-catalog__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.shop-catalog__tab {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    color: var(--muted, #9aa1ab);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.shop-catalog__tab:hover {
    color: #eaf0ff;
    background: rgba(255, 255, 255, 0.05);
}

.shop-catalog__tab.active {
    color: #eaf0ff;
    background: rgba(31, 111, 235, 0.18);
    border-color: rgba(31, 111, 235, 0.35);
}

.shop-catalog__grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 10px;
    align-content: start;
    padding: 2px 2px 8px;
}

.shop-catalog__grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.shop-catalog__demo-note {
    flex-shrink: 0;
    margin: 8px 0 0;
    font-size: 11px;
    text-align: center;
    opacity: 0.75;
}

.shop-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 10px 10px 12px;
    border-radius: 12px;
    background: linear-gradient(165deg, rgba(22, 28, 38, 0.95), rgba(10, 13, 18, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.shop-item:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 111, 235, 0.25);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.shop-item--featured {
    border-color: rgba(47, 181, 107, 0.35);
    background: linear-gradient(165deg, rgba(20, 40, 28, 0.5), rgba(10, 13, 18, 0.98));
}

.shop-item--vip {
    border-color: rgba(255, 155, 46, 0.3);
}

.shop-item--bundle {
    border-color: rgba(168, 85, 247, 0.35);
}

.shop-item__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    z-index: 1;
}

.shop-item__badge--common { background: rgba(154, 161, 171, 0.2); color: #c8d0e0; }
.shop-item__badge--rare { background: rgba(31, 111, 235, 0.25); color: #a9c7ff; }
.shop-item__badge--epic { background: rgba(168, 85, 247, 0.28); color: #e0c4ff; }
.shop-item__badge--legend { background: rgba(47, 181, 107, 0.28); color: #b8f5d0; }
.shop-item__badge--vip { background: rgba(255, 155, 46, 0.25); color: #ffd9a8; }
.shop-item__badge--bundle { background: rgba(255, 80, 120, 0.25); color: #ffc0d0; }

.shop-item__preview {
    width: 72px;
    height: 72px;
    margin: 4px auto 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.shop-item__preview--neon {
    background: radial-gradient(circle at 35% 30%, #7df9ff, #1f6feb 55%, #0a1628);
    box-shadow: 0 0 24px rgba(31, 111, 235, 0.55);
}

.shop-item__preview--galaxy {
    background: radial-gradient(circle at 40% 35%, #e8c4ff, #6b21a8 45%, #0f172a 80%);
    box-shadow: 0 0 22px rgba(107, 33, 168, 0.5);
}

.shop-item__preview--toxic {
    background: radial-gradient(circle at 40% 30%, #b8ff6a, #16a34a 50%, #052e16);
    box-shadow: 0 0 26px rgba(34, 197, 94, 0.55);
    animation: shop-pulse 2.2s ease-in-out infinite;
}

.shop-item__preview--nick-gold .shop-item__nick {
    color: #f5c542;
    text-shadow: 0 0 12px rgba(245, 197, 66, 0.5);
}

.shop-item__preview--nick-crimson .shop-item__nick {
    color: #f87171;
    text-shadow: 0 0 10px rgba(248, 113, 113, 0.45);
}

.shop-item__preview--nick-gold,
.shop-item__preview--nick-crimson,
.shop-item__preview--nick-ice,
.shop-item__preview--nick-neon,
.shop-item__preview--nick-emerald,
.shop-item__preview--nick-pink {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    width: 100%;
    height: 56px;
    margin-bottom: 10px;
}

.shop-item__preview--nick-ice .shop-item__nick { color: #7df9ff; text-shadow: 0 0 12px rgba(125, 249, 255, 0.5); }
.shop-item__preview--nick-neon .shop-item__nick { color: #a78bfa; text-shadow: 0 0 12px rgba(167, 139, 250, 0.5); }
.shop-item__preview--nick-emerald .shop-item__nick { color: #34d399; text-shadow: 0 0 12px rgba(52, 211, 153, 0.45); }
.shop-item__preview--nick-pink .shop-item__nick { color: #f472b6; text-shadow: 0 0 12px rgba(244, 114, 182, 0.45); }

.shop-item__preview--ring-plasma {
    background-color: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px #1f6feb, 0 0 18px rgba(31, 111, 235, 0.6);
}

.shop-item__preview--ring-fire {
    background-color: rgba(30, 10, 5, 0.9);
    box-shadow: 0 0 0 3px #f97316, 0 0 22px rgba(249, 115, 22, 0.7);
    animation: shop-pulse 1.8s ease-in-out infinite;
}

.shop-item__preview--ring-toxic {
    background-color: rgba(5, 30, 10, 0.9);
    box-shadow: 0 0 0 3px #22c55e, 0 0 22px rgba(34, 197, 94, 0.65);
}

.shop-item__preview--trail-comet {
    background: radial-gradient(circle, #fff 0%, #94a3b8 40%, transparent 70%);
    position: relative;
}

.shop-item__preview--trail-comet::after {
    content: "";
    position: absolute;
    left: -28px;
    width: 36px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.8));
}

.shop-item__preview--trail-stardust {
    background: radial-gradient(circle at 55% 45%, #1a0a2e 0%, #0f172a 70%);
    position: relative;
    overflow: visible;
}

.shop-item__preview--trail-stardust::before {
    content: "✦";
    position: absolute;
    left: 8px;
    top: 28px;
    color: #fbbf24;
    font-size: 10px;
    text-shadow: 0 0 8px #fbbf24;
}

.shop-item__preview--trail-stardust::after {
    content: "·  ✦  ·";
    position: absolute;
    left: -4px;
    top: 34px;
    font-size: 9px;
    letter-spacing: 3px;
    color: #c4b5fd;
    text-shadow: 0 0 6px #a78bfa;
}

.shop-item__preview--trail-smoke {
    background: radial-gradient(circle at 50% 50%, #cbd5e1 0%, #64748b 55%, #334155 85%);
    position: relative;
    filter: blur(0.2px);
}

.shop-item__preview--trail-smoke::after {
    content: "";
    position: absolute;
    left: -18px;
    top: 22px;
    width: 44px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(203, 213, 225, 0.75), rgba(100, 116, 139, 0.2) 70%, transparent);
}

.shop-item__preview--entry-sub {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.25), rgba(20, 10, 10, 0.95));
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 22px;
}

.shop-item__preview--skin-neon { background: radial-gradient(circle at 35% 30%, #7df9ff, #1f6feb 55%, #0a1628); }
.shop-item__preview--skin-galaxy { background: radial-gradient(circle at 40% 35%, #e8c4ff, #6b21a8 45%, #0f172a 80%); }
.shop-item__preview--skin-ember { background: radial-gradient(circle at 40% 30%, #fdba74, #ea580c 50%, #431407); }
.shop-item__preview--skin-frost { background: radial-gradient(circle at 35% 30%, #e0f2fe, #38bdf8 45%, #0c4a6e); }
.shop-item__preview--skin-toxic { background: radial-gradient(circle at 40% 30%, #b8ff6a, #16a34a 50%, #052e16); }

.shop-item__preview--vip-plus {
    color: #ffd966;
    box-shadow: 0 0 28px rgba(255, 217, 102, 0.55);
    background: radial-gradient(circle, rgba(255, 200, 50, 0.25), rgba(20, 12, 0, 0.9));
}

.shop-item__preview--clan-color,
.shop-item__preview--clan-animated,
.shop-item__preview--clan-banner,
.shop-item__preview--lb-silver,
.shop-item__preview--lb-gold,
.shop-item__preview--lb-platinum,
.shop-item__preview--lb-fire,
.shop-item__preview--service,
.shop-item__preview--spawn-tint,
.shop-item__preview--entry-msg,
.shop-item__preview--gift,
.shop-item__preview--battlepass,
.shop-item__preview--bundle-comet,
.shop-item__preview--bundle-neon,
.shop-item__preview--bundle-full {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c4b5fd;
    font-size: 26px;
}

.shop-item__preview--lb-gold { color: #f5c542; box-shadow: 0 0 16px rgba(245, 197, 66, 0.35); }
.shop-item__preview--lb-fire { color: #f97316; box-shadow: 0 0 18px rgba(249, 115, 22, 0.4); }

.shop-item--bundle .shop-item__preview--bundle,
.shop-item--bundle .shop-item__preview--bundle-comet,
.shop-item--bundle .shop-item__preview--bundle-neon,
.shop-item--bundle .shop-item__preview--bundle-full {
    color: #c4b5fd;
}

.shop-item__nick {
    font-size: 15px;
    font-weight: 800;
}

.shop-item__preview--emoji {
    background: rgba(31, 111, 235, 0.12);
    border: 1px solid rgba(31, 111, 235, 0.2);
    color: #ffd966;
    font-size: 28px;
}

.shop-item__preview--ring {
    background: transparent;
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 0 3px #1f6feb, 0 0 18px rgba(31, 111, 235, 0.6), inset 0 0 12px rgba(125, 249, 255, 0.3);
    background-color: rgba(15, 23, 42, 0.9);
}

.shop-item__preview--trail {
    background: radial-gradient(circle, #fff 0%, #94a3b8 40%, transparent 70%);
    position: relative;
}

.shop-item__preview--trail::after {
    content: "";
    position: absolute;
    left: -28px;
    width: 36px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.8));
}

.shop-item--owner-title {
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(165deg, rgba(60, 10, 10, 0.55), rgba(10, 13, 18, 0.98));
    box-shadow: 0 0 28px rgba(239, 68, 68, 0.22);
}

.shop-item--owner-title:hover {
    border-color: rgba(248, 113, 113, 0.55);
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.28);
}

.shop-item__preview--title,
.shop-item__preview--title-owner,
.shop-item__preview--vip,
.shop-item__preview--bundle {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffd966;
    font-size: 26px;
}

.shop-item__preview--title-owner {
    background: radial-gradient(circle at 35% 30%, #ff8080, #ef4444 42%, #7f1d1d 78%, #450a0a);
    border-color: rgba(255, 80, 80, 0.45);
    color: #ff5555;
    box-shadow: 0 0 28px rgba(239, 68, 68, 0.65);
    animation: shop-owner-shimmer 1.35s ease-in-out infinite;
}

.shop-item__preview--vip {
    color: #ff9b2e;
    box-shadow: 0 0 20px rgba(255, 155, 46, 0.35);
}

.shop-item__preview--bundle {
    color: #c4b5fd;
}

.shop-item__name {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 800;
    color: #eaf0ff;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-item__desc {
    margin: 0 0 10px;
    flex: 1;
    font-size: 11px;
    line-height: 1.35;
    color: rgba(154, 161, 171, 0.95);
}

.shop-item__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.shop-modal__footer {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.22);
}

.shop-daily {
    flex: 1 1 280px;
    min-width: 0;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(31, 111, 235, 0.08);
    border: 1px solid rgba(125, 249, 255, 0.15);
}

.shop-daily__title {
    font-size: 12px;
    font-weight: 800;
    color: #7df9ff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.shop-daily__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.shop-daily__pill {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #eaf0ff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-item__price {
    font-size: 14px;
    font-weight: 800;
    color: #eaf0ff;
}

.shop-item__old {
    font-size: 11px;
    font-weight: 600;
    color: rgba(154, 161, 171, 0.7);
    margin-right: 4px;
    text-decoration: line-through;
}

.shop-item__buy {
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, transform 0.08s;
}

.shop-item__buy:hover {
    background: rgba(255,255,255,0.12);
}

.shop-item__buy:active {
    transform: scale(0.97);
}

.shop-item__buy--accent {
    background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.08));
}

.shop-item__buy.is-demo-flash {
    background: rgba(154, 161, 171, 0.35);
}

.shop-item__buy--owned {
    background: rgba(255,255,255,0.06);
    color: rgba(236,236,239,0.7);
    cursor: default;
}

.shop-item__buy--use {
    background: rgba(255,255,255,0.12);
}

.shop-item__buy--use:hover {
    background: rgba(255,255,255,0.16);
}

.shop-item__buy--active {
    background: rgba(255,255,255,0.06);
    color: rgba(236,236,239,0.8);
    cursor: default;
}

.shop-item__buy--remove {
    background: rgba(255, 120, 90, 0.15);
    border-color: rgba(255, 140, 100, 0.4);
    color: #ffc8b8;
}

.shop-item__buy--remove:hover {
    background: rgba(255, 120, 90, 0.28);
}

.shop-item--owned {
    border-color: rgba(47, 181, 107, 0.22);
}

.shop-item--active {
    border-color: rgba(31, 111, 235, 0.45);
    box-shadow: 0 0 0 1px rgba(31, 111, 235, 0.2);
}

.shop-item--owned:not(.shop-item--active) .shop-item__preview--ring,
.shop-item--owned:not(.shop-item--active) .shop-item__preview--trail,
.shop-item--owned:not(.shop-item--active) .shop-item__preview--trail::after {
    opacity: 0.32;
    filter: grayscale(0.35);
}

.shop-item--active .shop-item__preview--ring,
.shop-item--active .shop-item__preview--trail,
.shop-item--active .shop-item__preview--trail::after {
    opacity: 1;
    filter: none;
}

/* ——— Модалка клана ——— */
.shop-modal.clan-modal.shop-modal--visible {
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
}

.shop-modal.clan-modal .shop-modal__dialog.clan-modal__dialog {
    width: 100%;
    max-width: min(1040px, calc(100vw - 32px));
    height: auto;
    max-height: min(92vh, 900px);
    margin: 0;
    flex: 0 1 auto;
    align-self: center;
    padding: 12px 14px 10px;
}

/* Компактно, пока игрок не в клане (создать / вступить) */
.shop-modal.clan-modal:not(.clan-modal--member) .shop-modal__dialog.clan-modal__dialog {
    max-width: min(720px, calc(100vw - 32px));
}

.shop-modal.clan-modal.clan-modal--member .shop-modal__dialog.clan-modal__dialog {
    height: auto;
    max-height: min(92vh, 900px);
}

.clan-modal__title-icon {
    background: rgba(168, 85, 247, 0.14);
    border-color: rgba(168, 85, 247, 0.22);
    color: #e0c4ff;
}

.clan-modal__body {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.shop-modal.clan-modal.clan-modal--member .clan-modal__body {
    flex: 0 1 auto;
    overflow: visible;
    max-height: calc(92vh - 70px);
    overflow-y: auto;
}

/* Скролл колёсиком без видимого ползунка */
.clan-scroll,
.clan-modal__body.clan-scroll,
.shop-modal.clan-modal.clan-modal--member .clan-modal__body,
.clan-ui__main,
.clan-members,
.clan-chat-log {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.clan-scroll::-webkit-scrollbar,
.clan-modal__body.clan-scroll::-webkit-scrollbar,
.shop-modal.clan-modal.clan-modal--member .clan-modal__body::-webkit-scrollbar,
.clan-ui__main::-webkit-scrollbar,
.clan-members::-webkit-scrollbar,
.clan-chat-log::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.clan-modal__xp {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #c8d0e0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.clan-ui {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 1 auto;
    color: #c8d0e0;
    font-size: 14px;
}

.clan-ui--in-clan {
    flex: 0 1 auto;
    min-height: 0;
}

.clan-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 155, 46, 0.1);
    border: 1px solid rgba(255, 155, 46, 0.28);
    color: #ffd9a8;
    font-size: 13px;
}

.clan-alert i {
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.clan-alert strong {
    display: block;
    color: #fff3e0;
    margin-bottom: 4px;
}

.clan-alert span {
    color: rgba(255, 217, 168, 0.85);
    line-height: 1.45;
}

.clan-war-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid rgba(255, 120, 90, 0.35);
    color: #ffc8b8;
    font-size: 13px;
    font-weight: 600;
}

.war-event-bar {
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 850;
    display: none;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    max-width: min(96vw, 920px);
    padding: 5px 12px;
    border-radius: 10px;
    background: rgba(8, 6, 18, 0.72);
    border: 1px solid rgba(255, 90, 70, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    color: #ffe8e0;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    line-height: 1.25;
}

.war-event-bar.war-event-bar--visible,
.war-event-bar:not([hidden]) {
    display: flex;
}

.war-event-bar[hidden] {
    display: none !important;
}

.war-event-bar__matches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
}

.war-event-bar--many .war-event-bar__matches {
    gap: 4px 8px;
    font-size: 11px;
}

.war-event-bar__match {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 60, 40, 0.12);
}

.war-event-bar--many .war-event-bar__match {
    padding: 1px 5px;
    gap: 4px;
}

.war-event-bar__clan {
    color: #ffb8a8;
    max-width: 10em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.war-event-bar__kills {
    color: #fff;
    font-variant-numeric: tabular-nums;
    min-width: 1.2em;
    text-align: center;
}

.war-event-bar__vs {
    color: rgba(255, 180, 160, 0.55);
    font-weight: 500;
    font-size: 0.9em;
}

.war-event-bar__timer {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 80, 50, 0.2);
    color: #ffd4c8;
    font-variant-numeric: tabular-nums;
    font-size: 11px;
}

.war-event-bar--many .war-event-bar__timer {
    font-size: 10px;
    padding: 1px 6px;
}

@media (max-width: 640px) {
    .war-event-bar {
        top: 6px;
        max-width: 98vw;
        padding: 4px 8px;
        font-size: 11px;
    }

    .war-event-bar__clan {
        max-width: 7em;
    }
}

.clan-ui__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 720px) {
    .clan-ui__grid {
        grid-template-columns: 1fr;
    }

    .clan-diplomacy {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .shop-modal.clan-modal {
        padding: 10px 8px;
    }

    .shop-modal.clan-modal.clan-modal--member .shop-modal__dialog.clan-modal__dialog {
        height: min(96vh, 900px);
        max-height: 96vh;
        padding: 12px 14px;
    }
}

.clan-card {
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.clan-card--secondary {
    background: rgba(0, 0, 0, 0.2);
}

.clan-card--compact {
    padding: 12px 14px;
    margin-bottom: 0;
}

.clan-ui__main .clan-card--compact:last-child {
    margin-bottom: 0;
    padding-bottom: 12px;
}

.clan-card--chat {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
    max-height: none;
    margin-bottom: 0;
}

.clan-card__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    color: #eaf0ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clan-card__title i {
    color: #a9c7ff;
    font-size: 15px;
}

.clan-card__subtitle {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #dce4f4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clan-card__desc {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(154, 161, 171, 0.95);
}

.clan-card__desc code {
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: #b8d4ff;
    font-size: 11px;
}

.clan-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.clan-field--inline {
    flex: 1;
    min-width: 120px;
    margin-bottom: 0;
}

.clan-field--grow {
    flex: 2;
    min-width: 140px;
}

.clan-field--narrow {
    flex: 0 0 100px;
    min-width: 80px;
}

.clan-field__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(154, 161, 171, 0.95);
}

.clan-field__hint {
    font-size: 11px;
    color: rgba(154, 161, 171, 0.75);
    line-height: 1.35;
}

.clan-modal .clan-input,
.clan-modal input.clan-input,
.clan-modal textarea.clan-input {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0e0e10;
    color: #eaf0ff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.clan-modal .clan-input::placeholder {
    color: rgba(154, 161, 171, 0.65);
}

.clan-modal .clan-input:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.clan-modal .clan-input:focus {
    border-color: rgba(31, 111, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.clan-modal input[type="number"].clan-input {
    -moz-appearance: textfield;
}

.clan-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.clan-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.clan-btn--primary {
    background: linear-gradient(180deg, rgba(31, 111, 235, 0.55), rgba(31, 111, 235, 0.35));
    border-color: rgba(31, 111, 235, 0.5);
    color: #eaf0ff;
}

.clan-btn--primary:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(31, 111, 235, 0.7), rgba(31, 111, 235, 0.45));
}

.clan-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #dce4f4;
}

.clan-btn--ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.clan-btn--danger {
    background: rgba(220, 60, 60, 0.15);
    border-color: rgba(255, 100, 90, 0.35);
    color: #ffb4a8;
}

.clan-btn--ok {
    padding: 6px 10px;
    background: rgba(47, 181, 107, 0.2);
    border-color: rgba(47, 181, 107, 0.35);
    color: #b8f5d0;
}

.clan-btn--block {
    width: 100%;
    margin-top: 8px;
}

.clan-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.clan-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(31, 111, 235, 0.12), rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;
    box-sizing: border-box;
}

.clan-profile__badge {
    flex-shrink: 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 800;
    color: var(--clan-color, #7df9ff);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 0.04em;
}

.clan-profile__name {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: #eaf0ff;
}

.clan-profile__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: rgba(200, 208, 224, 0.9);
}

.clan-profile__treasury {
    color: #b8f5d0;
    font-weight: 700;
}

.clan-top-row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    flex-shrink: 0;
}

@media (max-width: 720px) {
    .clan-top-row {
        grid-template-columns: 1fr;
    }
}

.clan-diplomacy {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    align-content: start;
}

.clan-diplomacy__title {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 700;
    color: #d8dce6;
}

.clan-diplomacy__block + .clan-diplomacy__block {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.clan-diplomacy__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(154, 161, 171, 0.95);
    margin-bottom: 6px;
}

.clan-diplomacy__label i {
    margin-right: 4px;
}

.clan-diplomacy__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.clan-diplomacy__empty {
    margin: 0;
    font-size: 12px;
    color: rgba(154, 161, 171, 0.85);
}

.clan-war-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 100, 90, 0.15);
    border: 1px solid rgba(255, 120, 100, 0.25);
    color: #ffc8b8;
    font-size: 12px;
    font-weight: 600;
}

.clan-ally-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(80, 200, 140, 0.12);
    border: 1px solid rgba(100, 220, 160, 0.28);
    color: #b8f5d0;
    font-size: 12px;
    font-weight: 600;
}

.clan-inline-row--mt {
    margin-top: 8px;
}

.clan-field--compact {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.clan-field--compact .clan-field__label {
    margin-bottom: 4px;
    font-size: 10px;
}

.clan-action-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.clan-action-row .clan-btn {
    flex-shrink: 0;
    white-space: nowrap;
    margin-bottom: 0;
}

.clan-btn--sm {
    padding: 7px 12px;
    font-size: 12px;
    margin-top: 8px;
    width: 100%;
}

.clan-ui__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    gap: 12px;
    align-items: start;
    flex: 0 1 auto;
    min-height: 0;
}

@media (max-width: 860px) {
    .clan-ui__layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .clan-ui__layout::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
}

.clan-ui__main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
}

.clan-members {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    max-height: 160px;
    overflow-y: auto;
}

.clan-mgmt-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.clan-mgmt-grid__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}

@media (max-width: 560px) {
    .clan-mgmt-grid__pair {
        grid-template-columns: 1fr;
    }
}

.clan-mgmt-grid .clan-tool-block {
    margin-bottom: 0;
    padding: 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.clan-mgmt-grid .clan-tool-block:last-child {
    padding-bottom: 12px;
}

.clan-tool-block--compact {
    padding: 10px 12px;
}

.clan-tool-block--compact .clan-tool-block__title {
    margin: 0 0 8px;
    font-size: 12px;
}

.clan-mgmt-grid .clan-tool-block--compact + .clan-tool-block--compact {
    margin-top: 0;
}

.clan-member {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
}

.clan-member:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.clan-member__nick {
    color: #eaf0ff;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clan-member__role {
    font-size: 11px;
    color: rgba(154, 161, 171, 0.95);
}

.clan-member__role--leader {
    color: #ffd9a8;
    font-weight: 700;
}

.multibox-auth-hint {
    line-height: 1.35;
}

#settings-multibox .toggle input:disabled + .slider {
    opacity: 0.35;
    cursor: not-allowed;
}

#settings-multibox .toggle input:disabled ~ .label-text {
    opacity: 0.55;
}

.clan-tag-color {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.clan-tag-color__hint {
    font-weight: 400;
    color: rgba(154, 161, 171, 0.85);
    font-size: 11px;
}

.clan-tag-color__row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.clan-tag-color__picker {
    width: 44px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: #0e0e10;
    cursor: pointer;
}

.clan-tag-color__preview {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-shadow: 0 0 12px currentColor;
}

.clan-member__xp {
    font-size: 11px;
    color: rgba(154, 161, 171, 0.85);
}

.clan-count {
    font-weight: 400;
    color: rgba(154, 161, 171, 0.8);
}

.clan-tool-block {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.clan-tool-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.clan-tool-block__title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(200, 208, 224, 0.9);
}

.clan-tool-block__hint {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: rgba(255, 200, 180, 0.65);
}

.clan-inline-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.clan-inline-row--wrap {
    flex-wrap: wrap;
}

.clan-treasury-grid {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
}

@media (max-width: 480px) {
    .clan-treasury-grid {
        grid-template-columns: 1fr;
    }
}

.clan-inline-row .clan-field {
    flex: 1;
    margin-bottom: 0;
}

.clan-inline-row .clan-btn {
    flex-shrink: 0;
    margin-bottom: 0;
    align-self: flex-end;
}

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

.clan-app {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.clan-app span {
    flex: 1;
    color: #eaf0ff;
    font-weight: 600;
}

.clan-chat-log {
    flex: 0 1 auto;
    min-height: 72px;
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #0a0a0c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    line-height: 1.45;
    color: #c8d0e0;
}

.clan-chat-log div {
    margin-bottom: 6px;
    word-break: break-word;
}

.clan-chat-compose {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.clan-chat-compose .clan-input {
    flex: 1;
}

.clan-chat-compose .clan-btn {
    flex-shrink: 0;
    width: 44px;
    padding: 0;
}

.clan-top-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.clan-top-table th,
.clan-top-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.clan-top-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(154, 161, 171, 0.9);
    font-weight: 700;
}

.clan-top-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ——— Модалки топов ——— */
.shop-modal.leaderboard-modal.shop-modal--visible {
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
}

.shop-modal.leaderboard-modal .leaderboard-modal__dialog {
    width: 100%;
    max-width: 720px;
    height: auto;
    max-height: min(88vh, 680px);
    margin: 0;
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
}

.leaderboard-modal__title-icon {
    background: rgba(255, 200, 80, 0.12);
    border-color: rgba(255, 200, 80, 0.25);
    color: #ffd98a;
}

.leaderboard-modal__title-icon--clans {
    background: rgba(31, 111, 235, 0.14);
    border-color: rgba(31, 111, 235, 0.22);
    color: #a9c7ff;
}

.leaderboard-modal__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.leaderboard-modal__hint {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(154, 161, 171, 0.95);
    flex-shrink: 0;
}

.leaderboard-modal__table-wrap {
    flex: 1;
    min-height: 200px;
    max-height: min(52vh, 480px);
    overflow: auto;
    overflow-x: hidden;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.leaderboard-modal__table-wrap::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.leaderboard-modal__footer {
    flex-shrink: 0;
    padding-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.leaderboard-empty {
    margin: 0;
    padding: 32px 16px;
    text-align: center;
    color: rgba(154, 161, 171, 0.9);
    font-size: 13px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.leaderboard-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #12141a;
}

.leaderboard-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(154, 161, 171, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #c8d0e0;
}

.leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.leaderboard-table__rank {
    width: 48px;
    font-weight: 800;
    color: rgba(154, 161, 171, 0.9);
}

.leaderboard-table__rank--1 { color: #ffd98a; }
.leaderboard-table__rank--2 { color: #d4dde8; }
.leaderboard-table__rank--3 { color: #cd7f32; }

.leaderboard-table__nick,
.leaderboard-table__name {
    font-weight: 600;
    color: #eaf0ff;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-table__tag {
    font-weight: 700;
    color: #a9c7ff;
    white-space: nowrap;
}

.leaderboard-table__xp {
    font-weight: 700;
    color: #b8f5d0;
    text-align: right;
    white-space: nowrap;
}

.leaderboard-table th:last-child,
.leaderboard-table td.leaderboard-table__xp {
    text-align: right;
}

.leaderboard-table__row--frame-silver td {
    box-shadow: inset 0 0 0 1px rgba(192, 192, 210, 0.5);
}

.leaderboard-table__row--frame-gold td {
    box-shadow: inset 0 0 0 1px rgba(245, 197, 66, 0.62);
}

.leaderboard-table__row--frame-platinum td {
    box-shadow: inset 0 0 0 1px rgba(186, 230, 253, 0.68);
}

.leaderboard-table__row--frame-fire td {
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.72);
}

.leaderboard-table__title {
    font-weight: 700;
}

.leaderboard-table__title--legend,
.leaderboard-table__title--champion {
    color: #fbbf24;
}

.leaderboard-table__title--hunter {
    color: #f87171;
}

.leaderboard-table__title--veteran {
    color: #93c5fd;
}

.leaderboard-table__title--donator {
    color: #c4b5fd;
}

.leaderboard-table__title--owner {
    background: linear-gradient(90deg, #ff2222, #ff7777, #cc1111, #ff5555, #ff3333, #ff2222);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: owner-title-shimmer 1.35s ease-in-out infinite;
}

.leaderboard-table__nick--shimmer {
    background: linear-gradient(90deg, currentColor, #ffffff, currentColor, #ffe8a8, currentColor);
    background-size: 240% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: owner-title-shimmer 1.45s ease-in-out infinite;
}

.leaderboard-table__clan--shimmer {
    background: linear-gradient(90deg, currentColor, #ffffff, currentColor, #b8f5ff, currentColor);
    background-size: 240% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: owner-title-shimmer 1.5s ease-in-out infinite;
}

@keyframes owner-title-shimmer {
    0%, 100% {
        background-position: 0% center;
        filter: brightness(1) saturate(1.1);
    }
    50% {
        background-position: 100% center;
        filter: brightness(1.4) saturate(1.35);
    }
}

.shop-modal__promo {
    position: static;
    flex: 0 1 240px;
    min-width: 200px;
    width: auto;
    padding: 10px 12px 12px;
    border-radius: 10px;
    background: rgba(12, 12, 14, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    z-index: 1;
}

.shop-modal__promo .shop-modal__section-title {
    font-size: 10px;
    margin-bottom: 6px;
}

.shop-modal__promo-input {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0e0e10;
    color: #ececef;
    font-size: 12px;
}

.shop-modal__promo-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.18);
}

.shop-modal__promo-input::placeholder {
    color: rgba(154, 161, 171, 0.75);
    font-size: 12px;
}

.shop-modal__promo-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.shop-modal__promo-btn {
    height: 30px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #ececef;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.shop-modal__promo-btn:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.16);
}

.shop-modal__promo-btn:active {
    transform: translateY(1px);
}

@media (max-width: 560px) {
    .shop-modal {
        padding: 10px 12px;
    }

    .shop-modal__promo {
        right: 10px;
        bottom: 10px;
        width: min(260px, calc(100% - 24px));
    }

    .shop-modal__catalog {
        padding-bottom: 80px;
    }
}

.shop-catalog__demo-note code {
    font-size: 10px;
    color: rgba(234, 240, 255, 0.75);
}

@keyframes shop-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 32px rgba(34, 197, 94, 0.75); }
}

@keyframes shop-owner-shimmer {
    0%, 100% {
        filter: brightness(1) saturate(1.1);
        box-shadow: 0 0 28px rgba(239, 68, 68, 0.65);
        color: #ff5555;
    }
    50% {
        filter: brightness(1.45) saturate(1.35);
        box-shadow: 0 0 40px rgba(255, 50, 50, 0.95);
        color: #ff2222;
    }
}
