/* ============================================================
   BATTLE SETUP V2 – LoL-kliens stílusú bajnokválasztó
   ============================================================ */

body.bsv2-page {
    --bsv2-bg: #0A0D14;
    --bsv2-panel: #131B24;
    --bsv2-gold: #C8AA6E;
    --bsv2-blue: #0AC8E6;
    --bsv2-white: #F0E6D2;
    --bsv2-t-hover: 150ms;
    --bsv2-t-fade: 200ms;
    --bsv2-t-popup: 250ms;
    --bsv2-t-select: 300ms;
    --bsv2-t-lockin: 500ms;

    background: var(--bsv2-bg);
    font-family: "Outfit", sans-serif;
    color: var(--bsv2-white);
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

button {
    font-family: inherit;
}

/* ---------------- Background ---------------- */

#bsv2-bg {
    position: fixed;
    inset: -30px;
    z-index: 0;
    background-image: url("../image/backgrounds/champ-select-planning-intro.jpg");
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.45) saturate(1.05);
    opacity: 0.5;
    pointer-events: none;
}
#bsv2-vignette {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 45%, transparent 0%, transparent 35%, rgba(1, 3, 6, 0.55) 75%, rgba(0, 1, 3, 0.92) 100%),
        radial-gradient(ellipse at 50% 0%, rgba(6, 12, 20, 0.4) 0%, transparent 45%);
}

/* ---------------- Arena layout ---------------- */

#bsv2-arena {
    position: relative;
    z-index: 1;
    flex: 0 1 auto;
    width: 100%;
    max-width: 1600px;
    max-height: calc(100vh - 124px);
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px 22px;
    min-height: 0;
    box-sizing: border-box;
    border: 1px solid rgba(200, 170, 110, 0.22);
    border-radius: var(--radius-m);
    background: rgba(6, 10, 16, 0.4);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

#bsv2-arena-frame {
    position: absolute;
    inset: -1px;
    pointer-events: none;
    z-index: 2;
}
.bsv2-corner {
    position: absolute;
    width: 44px;
    height: 44px;
}
.bsv2-corner path {
    stroke: var(--bsv2-gold);
    stroke-width: 2;
    opacity: 0.55;
    filter: drop-shadow(0 0 4px rgba(200, 170, 110, 0.4));
}
.bsv2-corner-tl { top: 0; left: 0; }
.bsv2-corner-tr { top: 0; right: 0; }
.bsv2-corner-bl { bottom: 0; left: 0; }
.bsv2-corner-br { bottom: 0; right: 0; }

.bsv2-team {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.bsv2-team-name {
    background: rgba(3, 5, 9, 0.6);
    border: 1px solid var(--bsv2-gold);
    border-radius: var(--radius-s);
    color: var(--bsv2-gold);
    font-weight: 600;
    text-align: center;
    padding: 8px 10px;
    font-family: 'SpectralBold', serif;
    letter-spacing: 1px;
}
.bsv2-team-name:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(200, 170, 110, 0.35);
}

.bsv2-team-spacer {
    flex: 0 0 32px;
}

.bsv2-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

.bsv2-slot {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    min-height: 74px;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(200, 170, 110, 0.22);
    border-radius: var(--radius-s);
    background: rgba(9, 15, 24, 0.55);
    transition: border-color var(--bsv2-t-lockin) var(--ease-premium), box-shadow var(--bsv2-t-lockin) var(--ease-premium);
}

.bsv2-slot-banner-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    filter: blur(1px);
    opacity: 0.90;
    transform: scale(1.15);
    pointer-events: none;
}
.bsv2-slot::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, rgba(9, 15, 24, 0.55), rgba(9, 15, 24, 0.2));
    pointer-events: none;
}
.bsv2-slot-reverse::after {
    background: linear-gradient(270deg, rgba(9, 15, 24, 0.55), rgba(9, 15, 24, 0.2));
}
.bsv2-slot-portrait,
.bsv2-slot-text {
    position: relative;
    z-index: 1;
}

.bsv2-slot-reverse { flex-direction: row-reverse; text-align: right; }

