/* ============================================================
   BATTLE PASS – Csillag Küldetés (Season 1)
   Az image/battlepass/ mappa illusztrált assetjeire épülő vizuál
   (bp_hatter.png háttér, bp_character_desing_art.png karakterart,
   bp_csillagorzo_emlema.png embléma, gomb_ui_bp.png arany gombkeret),
   a css/tokens.css design tokenjeivel kombinálva.
   ============================================================ */

body:has(#page-battlepass) {
    background:
        linear-gradient(180deg, rgba(3, 5, 9, 0.55) 0%, rgba(3, 5, 9, 0.35) 30%, rgba(3, 5, 9, 0.75) 100%),
        url("../image/battlepass/bp_hatter.png") center top / cover no-repeat fixed,
        var(--c-void);
}

.bp-page {
    position: relative;
    min-height: calc(100vh - 96px);
    box-sizing: border-box;
    padding: 18px 32px 32px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    color: var(--c-text);
    font-family: "Outfit", sans-serif;
    background: transparent;
}

.hidden { display: none !important; }

/* ---------- Header ---------- */

.bp-header {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 6px 4px;
    margin-top: 40px;
    min-height: 500px;
    overflow: visible;
    isolation: isolate;
}

.bp-header-left {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 0 0 auto;
    width: 560px;
}

.bp-header-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bp-emblem {
    flex: 0 0 auto;
    width: 158px;
    height: 158px;
    border-radius: 50%;
    filter: drop-shadow(0 0 26px rgba(176, 102, 255, 0.65));
}

.bp-emblem img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bp-header-titles { min-width: 0; flex: 1 1 auto; }

.bp-season-title {
    margin: 0 0 6px;
    font-family: "Montserrat", "AOW", sans-serif;
    font-weight: 800;
    font-size: 2.7rem;
    line-height: 1.1;
    letter-spacing: 0.005em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #f6ecff;
    animation: bpTitleSparkle 2.6s ease-in-out infinite;
}

@keyframes bpTitleSparkle {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(255, 110, 220, 0.55),
            0 0 22px rgba(255, 110, 220, 0.3),
            0 2px 6px rgba(0, 0, 0, 0.65);
    }
    50% {
        text-shadow:
            0 0 18px rgba(255, 110, 220, 0.95),
            0 0 42px rgba(255, 110, 220, 0.6),
            0 0 64px rgba(255, 150, 230, 0.35),
            0 2px 6px rgba(0, 0, 0, 0.65);
    }
}

.bp-season-eyebrow {
    display: inline-block;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--c-gold), #ffe9a8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 22px rgba(255, 210, 76, 0.7), 0 0 40px rgba(255, 210, 76, 0.35);
    margin-bottom: 6px;
}

.bp-season-countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--c-text-dim);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.bp-countdown-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex: 0 0 auto;
}

.bp-header-character {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-width: 160px;
    pointer-events: none;
    overflow: visible;
}

.bp-header-character img {
    position: absolute;
    left: 24%;
    bottom: 40px;
    transform: translateX(-50%);
    height: calc(100% + 32px);
    max-width: none;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 50px rgba(176, 102, 255, 0.4));
}

.bp-level-block {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.bp-level-circle {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url("../image/battlepass/bp_level_badge.png") center / contain no-repeat;
    font-family: "AOW", serif;
    font-size: 1.4rem;
    color: var(--c-gold);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.bp-level-info { flex: 1 1 auto; min-width: 0; }

.bp-level-toprow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.bp-level-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-cyan);
    text-shadow: 0 0 10px rgba(76, 212, 255, 0.4);
}

.bp-level-label-icon {
    width: 15px;
    height: 15px;
    object-fit: contain;
    flex: 0 0 auto;
}

.bp-xp-label {
    font-size: 0.8rem;
    color: var(--c-text-dim);
    font-weight: 600;
    white-space: nowrap;
}

.bp-xp-bar {
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    overflow: hidden;
}

.bp-xp-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--c-purple), var(--c-cyan));
    box-shadow: 0 0 12px var(--border-glow-cyan);
    transition: width var(--t-slow) var(--ease-premium);
}

/* ---------- Gold banner button (gomb_ui_bp.png) ---------- */

