:root {
    --b2pow-primary: #0099FF;
    --b2pow-text: #102238;
    --b2pow-border: rgba(255, 255, 255, 0.32);
    --b2pow-glass: rgba(255, 255, 255, 0.42);
    --b2pow-glass-strong: rgba(255, 255, 255, 0.56);
    --b2pow-shadow: 0 14px 32px rgba(10, 45, 85, 0.13);
    --b2pow-shadow-soft: 0 8px 18px rgba(0, 85, 155, 0.1);
}

.b2pow-page-wrap {
    position: relative;
    max-width: 1020px;
    margin: 16px auto;
    padding: 0 10px 20px;
}

.b2pow-page-wrap::before,
.b2pow-page-wrap::after {
    content: '';
    position: absolute;
    z-index: 0;
    border-radius: 999px;
    pointer-events: none;
}

.b2pow-page-wrap::before {
    width: 280px;
    height: 280px;
    top: -90px;
    right: -80px;
    background: radial-gradient(circle at center, rgba(0, 153, 255, 0.22), rgba(0, 153, 255, 0));
}

.b2pow-page-wrap::after {
    width: 240px;
    height: 240px;
    left: -70px;
    bottom: -70px;
    background: radial-gradient(circle at center, rgba(80, 180, 255, 0.16), rgba(80, 180, 255, 0));
}

.b2pow-panel {
    position: relative;
    z-index: 1;
    background: linear-gradient(130deg, var(--b2pow-glass-strong), var(--b2pow-glass));
    border: 1px solid var(--b2pow-border);
    border-radius: 14px;
    box-shadow: var(--b2pow-shadow);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    padding: 12px;
    margin-bottom: 10px;
}

.b2pow-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(0, 153, 255, 0.24));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.b2pow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.b2pow-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.b2pow-title {
    margin: 0;
    color: var(--b2pow-text);
    font-size: 18px;
    letter-spacing: 0.2px;
    font-weight: 700;
}

.b2pow-rate-tag,
.b2pow-check-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 10px;
    color: #025b96;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.72), rgba(206, 234, 255, 0.78));
    border: 1px solid rgba(175, 214, 245, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.b2pow-check-tag.is-checked {
    color: #09734e;
    border-color: rgba(150, 225, 197, 0.95);
    background: linear-gradient(140deg, rgba(241, 255, 250, 0.75), rgba(208, 247, 232, 0.88));
}

.b2pow-switch-panel {
    padding: 8px;
}

.b2pow-tab-nav {
    display: inline-flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(175, 214, 245, 0.92);
    border-radius: 999px;
    padding: 4px;
}

.b2pow-tab-btn {
    border: none;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #1b466f;
    background: transparent;
    cursor: pointer;
    transition: .2s ease;
}

.b2pow-tab-btn:hover {
    background: rgba(205, 233, 255, 0.55);
}

.b2pow-tab-btn.is-active {
    color: #fff;
    background: linear-gradient(145deg, #1cabff, #0089e6);
    box-shadow: 0 6px 16px rgba(0, 153, 255, 0.28);
}

.b2pow-level-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.b2pow-level-card {
    border: 1px solid rgba(175, 210, 238, 0.85);
    border-radius: 10px;
    padding: 9px 10px;
    text-align: left;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.68), rgba(232, 245, 255, 0.62));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.b2pow-level-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--b2pow-shadow-soft);
    border-color: rgba(97, 180, 241, 0.92);
}

.b2pow-level-card.is-active {
    border-color: var(--b2pow-primary);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(207, 236, 255, 0.85));
    box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.15), 0 10px 20px rgba(0, 153, 255, 0.14);
}

.b2pow-level-name {
    font-size: 14px;
    color: #0f1f31;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.b2pow-level-reward,
.b2pow-level-meta {
    margin: 0;
    color: #425771;
    font-size: 11px;
    line-height: 1.35;
}

.b2pow-level-meta span {
    color: #66809f;
}

.b2pow-calc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 10px;
}