.bsv2-slot.is-active {
    border-color: var(--bsv2-gold);
    box-shadow: 0 0 14px rgba(200, 170, 110, 0.3), inset 0 0 12px rgba(200, 170, 110, 0.08);
    animation: bsv2Pulse 1.6s ease-in-out infinite;
}

.bsv2-slot.is-previewing {
    border-style: dashed;
}

.bsv2-slot.is-locked {
    border-color: var(--bsv2-blue);
    border-style: solid;
}

.bsv2-slot.bsv2-slot-clickable {
    cursor: pointer;
    transition: border-color var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium), transform var(--bsv2-t-hover) var(--ease-premium);
}
.bsv2-slot.bsv2-slot-clickable:hover {
    border-color: var(--bsv2-gold);
    box-shadow: 0 0 12px rgba(200, 170, 110, 0.35);
    transform: translateY(-1px);
}

.bsv2-slot.is-editing {
    border-color: var(--bsv2-blue);
    border-style: dashed;
    box-shadow: 0 0 16px rgba(10, 200, 230, 0.45), inset 0 0 12px rgba(10, 200, 230, 0.1);
    animation: bsv2PulseBlue 1.6s ease-in-out infinite;
}

@keyframes bsv2PulseBlue {
    0%, 100% { box-shadow: 0 0 14px rgba(10, 200, 230, 0.3), inset 0 0 12px rgba(10, 200, 230, 0.08); }
    50% { box-shadow: 0 0 22px rgba(10, 200, 230, 0.55), inset 0 0 16px rgba(10, 200, 230, 0.15); }
}

@keyframes bsv2Pulse {
    0%, 100% { box-shadow: 0 0 14px rgba(200, 170, 110, 0.25), inset 0 0 12px rgba(200, 170, 110, 0.06); }
    50% { box-shadow: 0 0 22px rgba(200, 170, 110, 0.5), inset 0 0 16px rgba(200, 170, 110, 0.12); }
}

@keyframes bsv2PickStatusGlow {
    0%, 100% { text-shadow: 0 0 6px rgba(200, 170, 110, 0.35), 0 0 14px rgba(200, 170, 110, 0.15); }
    50% { text-shadow: 0 0 12px rgba(200, 170, 110, 0.75), 0 0 26px rgba(200, 170, 110, 0.4); }
}

.bsv2-slot-portrait {
    position: relative;
    flex: 0 0 auto;
    width: 73px;
    height: 73px;
    --role-color: var(--bsv2-gold);
}
.bsv2-slot-portrait::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 3px solid var(--role-color);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.35), 0 0 6px var(--role-color);
    z-index: 2;
    pointer-events: none;
}
.bsv2-role-support { --role-color: #7CFC8C; }
.bsv2-role-bottom { --role-color: #4FC3F7; }
.bsv2-role-mid { --role-color: #B388FF; }
.bsv2-role-top { --role-color: #FFD54F; }
.bsv2-role-jungle { --role-color: #1B5E20; }
.bsv2-slot-avatar {
    position: absolute;
    inset: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 50%;
    object-fit: cover;
    z-index: 1;
}

.bsv2-slot-role {
    position: absolute;
    z-index: 3;
    inset: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.bsv2-slot-role img { width: 100%; height: 100%; object-fit: contain; opacity: 0.9; }
.bsv2-slot-portrait.has-avatar .bsv2-slot-role { display: none; }

.bsv2-slot-text {
    flex: 1;
    min-width: 0;
}
.bsv2-slot-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--bsv2-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bsv2-slot-role-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(240, 230, 210, 0.55);
}

/* Kiválasztott varázslat-ikonok: a csapat "belső" oldalán (a pálya felé),
   azaz bal csapatnál jobb oldalt, jobb csapatnál bal oldalt. */
.bsv2-slot-spells {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bsv2-slot-reverse .bsv2-slot-spells {
    right: auto;
    left: 10px;
}
.bsv2-slot-spell-icon {
    width: 23px;
    height: 23px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(200, 170, 110, 0.4);
    background: rgba(9, 15, 24, 0.7);
}

/* ---------------- Center column ---------------- */

#bsv2-center {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

#bsv2-pick-status {
    flex: 0 0 auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid transparent;
    text-align: center;
    text-transform: uppercase;
    font-family: 'SpectralBold', serif;
    letter-spacing: 1px;
    color: var(--bsv2-gold);
    font-size: 17px;
    animation: bsv2PickStatusGlow 2.2s ease-in-out infinite;
}

#bsv2-filterbar {
    flex: 0 0 42px;
    height: 42px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(200, 170, 110, 0.22);
    border-radius: var(--radius-s);
    background: rgba(9, 15, 24, 0.5);
    padding: 6px 10px;
}

#bsv2-class-filters {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 4px;
    overflow-x: auto;
}

.bsv2-class-filter-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-s);
    cursor: pointer;
    color: rgba(240, 230, 210, 0.55);
    font-size: 11px;
    transition: border-color var(--bsv2-t-hover) var(--ease-premium), background var(--bsv2-t-hover) var(--ease-premium);
}
.bsv2-class-filter-btn img { width: 20px; height: 20px; object-fit: contain; }
.bsv2-class-filter-btn:hover { background: rgba(255, 255, 255, 0.06); }
.bsv2-class-filter-btn.is-active {
    border-color: var(--bsv2-gold);
    background: rgba(200, 170, 110, 0.12);
}

#bsv2-filterbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

#bsv2-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
#bsv2-search-icon {
    position: absolute;
    left: 8px;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: rgba(240, 230, 210, 0.55);
    stroke-width: 2;
}
#bsv2-search {
    background: linear-gradient(180deg, rgba(30, 26, 18, 0.55), rgba(10, 9, 6, 0.55));
    border: 1px solid rgba(200, 170, 110, 0.4);
    border-radius: var(--radius-s);
    color: var(--bsv2-white);
    padding: 8px 10px 8px 28px;
    font-size: 13px;
    font-weight: 600;
    width: 150px;
    transition: background var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