.bp-gold-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 168px;
    aspect-ratio: 1921 / 819;
    padding: 0 20px;
    border: none;
    background: url("../image/battlepass/gomb_ui_bp.png") center / 100% 100% no-repeat;
    color: var(--c-gold);
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    cursor: pointer;
    transition: transform var(--t-fast) var(--ease-premium), filter var(--t-fast) var(--ease-premium);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.bp-gold-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: 0 0 auto;
}

.bp-gold-btn.bp-premium-modal-buy-btn {
    width: 190px;
    font-size: 1.05rem;
}

.bp-gold-btn.bp-premium-modal-buy-btn img {
    width: 26px;
    height: 26px;
}

.bp-gold-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: drop-shadow(0 6px 16px rgba(255, 210, 76, 0.35));
}

.bp-gold-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* ---------- Premium card ---------- */
/* A kártya szándékosan a fejléc jobb felső sarkába van fixálva (nem a
   flex sorban foglal helyet), így méretezhető nagyra anélkül, hogy a
   karakter-art helyét összenyomná — rá is lóghat, ez a kívánt vizuál. */

.bp-premium-block {
    position: absolute;
    top: 10px;
    right: 4px;
    z-index: 2;
}

.bp-premium-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 34px;
    border-radius: var(--radius-l);
    border: 1px solid var(--border-glow-gold);
    background: linear-gradient(135deg, rgba(255, 210, 76, 0.14), rgba(176, 102, 255, 0.1));
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    width: 380px;
}

.bp-premium-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.bp-premium-card-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--c-gold);
    text-shadow: 0 0 16px rgba(255, 210, 76, 0.5);
}

.bp-premium-card-desc {
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--c-text-dim);
}

.bp-premium-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.bp-premium-benefits li {
    position: relative;
    padding-left: 18px;
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--c-text-dim);
}

.bp-premium-benefits li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 1px;
    transform: rotate(45deg);
    background: var(--c-gold);
    box-shadow: 0 0 6px var(--border-glow-gold);
}

/* ---------- Toolbar ---------- */

.bp-toolbar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -200px 0 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.bp-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius-m);
    background: rgba(7, 12, 20, 0.7);
    border: 1px solid var(--border-glass);
}

.bp-tab {
    padding: 9px 20px;
    border: none;
    border-radius: var(--radius-s);
    background: transparent;
    color: var(--c-text-dim);
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background var(--t-fast) var(--ease-premium), color var(--t-fast) var(--ease-premium);
}

.bp-tab.active {
    background: linear-gradient(90deg, var(--c-purple), var(--c-cyan));
    color: var(--c-void);
}

/* ---------- Reward track ---------- */

.bp-view {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

#bpViewMissions {
    flex: 1 1 auto;
    min-height: 0;
}

.bp-track-panel {
    display: flex;
    align-items: stretch;
    gap: 10px;
    background: rgba(6, 9, 15, 0.92);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-l);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 40px rgba(0, 0, 0, 0.35);
    padding: 16px;
    flex: 0 0 auto;
}

.bp-track-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 auto;
    width: 78px;
}

.bp-track-legend-tag {
    position: relative;
    height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: var(--radius-s);
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    overflow: hidden;
}

.bp-track-legend-tag--free {
    color: var(--c-cyan);
    background: rgba(76, 212, 255, 0.08);
    border: 1px solid var(--border-glow-cyan);
}

.bp-track-legend-tag--premium {
    color: var(--c-gold);
    background: rgba(255, 210, 76, 0.08);
    border: 1px solid var(--border-glow-gold);
    animation: bpLegendGlowPulse 1.6s ease-in-out infinite;
}

/* Csillámló effekt a prémium legend csempén: apró twinkle pöttyök +
   átfutó fény-sáv a szöveg fölött + lüktető arany glow a kereten. */
.bp-track-legend-tag--premium::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 1) 1.4px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 1.4px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 1) 1.4px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.85) 1.2px, transparent 2px);
    background-size: 100% 100%;
    background-position: 6px 14px, 24px 44px, 12px 78px, 30px 98px;
    background-repeat: no-repeat;
    animation: bpLegendTwinkle 1.1s ease-in-out infinite;
    pointer-events: none;
}

.bp-track-legend-tag--premium::after {
    content: "";
    position: absolute;
    inset: -30% 0;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.85) 48%, transparent 100%);
    transform: translateY(-140%);
    animation: bpLegendShimmer 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bpLegendTwinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

@keyframes bpLegendShimmer {
    0% { transform: translateY(-140%); }
    60%, 100% { transform: translateY(140%); }
}

