/* Agar.io light cabinet — white / soft blue, minimal */
.cabinet {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    font-family: Ubuntu, "Segoe UI", sans-serif;
}
.cabinet.is-open { display: flex; }

.cabinet-panel {
    width: min(720px, 96vw);
    max-height: min(720px, 92vh);
    background: #f4f6f8;
    color: #222;
    border-radius: 16px;
    border: 3px solid #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.cabinet-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #ff6b6b;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    font-weight: 700;
}
.cabinet-close:hover { background: #e84c4c; }

.cabinet-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 48px 14px 16px;
    background: linear-gradient(180deg, #6cb6ff 0%, #3d8de0 100%);
    color: #fff;
}
.cabinet-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #fff center/cover no-repeat;
    flex-shrink: 0;
}
.cabinet-head-meta { min-width: 0; flex: 1; }
.cabinet-nick {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cabinet-level-row { margin-top: 6px; }
.cabinet-star { display: none; }
.cabinet-xp-wrap { min-width: 0; }
.cabinet-xp-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.55);
}
.cabinet-xp-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(180deg, #ffe566, #f0b400);
    border-radius: inherit;
    transition: width .3s ease;
}
.cabinet-xp-text {
    font-size: 11px;
    font-weight: 700;
    margin-top: 3px;
    opacity: 0.95;
}

.cabinet-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    background: #e4ebf3;
}
.cabinet-tab {
    flex: 1;
    border: 0;
    border-radius: 10px;
    padding: 8px 4px;
    font-weight: 700;
    font-size: 12px;
    color: #4a5a6a;
    background: transparent;
    cursor: pointer;
}
.cabinet-tab:hover { background: rgba(255, 255, 255, 0.55); }
.cabinet-tab.is-active {
    color: #fff;
    background: #3d8de0;
}

.cabinet-body {
    padding: 12px 14px 16px;
    overflow: auto;
    flex: 1;
}
.cabinet-section { display: none; }
.cabinet-section.is-active { display: block; }

.cabinet-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.cabinet-card h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #2a3a4a;
}
.cabinet-muted {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #7a8794;
    font-weight: 400;
}

.cabinet-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.cabinet-stat {
    background: #f0f4f8;
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
}
.cabinet-stat b {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #222;
}
.cabinet-stat span {
    font-size: 10px;
    color: #7a8794;
    font-weight: 700;
}