#bsv2-search:hover {
    background: linear-gradient(180deg, rgba(40, 34, 22, 0.65), rgba(14, 12, 8, 0.65));
    box-shadow: 0 0 12px rgba(200, 170, 110, 0.3);
}
#bsv2-search:focus { outline: none; border-color: var(--bsv2-gold); }

#bsv2-sort {
    flex: 0 0 auto;
    width: auto;
    min-width: 150px;
    padding: 8px 14px;
    background: linear-gradient(180deg, rgba(30, 26, 18, 0.55), rgba(10, 9, 6, 0.55));
    border: 1px solid rgba(200, 170, 110, 0.4);
    border-radius: var(--radius-s);
    color: var(--bsv2-white);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
#bsv2-sort:hover {
    background: linear-gradient(180deg, rgba(40, 34, 22, 0.65), rgba(14, 12, 8, 0.65));
    box-shadow: 0 0 12px rgba(200, 170, 110, 0.3);
}
#bsv2-sort:focus { outline: none; border-color: var(--bsv2-gold); }

#bsv2-grid-wrap {
    position: relative;
    flex: 1 1 auto;
    max-height: 600px;
    min-height: 220px;
    border-radius: var(--radius-m);
    overflow: hidden;
    border: 1px solid rgba(200, 170, 110, 0.22);
    background: radial-gradient(ellipse at 50% 35%, rgba(10, 200, 230, 0.05), transparent 65%), rgba(3, 5, 9, 0.4);
}
#bsv2-grid-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        repeating-radial-gradient(circle at 50% 42%,
            rgba(200, 170, 110, 0.06) 0px, rgba(200, 170, 110, 0.06) 1px,
            transparent 1px, transparent 46px),
        radial-gradient(circle at 50% 42%, rgba(10, 200, 230, 0.1), transparent 60%);
    mix-blend-mode: screen;
    opacity: 0.7;
}

#bsv2-grid {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    scrollbar-gutter: stable;
    display: grid;
    grid-template-columns: repeat(8, 80px);
    justify-content: center;
    gap: 8px;
    align-content: start;
    padding: 10px;
    box-sizing: border-box;
}