@keyframes bpLegendGlowPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(255, 210, 76, 0.25), inset 0 0 8px rgba(255, 210, 76, 0.1); }
    50% { box-shadow: 0 0 28px rgba(255, 210, 76, 0.95), inset 0 0 20px rgba(255, 210, 76, 0.3); }
}

.bp-track-legend-spacer { height: 38px; }

.bp-track-scroll {
    overflow-x: auto;
    padding: 10px 16px;
    margin: -10px -16px;
    flex: 1 1 auto;
}

.bp-track {
    display: flex;
    gap: 10px;
    width: max-content;
}

.bp-track-col {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 108px;
    flex: 0 0 auto;
}

.bp-track-col::before {
    content: "";
    position: absolute;
    left: -6px;
    right: -6px;
    bottom: 15px;
    height: 2px;
    background: linear-gradient(90deg, var(--border-glow-cyan), var(--border-glow-gold));
    opacity: 0.35;
    z-index: 0;
}

.bp-track-col:first-child::before { left: 50%; }
.bp-track-col:last-child::before { right: 50%; }

.bp-track-col.is-milestone .bp-track-level-num {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--c-gold), var(--c-purple));
    color: var(--c-void);
    box-shadow: 0 0 14px rgba(255, 210, 76, 0.55);
}

.bp-track-col.is-current .bp-track-level-num {
    box-shadow: 0 0 0 2px var(--c-cyan), 0 0 16px var(--border-glow-cyan);
}

.bp-track-level-num {
    position: relative;
    z-index: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-panel-light);
    border: 1px solid var(--border-glow-gold);
    transform: rotate(45deg);
    font-weight: 700;
    font-size: 0.74rem;
    color: var(--c-gold);
}

.bp-track-level-num span { transform: rotate(-45deg); display: block; }

.bp-reward-card {
    position: relative;
    width: 100%;
    height: 108px;
    border-radius: var(--radius-m);
    border: 1px solid var(--border-glass);
    background:
        radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.12), transparent 60%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.3)),
        var(--c-panel-light);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -14px 20px -12px rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform var(--t-fast) var(--ease-premium), box-shadow var(--t-fast) var(--ease-premium);
}

.bp-reward-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.2) 50%, transparent 58%);
    transform: translateX(-130%);
    pointer-events: none;
    z-index: 2;
}

.bp-reward-card--free {
    border-color: var(--border-glow-cyan);
    box-shadow: inset 0 0 0 1px rgba(76, 212, 255, 0.15), inset 0 -14px 20px -12px rgba(0, 0, 0, 0.65);
}

.bp-reward-card--premium {
    border-color: var(--border-glow-gold);
    box-shadow: inset 0 0 0 1px rgba(255, 210, 76, 0.18), inset 0 -14px 20px -12px rgba(0, 0, 0, 0.65);
}

.bp-reward-card.is-claimable {
    cursor: pointer;
    box-shadow: 0 0 0 1px var(--c-cyan), 0 0 18px var(--border-glow-cyan), inset 0 0 22px rgba(76, 212, 255, 0.14);
    animation: bpRewardPulse 2.6s ease-in-out infinite;
}

.bp-reward-card--premium.is-claimable {
    box-shadow: 0 0 0 1px var(--c-gold), 0 0 18px var(--border-glow-gold), inset 0 0 22px rgba(255, 210, 76, 0.16);
}

/* Csillogó effekt az elérhető (claimable) jutalmakon: átfutó fénysáv +
   pislákoló csillám-pöttyök, folyamatosan ismétlődve — nem csak hoverre. */
.bp-reward-card.is-claimable::before {
    animation: bpRewardShineSweep 2.8s ease-in-out infinite;
}

.bp-reward-card.is-claimable::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 1) 1.3px, transparent 1.8px),
        radial-gradient(circle, rgba(255, 255, 255, 0.85) 1.3px, transparent 1.8px),
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 1.1px, transparent 1.8px);
    background-size: 100% 100%;
    background-position: 14px 16px, 78px 30px, 40px 82px;
    background-repeat: no-repeat;
    animation: bpLegendTwinkle 1.6s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes bpRewardPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

@keyframes bpRewardShineSweep {
    0% { transform: translateX(-130%); }
    45%, 100% { transform: translateX(130%); }
}

.bp-reward-card.is-claimable:hover {
    transform: translateY(-3px) scale(1.04);
}