.b2pow-left,
.b2pow-right {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.7), rgba(238, 248, 255, 0.64));
    border: 1px solid rgba(184, 219, 244, 0.85);
    border-radius: 10px;
    padding: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.b2pow-status-box {
    width: 100%;
    min-height: 34px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(234, 247, 255, 0.82));
    border: 1px solid rgba(188, 220, 243, 0.92);
    border-radius: 999px;
    color: #2f445b;
    font-size: 11px;
    line-height: 1.32;
    padding: 7px 11px;
    box-sizing: border-box;
}

.b2pow-btn-row {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.b2pow-btn {
    border: none;
    border-radius: 10px;
    min-height: 30px;
    padding: 0 11px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1px;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.b2pow-btn:hover:enabled {
    transform: translateY(-1px);
}

.b2pow-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.b2pow-btn-primary {
    color: #fff;
    background: linear-gradient(145deg, #1cabff, #0089e6);
    box-shadow: 0 7px 14px rgba(0, 153, 255, 0.28);
}

.b2pow-btn-primary:hover:enabled {
    box-shadow: 0 8px 18px rgba(0, 153, 255, 0.36);
}

.b2pow-btn-ghost {
    background: rgba(255, 255, 255, 0.72);
    color: #085485;
    border: 1px solid rgba(172, 211, 241, 0.95);
}

.b2pow-btn-submit {
    margin-top: 10px;
    background: linear-gradient(145deg, rgba(226, 244, 255, 0.95), rgba(205, 234, 255, 0.92));
    color: #0b5f98;
    width: 96px;
}

.b2pow-btn-submit.is-ready {
    background: linear-gradient(145deg, #1cabff, #0089e6);
    color: #fff;
    box-shadow: 0 7px 14px rgba(0, 153, 255, 0.28);
}

.b2pow-metrics {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 4px;
    color: #21344a;
    font-size: 11px;
    line-height: 1.4;
}

.b2pow-metrics span {
    color: #0f2032;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.b2pow-progress-track {
    position: relative;
    margin-top: 8px;
    height: 7px;
    border-radius: 999px;
    border: 1px solid rgba(146, 197, 232, 0.92);
    background: linear-gradient(180deg, rgba(6, 25, 41, 0.88), rgba(13, 37, 59, 0.94));
    overflow: hidden;
}

.b2pow-progress-track::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.08) 8px,
        rgba(255, 255, 255, 0) 8px,
        rgba(255, 255, 255, 0) 16px
    );
    animation: b2pow-track-run 1.8s linear infinite;
}

.b2pow-progress-inner {
    position: relative;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #4ec1ff 0%, var(--b2pow-primary) 55%, #2fd4ff 100%);
    box-shadow: 0 0 12px rgba(0, 172, 255, 0.52);
    transition: width .18s linear;
}

.b2pow-progress-inner::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(87, 205, 255, 0.9) 45%, rgba(23, 162, 244, 0) 70%);
}

.b2pow-panel.is-mining .b2pow-progress-track::before {
    animation-duration: 0.9s;
}

.b2pow-panel.is-mining .b2pow-left,
.b2pow-panel.is-mining .b2pow-right {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 0 0 1px rgba(0, 153, 255, 0.15), 0 11px 20px rgba(0, 153, 255, 0.15);
}

.b2pow-login-tip {
    margin-bottom: 8px;
    border-radius: 8px;
    background: rgba(255, 244, 228, 0.84);
    color: #8c5502;
    border: 1px solid rgba(255, 208, 153, 0.9);
    padding: 6px 10px;
    font-size: 10px;
}

.b2pow-rank-page {
    min-height: 220px;
}

.b2pow-rank-panel {
    margin-top: 0;
    border-radius: 10px;
    border: 1px solid rgba(176, 215, 243, 0.9);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(231, 246, 255, 0.72));
    padding: 10px;
}