.bsv2-champ-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    border-radius: var(--radius-s);
    padding: 0;
    cursor: pointer;
    transition: transform var(--bsv2-t-hover) var(--ease-premium);
}
.bsv2-champ-card:hover:not(:disabled) {
    transform: scale(1.06);
    z-index: 2;
}
.bsv2-champ-card:hover:not(:disabled) img {
    border-color: var(--bsv2-gold);
    filter: brightness(1.15) saturate(1.05);
    box-shadow: 0 0 14px rgba(200, 170, 110, 0.55), 0 4px 10px rgba(0, 0, 0, 0.5);
}
.bsv2-champ-card.is-selected {
    transition: transform var(--bsv2-t-select) var(--ease-premium);
}
.bsv2-champ-card.is-selected img {
    border-color: var(--bsv2-gold);
    box-shadow: 0 0 16px rgba(200, 170, 110, 0.7), inset 0 0 8px rgba(200, 170, 110, 0.4);
    transition: border-color var(--bsv2-t-select) var(--ease-premium), box-shadow var(--bsv2-t-select) var(--ease-premium);
}
.bsv2-champ-card.is-disabled {
    opacity: 0.28;
    cursor: not-allowed;
    filter: grayscale(1);
}
.bsv2-champ-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: border-color var(--bsv2-t-hover) var(--ease-premium), filter var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
.bsv2-champ-name {
    font-size: 10.5px;
    text-align: center;
    color: rgba(240, 230, 210, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

#bsv2-action-row {
    flex: 0 0 auto;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 10px;
}

#bsv2-lockin-btn {
    flex: 0 0 auto;
    min-width: 160px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #e8d3a3, var(--bsv2-gold));
    border: none;
    border-radius: var(--radius-s);
    color: #1a1206;
    font-family: 'SpectralBold', serif;
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(200, 170, 110, 0.3);
    transition: transform var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
#bsv2-lockin-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(200, 170, 110, 0.5);
}
#bsv2-lockin-btn:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(240, 230, 210, 0.55);
    cursor: not-allowed;
    box-shadow: none;
}

#bsv2-edit-cancel-btn.hidden { display: none; }
#bsv2-edit-cancel-btn {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #e8d3a3, var(--bsv2-gold));
    border: none;
    border-radius: var(--radius-s);
    cursor: pointer;
    box-shadow: 0 0 16px rgba(200, 170, 110, 0.3);
    transition: transform var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
#bsv2-edit-cancel-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(200, 170, 110, 0.5);
}
#bsv2-edit-cancel-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

#bsv2-randomize-btn {
    flex: 0 0 auto;
    min-width: 160px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #e8d3a3, var(--bsv2-gold));
    border: none;
    border-radius: var(--radius-s);
    color: #1a1206;
    font-family: 'SpectralBold', serif;
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(200, 170, 110, 0.3);
    transition: transform var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
#bsv2-randomize-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(200, 170, 110, 0.5);
}

#bsv2-game-mode {
    flex: 0 0 auto;
    align-self: center;
    width: 45px;
    min-width: 0;
    text-align: center;
    text-align-last: center;
    background: linear-gradient(180deg, rgba(30, 26, 18, 0.55), rgba(10, 9, 6, 0.55));
    border: 1px solid rgba(200, 170, 110, 0.4);
    border-radius: var(--radius-s);
    color: var(--bsv2-white);
    padding: 8px 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
#bsv2-game-mode:hover {
    background: linear-gradient(180deg, rgba(40, 34, 22, 0.65), rgba(14, 12, 8, 0.65));
    box-shadow: 0 0 12px rgba(200, 170, 110, 0.3);
}
#bsv2-game-mode:focus { outline: none; border-color: var(--bsv2-gold); }

#bsv2-item-version {
    flex: 0 0 auto;
    align-self: center;
    width: 82px;
    min-width: 0;
    text-align: center;
    text-align-last: center;
    background: linear-gradient(180deg, rgba(30, 26, 18, 0.55), rgba(10, 9, 6, 0.55));
    border: 1px solid rgba(200, 170, 110, 0.4);
    border-radius: var(--radius-s);
    color: var(--bsv2-white);
    padding: 8px 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
#bsv2-item-version:hover {
    background: linear-gradient(180deg, rgba(40, 34, 22, 0.65), rgba(14, 12, 8, 0.65));
    box-shadow: 0 0 12px rgba(200, 170, 110, 0.3);
}
#bsv2-item-version:focus { outline: none; border-color: var(--bsv2-gold); }