.bp-reward-card.is-claimed { border-color: rgba(255, 255, 255, 0.14); }
.bp-reward-card.is-locked { border-color: rgba(255, 255, 255, 0.1); }

.bp-reward-icon {
    width: 74%;
    height: 74%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.bp-reward-qty {
    position: absolute;
    bottom: 10%;
    right: 8%;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(3, 5, 9, 0.78);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--c-text);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    z-index: 1;
}

/* Típus-jelvény (skin töredék / hős) az ikon jobb felső sarkában — "felső index". */
.bp-reward-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85));
    z-index: 1;
}

.bp-reward-state-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(3, 5, 9, 0.5);
    z-index: 1;
}

.bp-reward-lock img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.bp-reward-claimed { color: var(--c-buff); }

/* ---------- Missions ---------- */

.bp-mission-subtabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.bp-subtab {
    padding: 8px 16px;
    border-radius: var(--radius-s);
    border: 1px solid var(--border-glass);
    background: rgba(7, 12, 20, 0.7);
    color: var(--c-text-dim);
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 0.76rem;
    cursor: pointer;
}

.bp-subtab.active {
    background: rgba(176, 102, 255, 0.18);
    border-color: var(--c-purple);
    color: var(--c-text);
}

.bp-mission-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 16px;
}

.bp-mission-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 20px;
    border-radius: var(--radius-m);
    border: 1px solid var(--border-glass);
    background: rgba(7, 12, 20, 0.65);
}

.bp-mission-row.is-completed { border-color: var(--c-cyan); }
.bp-mission-row.is-claimed { opacity: 0.5; }

.bp-mission-info { flex: 1 1 auto; }

.bp-mission-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.bp-mission-progressbar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-bottom: 5px;
}

.bp-mission-progressfill {
    height: 100%;
    background: linear-gradient(90deg, var(--c-purple), var(--c-cyan));
}

.bp-mission-progresstext {
    font-size: 0.72rem;
    color: var(--c-text-dim);
}

.bp-mission-reward {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.bp-mission-xp {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--c-gold);
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
}

.bp-mission-xp-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex: 0 0 auto;
}

.bp-mission-claim-btn {
    padding: 8px 16px;
    border-radius: var(--radius-s);
    border: 1px solid var(--border-glow-cyan);
    background: rgba(76, 212, 255, 0.14);
    color: var(--c-cyan);
    font-weight: 700;
    font-size: 0.76rem;
    cursor: pointer;
    white-space: nowrap;
}

.bp-mission-claim-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: var(--c-text-dim);
    border-color: var(--border-glass);
    background: transparent;
}

.bp-mission-locked {
    padding: 30px;
    text-align: center;
    color: var(--c-text-dim);
    font-size: 0.86rem;
    border: 1px dashed var(--border-glass);
    border-radius: var(--radius-m);
}

/* ---------- Toast / level-up ---------- */

.bp-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: var(--radius-m);
    background: rgba(7, 12, 20, 0.95);
    border: 1px solid var(--border-glow-cyan);
    color: var(--c-text);
    font-weight: 600;
    font-size: 0.86rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-mid) var(--ease-premium), transform var(--t-mid) var(--ease-premium);
    z-index: var(--z-tooltip);
}

.bp-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.bp-levelup-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 5, 9, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-mid) var(--ease-premium);
    z-index: var(--z-overlay);
}

.bp-levelup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.bp-levelup-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 34px 60px;
    border-radius: var(--radius-l);
    background: linear-gradient(135deg, rgba(176, 102, 255, 0.25), rgba(76, 212, 255, 0.15));
    border: 1px solid var(--border-glow-gold);
    box-shadow: 0 0 60px rgba(176, 102, 255, 0.35);
    transform: scale(0.85);
    transition: transform var(--t-slow) var(--ease-premium);
    overflow: hidden;
}

.bp-levelup-overlay.show .bp-levelup-card {
    transform: scale(1);
}

.bp-levelup-art {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    opacity: 0.28;
    pointer-events: none;
    z-index: 0;
}

.bp-levelup-badge, #bpLevelupText { position: relative; z-index: 1; }

.bp-levelup-badge {
    font-family: "AOW", serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--c-gold);
}