.b2pow-rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.b2pow-rank-title {
    margin: 0;
    font-size: 13px;
    color: #0f2942;
    font-weight: 700;
}

.b2pow-rank-refresh {
    border: 1px solid rgba(157, 207, 242, 0.95);
    background: rgba(255, 255, 255, 0.84);
    color: #0a5e99;
    border-radius: 999px;
    min-height: 24px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.b2pow-self-rank {
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid rgba(182, 220, 247, 0.9);
    background: rgba(255, 255, 255, 0.72);
    padding: 6px 8px;
    color: #2c4259;
    font-size: 10px;
}

.b2pow-rank-list {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.b2pow-rank-item {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    border-radius: 8px;
    border: 1px solid rgba(189, 222, 247, 0.86);
    background: rgba(255, 255, 255, 0.74);
    padding: 5px 7px;
}

.b2pow-rank-item.rank-top-1 {
    border-color: rgba(255, 210, 105, 0.95);
    background: linear-gradient(145deg, rgba(255, 250, 231, 0.92), rgba(255, 238, 194, 0.74));
}

.b2pow-rank-item.rank-top-2 {
    border-color: rgba(196, 210, 228, 0.95);
    background: linear-gradient(145deg, rgba(247, 251, 255, 0.9), rgba(228, 239, 250, 0.74));
}

.b2pow-rank-item.rank-top-3 {
    border-color: rgba(227, 184, 150, 0.95);
    background: linear-gradient(145deg, rgba(255, 246, 238, 0.9), rgba(245, 224, 206, 0.74));
}

.b2pow-rank-order {
    min-width: 32px;
    color: #0f2c46;
    font-size: 10px;
    font-weight: 700;
}

.b2pow-rank-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(182, 218, 243, 0.95);
}

.b2pow-rank-main {
    min-width: 0;
}

.b2pow-rank-name {
    color: #112a42;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.b2pow-rank-meta {
    margin-top: 1px;
    color: #617892;
    font-size: 9px;
}

.b2pow-rank-score {
    color: #065f98;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.b2pow-rank-empty {
    border-radius: 8px;
    border: 1px dashed rgba(168, 208, 237, 0.95);
    background: rgba(255, 255, 255, 0.68);
    color: #5e748d;
    font-size: 10px;
    padding: 8px;
    text-align: center;
}

@keyframes b2pow-track-run {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-24px);
    }
}

@media (max-width: 900px) {
    .b2pow-level-grid,
    .b2pow-calc-grid {
        grid-template-columns: 1fr;
    }

    .b2pow-title {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .b2pow-page-wrap {
        margin-top: 10px;
        padding: 0 8px 12px;
    }

    .b2pow-panel {
        border-radius: 12px;
        padding: 9px;
        margin-bottom: 8px;
    }

    .b2pow-title {
        font-size: 14px;
    }

    .b2pow-rate-tag,
    .b2pow-check-tag {
        min-height: 22px;
        font-size: 9px;
        padding: 0 7px;
    }

    .b2pow-tab-nav {
        width: 100%;
        justify-content: space-between;
    }

    .b2pow-tab-btn {
        flex: 1;
        min-height: 26px;
        font-size: 10px;
        padding: 0 6px;
    }

    .b2pow-level-name {
        font-size: 13px;
    }

    .b2pow-level-reward,
    .b2pow-level-meta,
    .b2pow-status-box,
    .b2pow-metrics,
    .b2pow-btn,
    .b2pow-rank-title,
    .b2pow-rank-refresh,
    .b2pow-self-rank,
    .b2pow-rank-name,
    .b2pow-rank-score,
    .b2pow-rank-empty {
        font-size: 10px;
    }

    .b2pow-rank-item {
        grid-template-columns: auto auto minmax(0, 1fr);
        gap: 6px;
    }

    .b2pow-rank-score {
        grid-column: 2 / span 2;
        justify-self: start;
        margin-left: 28px;
    }
}