#bsv2-ai-spell-toggle,
#bsv2-ai-item-toggle {
    flex: 0 0 auto;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: linear-gradient(180deg, rgba(30, 26, 18, 0.55), rgba(10, 9, 6, 0.55));
    border: 1px solid rgba(200, 170, 110, 0.4);
    border-radius: var(--radius-s);
    color: var(--bsv2-white);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    transition: background var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium), opacity var(--bsv2-t-hover) var(--ease-premium);
}
#bsv2-ai-spell-toggle:hover,
#bsv2-ai-item-toggle:hover {
    background: linear-gradient(180deg, rgba(40, 34, 22, 0.65), rgba(14, 12, 8, 0.65));
    box-shadow: 0 0 12px rgba(200, 170, 110, 0.3);
}
#bsv2-ai-spell-toggle input,
#bsv2-ai-item-toggle input {
    accent-color: var(--bsv2-gold);
    width: 14px;
    height: 14px;
    cursor: pointer;
}
#bsv2-ai-item-toggle.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}
#bsv2-ai-item-toggle.is-disabled input {
    cursor: not-allowed;
}

/* ---------------- Loadout bar ---------------- */

#bsv2-loadout-bar {
    position: relative;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 20px;
}

.bsv2-loadout-sep {
    flex: 0 0 auto;
    width: 2px;
    align-self: stretch;
    background: linear-gradient(180deg, transparent, var(--bsv2-gold), transparent);
    opacity: 0.6;
}
#bsv2-loadout-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(30, 26, 18, 0.35), rgba(10, 9, 6, 0.25));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(200, 170, 110, 0.35);
    border-radius: var(--radius-m);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

#bsv2-runepage {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
    padding: 8px 14px;
    background: linear-gradient(180deg, rgba(30, 26, 18, 0.55), rgba(10, 9, 6, 0.55));
    border: 1px solid rgba(200, 170, 110, 0.4);
    border-radius: var(--radius-s);
    cursor: pointer;
    transition: background var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
#bsv2-runepage:hover {
    background: linear-gradient(180deg, rgba(40, 34, 22, 0.65), rgba(14, 12, 8, 0.65));
    box-shadow: 0 0 12px rgba(200, 170, 110, 0.3);
}
#bsv2-runepage-icon { width: 18px; height: 18px; object-fit: contain; }
#bsv2-runepage.is-disabled { opacity: 0.5; cursor: not-allowed; }
#bsv2-runepage-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--bsv2-white);
}
#bsv2-runepage-arrow {
    font-size: 9px;
    color: rgba(240, 230, 210, 0.55);
}

#bsv2-runepage-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: rgba(6, 10, 16, 0.92);
    border: 1px solid var(--bsv2-gold);
    border-radius: var(--radius-s);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 5;
    opacity: 1;
    transform: scale(1);
    transform-origin: bottom center;
    transition: opacity var(--bsv2-t-popup) var(--ease-premium), transform var(--bsv2-t-popup) var(--ease-premium), visibility 0s linear 0s;
}
#bsv2-runepage-dropdown.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    pointer-events: none;
    transition: opacity var(--bsv2-t-popup) var(--ease-premium), transform var(--bsv2-t-popup) var(--ease-premium), visibility 0s linear var(--bsv2-t-popup);
}
.bsv2-runepage-option {
    position: relative;
    padding: 8px 14px;
    font-size: 12.5px;
    color: rgba(240, 230, 210, 0.7);
    border-left: 2px solid transparent;
    transition: background var(--bsv2-t-hover) var(--ease-premium), color var(--bsv2-t-hover) var(--ease-premium);
}
.bsv2-runepage-option:hover {
    background: rgba(200, 170, 110, 0.12);
    color: var(--bsv2-white);
}
.bsv2-runepage-option.is-active {
    color: var(--bsv2-gold);
    border-left-color: var(--bsv2-gold);
}
.bsv2-runepage-option--priority {
    color: rgba(255, 216, 140, 0.85);
    font-weight: 600;
    border-bottom: 1px solid rgba(200, 170, 110, 0.25);
}

#bsv2-loadout-divider {
    flex: 0 0 auto;
    width: 2px;
    height: 70%;
    background: linear-gradient(180deg, transparent, var(--bsv2-gold), transparent);
    opacity: 0.6;
}