.cabinet-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    color: #fff;
    background: #3d8de0;
}
.cabinet-btn:hover { filter: brightness(1.05); }
.cabinet-btn.gold { background: #f0b400; color: #3a2a00; }
.cabinet-btn.gray { background: #d0d7e0; color: #334; }
.cabinet-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Auth */
.cab-auth {
    text-align: center;
    padding: 6px 0 2px;
}
.cab-auth-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #2a3a4a;
}
.cab-auth-hint {
    font-size: 12px;
    color: #7a8794;
    margin: 0 0 12px;
}
#vkAuthContainer,
#VkIdSdkOneTap {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 48px;
}
#VkIdSdkOneTap > * {
    width: 100% !important;
    max-width: 360px;
}
.cab-auth-user {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}
.cab-auth-user img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e6ee;
}
.cab-auth-user .meta { flex: 1; min-width: 0; }
.cab-auth-user .name {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cab-auth-user .sub {
    font-size: 12px;
    color: #7a8794;
    font-weight: 600;
}

/* Rating */
.cab-rating-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow: auto;
}
.cab-rating-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-bottom: 1px solid #eef1f5;
}
.cab-rating-list li:last-child { border-bottom: 0; }
.cab-rating-pos {
    width: 28px;
    text-align: center;
    font-weight: 700;
    color: #8a97a5;
    font-variant-numeric: tabular-nums;
}
.cab-rating-list li:nth-child(1) .cab-rating-pos { color: #d4a017; }
.cab-rating-list li:nth-child(2) .cab-rating-pos { color: #8a9199; }
.cab-rating-list li:nth-child(3) .cab-rating-pos { color: #b87333; }
.cab-rating-av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8eef5 center/cover no-repeat;
    flex-shrink: 0;
}
.cab-rating-meta { flex: 1; min-width: 0; }
.cab-rating-name {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cab-rating-id {
    font-size: 11px;
    color: #9aa5b2;
    font-weight: 600;
}
.cab-rating-lvl {
    min-width: 36px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    background: #fff3c4;
    color: #9a6b00;
}

/* Skins */
.cab-skins-search {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 9px 12px;
    border: 1px solid #d0d7e0;
    border-radius: 10px;
    font: 600 13px Ubuntu, "Segoe UI", sans-serif;
    color: #222;
    background: #fff;
    outline: none;
}
.cab-skins-search:focus { border-color: #3d8de0; }
.cabinet-skins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    max-height: min(420px, 48vh);
    overflow-y: auto;
    padding-right: 2px;
}
.cabinet-skin {
    aspect-ratio: 1;
    border-radius: 12px;
    border: 2px solid #d5dde6;
    background: #fff center/cover no-repeat;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 0;
}
.cabinet-skin:hover { border-color: #3d8de0; }
.cabinet-skin.is-selected { border-color: #f0b400; }
.cabinet-skin .tag {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 3px 4px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cabinet-skin-empty {
    grid-column: 1 / -1;
    padding: 24px 10px;
    text-align: center;
    color: #8a97a5;
    font-size: 13px;
    line-height: 1.45;
}

/* Inventory — bought nicks / clans */
.cab-inv h3 { margin-bottom: 4px; }
.cab-inv-tabs {
    display: flex;
    gap: 6px;
    margin: 10px 0 8px;
    flex-wrap: wrap;
}
.cab-inv-tab {
    border: 1px solid #d0d7e0;
    background: #fff;
    color: #445566;
    border-radius: 999px;
    padding: 7px 12px;
    font: 700 12px Ubuntu, "Segoe UI", sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cab-inv-tab.is-active {
    background: #3d8de0;
    border-color: #3d8de0;
    color: #fff;
}
.cab-inv-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(0,0,0,.12);
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cab-inv-tab.is-active .cab-inv-badge { background: rgba(255,255,255,.25); }
.cab-inv-panels {
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    background: #fff;
    max-height: 260px;
    overflow: hidden;
}
.cab-inv-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    max-height: 260px;
    display: none;
}
.cab-inv-list.is-active { display: block; }
.cab-inv-list .empty,
.cab-inv-list .error {
    padding: 16px 10px;
    text-align: center;
    color: #8a97a5;
    font-size: 13px;
}
.cab-inv-list .error { color: #d64545; }
.cab-nick-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid transparent;
}
.cab-nick-card:hover {
    background: #f3f7fb;
    border-color: #e0e8f0;
}
.cab-nick-card .skin {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #e8eef5;
    flex-shrink: 0;
}
.cab-nick-card .skin--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #6a7a8a;
    font-size: 16px;
}
.cab-nick-card-body { flex: 1; min-width: 0; }
.cab-nick-card .nick {
    font-weight: 800;
    font-size: 14px;
    color: #1a2a3a;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cab-nick-card .nick:hover { color: #3d8de0; }
.cab-nick-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.cab-nick-perk {
    border: 1px solid #d5dde6;
    background: #f4f6f8;
    color: #7a8794;
    border-radius: 8px;
    padding: 3px 7px;
    font: 700 10px Ubuntu, "Segoe UI", sans-serif;
    cursor: default;
}
.cab-nick-perk.is-on {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
}
.cab-nick-perk.is-action {
    cursor: pointer;
}
.cab-nick-perk.is-action:hover {
    background: #fff3c4;
    border-color: #f0b400;
    color: #9a6b00;
}
.cab-passbox {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.cab-passbox input {
    width: 64px;
    border: 1px solid #d0d7e0;
    border-radius: 8px;
    padding: 5px 6px;
    font: 600 11px Ubuntu, "Segoe UI", sans-serif;
    background: #fff;
}
.cab-passbox button {
    width: 28px;
    height: 28px;
    border: 1px solid #d0d7e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #556677;
}

/* Shop — compact light */
.cab-shop {
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 12px;
    align-items: start;
}
@media (max-width: 560px) {
    .cab-shop { grid-template-columns: 1fr; }
}
.cab-shop-preview {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 2px dashed #c5d0dc;
    background: #f0f4f8 center/cover no-repeat;
    cursor: pointer;
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.cab-shop-preview.has-image { border-style: solid; border-color: #3d8de0; }
.cab-shop-preview canvas,
.cab-shop-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: none;
    position: absolute;
    inset: 0;
}
.cab-shop-preview .hint {
    font-size: 10px;
    font-weight: 700;
    color: #9aa5b2;
    text-align: center;
    pointer-events: none;
}
.cab-shop-preview.has-image .hint { display: none; }
.cab-shop-preview input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.cab-shop-main { display: flex; gap: 12px; }
.cab-shop-fields { flex: 1; min-width: 0; }
.cab-field { margin-bottom: 8px; }
.cab-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #7a8794;
    margin-bottom: 4px;
}
.cab-field input[type="text"],
.cab-field input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #d0d7e0;
    background: #fff;
    color: #222;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    outline: none;
}
.cab-field input:focus { border-color: #3d8de0; }
.cab-shop-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cab-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #f0f4f8;
    border: 1px solid #d5dde6;
    font-size: 11px;
    font-weight: 700;
    color: #4a5a6a;
    cursor: pointer;
}
.cab-pill input { accent-color: #3d8de0; }
.cab-pill:has(input:checked) {
    background: #e8f2ff;
    border-color: #3d8de0;
    color: #2a6fc4;
}
.cab-shop-receipt {
    background: #f0f4f8;
    border-radius: 12px;
    padding: 12px;
}
.cab-shop-receipt h4 {
    margin: 0 0 8px;
    font-size: 13px;
}
.cab-shop-receipt ul {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}
.cab-shop-receipt li {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: #7a8794;
    padding: 3px 0;
}
.cab-shop-receipt li strong { color: #222; }
.cab-shop-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    padding-top: 8px;
    border-top: 1px solid #d5dde6;
    margin-bottom: 10px;
}
.cab-shop-total strong { color: #3d8de0; font-size: 16px; }
.cab-shop-buy {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #3d8de0;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}
.cab-shop-buy:disabled { opacity: 0.4; cursor: not-allowed; }
.cab-shop-msg {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    min-height: 14px;
}
.cab-shop-msg.is-err { color: #d64545; }
.cab-shop-msg.is-ok { color: #2a9a5c; }
.cab-shop-support {
    margin: 8px 0 0;
    font-size: 11px;
    color: #9aa5b2;
}
.cab-shop-support a { color: #3d8de0; }

#helloDialog #skinButton.has-skin #skinLabel { display: none; }
#helloDialog #skinButton .skinWrapper {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