#bpLevelupText {
    font-family: "AOW", serif;
    font-size: 2.2rem;
    background: linear-gradient(90deg, var(--c-gold), var(--c-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Premium modal ---------- */

.bp-premium-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 5, 9, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-mid) var(--ease-premium);
    z-index: var(--z-overlay);
}

.bp-premium-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.bp-premium-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    border-radius: var(--radius-l);
    border: 1px solid var(--border-glow-gold);
    background: linear-gradient(160deg, rgba(20, 14, 34, 0.97), rgba(9, 12, 20, 0.97));
    box-shadow: 0 0 70px rgba(176, 102, 255, 0.35);
    transform: scale(0.92);
    transition: transform var(--t-mid) var(--ease-premium);
}

.bp-premium-modal-overlay.show .bp-premium-modal { transform: scale(1); }

.bp-premium-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.06);
    color: var(--c-text-dim);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background var(--t-fast) var(--ease-premium), color var(--t-fast) var(--ease-premium);
}

.bp-premium-modal-close:hover { background: rgba(255, 255, 255, 0.14); color: var(--c-text); }

.bp-premium-modal-title {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--c-gold);
    text-shadow: 0 0 24px rgba(255, 210, 76, 0.5);
}

.bp-premium-modal-subtitle {
    margin: -8px 0 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--c-text-dim);
}

.bp-premium-modal .bp-premium-benefits { gap: 8px; }

.bp-premium-modal .bp-premium-benefits li {
    padding-left: 18px;
    font-size: 0.85rem;
}

.bp-premium-modal .bp-premium-benefits li::before {
    top: 6px;
    width: 7px;
    height: 7px;
}

.bp-premium-modal-summary h3 {
    margin: 0 0 10px;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--c-cyan);
}

.bp-premium-summary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bp-premium-summary-item {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-s);
    border: 1px solid var(--border-glow-gold);
    background: rgba(255, 210, 76, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-premium-summary-item img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.bp-premium-summary-item .bp-premium-summary-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

.bp-premium-summary-qty {
    position: absolute;
    right: 2px;
    bottom: 1px;
    padding: 0 3px;
    border-radius: 3px;
    background: rgba(3, 5, 9, 0.85);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--c-gold);
}

.bp-premium-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
}

.bp-premium-balance {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bp-premium-balance-label {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--c-text-dim);
}

.bp-premium-balance-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--c-text);
}

.bp-premium-balance-value img { width: 22px; height: 22px; object-fit: contain; }

.bp-premium-balance-value.is-insufficient { color: #ff6e6e; }

/* ---------- Reward claim modal ---------- */

.bp-reward-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 5, 9, 0.78);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-mid) var(--ease-premium);
    z-index: var(--z-overlay);
}

.bp-reward-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.bp-reward-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 28px;
    border-radius: var(--radius-l);
    border: none;
    background: linear-gradient(160deg, rgba(20, 14, 34, 0.97), rgba(9, 12, 20, 0.97));
    box-shadow: 0 0 90px rgba(176, 102, 255, 0.4);
    transform: scale(0.9);
    transition: transform var(--t-mid) var(--ease-premium);
}

.bp-reward-modal-overlay.show .bp-reward-modal { transform: scale(1); }

/* Szivárványosan csillogó körvonal a modal köré — a színek lassan
   átúsznak egymásba (hue-rotate), de a gyűrű maga nem forog. */
.bp-reward-modal::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    padding: 4px;
    background: conic-gradient(from 0deg, #ff5f6d, #ffc371, #f7ff6b, #7bff8a, #6bd4ff, #a86bff, #ff6bd6, #ff5f6d);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: bpRainbowHueShift 6s linear infinite;
    pointer-events: none;
}

.bp-reward-modal::after {
    content: "";
    position: absolute;
    inset: -30px;
    border-radius: inherit;
    background: conic-gradient(from 0deg, #ff5f6d, #ffc371, #f7ff6b, #7bff8a, #6bd4ff, #a86bff, #ff6bd6, #ff5f6d);
    filter: blur(34px);
    opacity: 0.5;
    z-index: -1;
    animation: bpRainbowHueShiftBlur 6s linear infinite;
    pointer-events: none;
}

@keyframes bpRainbowHueShift {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}

@keyframes bpRainbowHueShiftBlur {
    from { filter: blur(34px) hue-rotate(0deg); }
    to { filter: blur(34px) hue-rotate(360deg); }
}

.bp-reward-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.06);
    color: var(--c-text-dim);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background var(--t-fast) var(--ease-premium), color var(--t-fast) var(--ease-premium);
}