#bsv2-loadout-controls-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bsv2-loadout-spells {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bsv2-spell-separator {
    flex: 0 0 auto;
    width: 2px;
    height: 70%;
    background: var(--bsv2-gold);
    opacity: 0.5;
}

.bsv2-spell-slot {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 3px;
    background: linear-gradient(180deg, rgba(20, 17, 12, 0.8), rgba(6, 5, 3, 0.8));
    border: 1px solid rgba(200, 170, 110, 0.5);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.4);
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--bsv2-t-hover) var(--ease-premium), border-color var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
.bsv2-spell-slot:hover:not(:disabled) {
    transform: scale(1.05);
    border-color: var(--bsv2-gold);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6), 0 0 10px rgba(200, 170, 110, 0.5);
}
.bsv2-spell-slot:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.bsv2-spell-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

/* ---------------- Popups ---------------- */

.bsv2-popup {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    z-index: var(--z-overlay);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
    transform-origin: bottom center;
    transition: opacity var(--bsv2-t-popup) var(--ease-premium), transform var(--bsv2-t-popup) var(--ease-premium), visibility 0s linear 0s;
}
.bsv2-popup.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) scale(0.94);
    transition: opacity var(--bsv2-t-popup) var(--ease-premium), transform var(--bsv2-t-popup) var(--ease-premium), visibility 0s linear var(--bsv2-t-popup);
}

.bsv2-popup-window {
    width: max-content;
    max-width: min(420px, 80vw);
    background: linear-gradient(180deg, rgba(16, 22, 30, 0.97), rgba(6, 9, 13, 0.97));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--bsv2-gold);
    border-radius: var(--radius-m);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bsv2-popup-grid {
    max-height: 240px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.bsv2-popup-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 52px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(200, 170, 110, 0.22);
    border-radius: var(--radius-s);
    padding: 5px;
    cursor: pointer;
    transition: border-color var(--bsv2-t-hover) var(--ease-premium), background var(--bsv2-t-hover) var(--ease-premium), transform var(--bsv2-t-hover) var(--ease-premium);
}
.bsv2-popup-item:hover {
    border-color: var(--bsv2-gold);
    background: rgba(200, 170, 110, 0.1);
    transform: scale(1.05);
}
.bsv2-popup-item.is-selected {
    border-color: var(--bsv2-gold);
    box-shadow: 0 0 10px rgba(200, 170, 110, 0.5);
}
.bsv2-popup-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.bsv2-popup-item span { font-size: 9.5px; color: rgba(240, 230, 210, 0.55); text-align: center; }

.bsv2-popup-desc {
    border-top: 1px solid rgba(200, 170, 110, 0.25);
    padding-top: 8px;
    width: 292px;
    min-height: 66px;
}
.bsv2-popup-desc-name {
    font-family: 'SpectralBold', serif;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--bsv2-gold);
    margin-bottom: 4px;
    min-height: 16px;
}
.bsv2-popup-desc-text {
    font-size: 11.5px;
    line-height: 1.4;
    color: rgba(240, 230, 210, 0.75);
    min-height: 33px;
}

/* ---------------- Lock In reveal ---------------- */

#bsv2-grid-wrap.bsv2-grid-darken #bsv2-grid {
    filter: brightness(0.25) saturate(0.6);
}
#bsv2-grid-wrap.bsv2-grid-darken::before {
    opacity: 0.15;
    transition: opacity 320ms var(--ease-premium);
}
#bsv2-grid {
    transition: filter 320ms var(--ease-premium);
}

.bsv2-lockin-reveal {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.75) 70%);
    opacity: 0;
    transition: opacity 280ms var(--ease-premium);
}
.bsv2-lockin-reveal.is-active {
    opacity: 1;
}
.bsv2-lockin-reveal.is-leaving {
    opacity: 0;
    transition: opacity 240ms ease-in;
}

.bsv2-lockin-frame {
    position: relative;
    height: min(72%, 480px);
    max-width: 88%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.6);
    opacity: 0;
    transition: transform 600ms var(--ease-premium), opacity 400ms var(--ease-premium);
}
.bsv2-lockin-reveal.is-active .bsv2-lockin-frame {
    transform: scale(1);
    opacity: 1;
    animation: bsv2-lockin-zoom 950ms var(--ease-premium) forwards;
}
.bsv2-lockin-reveal.is-leaving .bsv2-lockin-frame {
    transform: scale(1.1);
    opacity: 0;
    transition: transform 240ms ease-in, opacity 220ms ease-in;
    animation: none;
}

@keyframes bsv2-lockin-zoom {
    0%   { transform: scale(0.6); }
    55%  { transform: scale(1.1); }
    75%  { transform: scale(0.97); }
    100% { transform: scale(1.03); }
}

.bsv2-lockin-photo {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 0 2px var(--bsv2-gold))
        drop-shadow(0 0 6px var(--bsv2-gold))
        drop-shadow(0 0 18px rgba(200, 170, 110, 0.85))
        drop-shadow(0 0 34px rgba(200, 170, 110, 0.5));
}

.bsv2-lockin-name {
    font-family: 'SpectralBold', serif;
    font-size: 22px;
    letter-spacing: 3px;
    color: var(--bsv2-gold);
    text-shadow: 0 0 20px rgba(200, 170, 110, 0.7), 0 2px 6px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 400ms var(--ease-premium) 250ms, transform 400ms var(--ease-premium) 250ms;
}
.bsv2-lockin-reveal.is-active .bsv2-lockin-name {
    opacity: 1;
    transform: translateY(0);
}
.bsv2-lockin-reveal.is-leaving .bsv2-lockin-name {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.bsv2-lockin-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}
.bsv2-lockin-particle {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--bsv2-p-size, 3px);
    height: var(--bsv2-p-size, 3px);
    margin: calc(var(--bsv2-p-size, 3px) / -2);
    border-radius: 50%;
    background: radial-gradient(circle, #fff6dc, var(--bsv2-gold) 60%, transparent 100%);
    box-shadow: 0 0 6px 1px rgba(200, 170, 110, 0.8);
    opacity: 0;
}
.bsv2-lockin-reveal.is-active .bsv2-lockin-particle {
    animation: bsv2-lockin-particle-burst 900ms var(--ease-premium) var(--bsv2-p-delay, 0ms) forwards;
}

@keyframes bsv2-lockin-particle-burst {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
    12%  { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--bsv2-p-dx), var(--bsv2-p-dy)) scale(1); }
}

/* ---------------- Transition ---------------- */

#bsv2-transition {
    position: fixed;
    inset: 0;
    z-index: var(--z-tooltip);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1.2s var(--ease-premium);
}
#bsv2-transition.hidden { display: none; }
#bsv2-transition.is-active { opacity: 1; }
#bsv2-transition-text {
    font-family: 'SpectralBold', serif;
    font-size: 28px;
    letter-spacing: 4px;
    color: var(--bsv2-gold);
    text-shadow: 0 0 30px rgba(200, 170, 110, 0.6);
}

/* ---------------- Audio controls (music / sfx) ---------------- */

#bsv2-audio-controls {
    /* Egyelőre elrejtve (a hangokat kivesszük) */
    display: none;
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: var(--z-overlay);
    flex-direction: column;
    gap: 10px;
}

.bsv2-audio-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(20, 17, 12, 0.8), rgba(6, 5, 3, 0.8));
    border: 1px solid rgba(200, 170, 110, 0.5);
    border-radius: 50%;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.4);
    color: var(--bsv2-gold);
    cursor: pointer;
    transition: transform var(--bsv2-t-hover) var(--ease-premium), border-color var(--bsv2-t-hover) var(--ease-premium), box-shadow var(--bsv2-t-hover) var(--ease-premium);
}
.bsv2-audio-btn:hover {
    transform: scale(1.06);
    border-color: var(--bsv2-gold);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6), 0 0 10px rgba(200, 170, 110, 0.5);
}
.bsv2-audio-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.bsv2-audio-btn .hidden {
    display: none;
}
.bsv2-audio-btn-label {
    position: absolute;
    left: 52px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: rgba(230, 210, 170, 0.75);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--bsv2-t-hover) var(--ease-premium);
}
.bsv2-audio-btn:hover .bsv2-audio-btn-label {
    opacity: 1;
}