.bp-reward-modal-close:hover { background: rgba(255, 255, 255, 0.14); color: var(--c-text); }

.bp-reward-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.bp-reward-modal-faction {
    font-family: "Montserrat", "AOW", sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f6ecff;
    animation: bpTitleSparkle 2.6s ease-in-out infinite;
}

.bp-reward-modal-bp-label {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--c-gold), #ffe9a8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 22px rgba(255, 210, 76, 0.7), 0 0 40px rgba(255, 210, 76, 0.35);
}

.bp-reward-modal-congrats {
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text);
}

.bp-gold-btn.bp-reward-modal-ok {
    width: 160px;
    font-size: 1rem;
}

/* Végleges (nem-zsákbamacska) jutalom megjelenítése — nagy ikon + érték. */
.bp-reward-reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    animation: bpRewardRevealIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bp-reward-reveal-icon-wrap {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-reward-reveal-icon-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 210, 76, 0.4), transparent 70%);
    animation: bpRevealFlash 0.9s ease-out both;
}

.bp-reward-reveal-icon {
    position: relative;
    width: 108px;
    height: 108px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
}

.bp-reward-reveal-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85));
}

.bp-reward-reveal-value {
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--c-gold);
    text-shadow: 0 0 22px rgba(255, 210, 76, 0.55);
}

@keyframes bpRewardRevealIn {
    0% { transform: scale(0.4) rotateY(-90deg); opacity: 0; }
    60% { transform: scale(1.08) rotateY(0deg); opacity: 1; }
    100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

@keyframes bpRevealFlash {
    0% { opacity: 0; transform: scale(0.5); }
    45% { opacity: 1; transform: scale(1.3); }
    100% { opacity: 0; transform: scale(1.6); }
}

/* Zsákbamacska állapot: csillogó lap "?" ikonnal, kattintásra lassú
   flip-out animációval tűnik el, majd a valódi jutalom fedi fel. */
.bp-mystery-card {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: var(--radius-l);
    border: 2px solid var(--border-glow-gold);
    background: linear-gradient(160deg, rgba(255, 210, 76, 0.14), rgba(176, 102, 255, 0.12));
    cursor: pointer;
    overflow: hidden;
    transform-style: preserve-3d;
    animation: bpMysteryBreathe 2.2s ease-in-out infinite;
}

.bp-mystery-card img {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(255, 210, 76, 0.65));
}

.bp-mystery-hint {
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    color: var(--c-text-dim);
    letter-spacing: 0.03em;
    text-align: center;
    padding: 0 10px;
}

.bp-mystery-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 1) 1.4px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.85) 1.4px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 1.2px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.8) 1.2px, transparent 2px);
    background-size: 100% 100%;
    background-position: 18px 26px, 160px 44px, 34px 150px, 150px 168px;
    background-repeat: no-repeat;
    animation: bpLegendTwinkle 1.3s ease-in-out infinite;
    pointer-events: none;
}

.bp-mystery-card::after {
    content: "";
    position: absolute;
    inset: -30% 0;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.55) 48%, transparent 100%);
    transform: translateY(-140%);
    animation: bpLegendShimmer 2.2s ease-in-out infinite;
    pointer-events: none;
}

.bp-mystery-card.is-revealing {
    animation: bpMysteryFlipOut 0.7s ease-in forwards;
    pointer-events: none;
}

@keyframes bpMysteryBreathe {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 210, 76, 0.3); }
    50% { box-shadow: 0 0 46px rgba(255, 210, 76, 0.8); }
}

@keyframes bpMysteryFlipOut {
    0% { transform: rotateY(0deg) scale(1); opacity: 1; }
    60% { transform: rotateY(100deg) scale(1.1); opacity: 1; }
    100% { transform: rotateY(180deg) scale(0.7); opacity: 0; }
}

@media (max-width: 1100px) {
    .bp-header { flex-wrap: wrap; }
    .bp-header-character { order: 3; flex-basis: 100%; justify-content: center; min-height: 200px; }
    .bp-header-character img { position: static; transform: none; height: 100%; }
    .bp-premium-block { position: static; order: 2; margin: 0 auto; }
    .bp-premium-card { width: 100%; max-width: 380px; }
}

@media (max-width: 900px) {
    .bp-page { padding: 16px; }
    .bp-track-legend { display: none; }
}
