/* ================= RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #06b6d4;
    --accent-color: #7c3aed;

    --page-background: #eef4ff;
    --card-background: #ffffff;
    --soft-blue: #dbeafe;

    --text-dark: #172033;
    --text-light: #64748b;
    --border-color: #e2e8f0;

    --container-width: 540px;

    --small-shadow: 0 5px 15px rgba(37, 99, 235, 0.08);
    --card-shadow: 0 12px 30px rgba(30, 64, 175, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: #dce7f8;
    color: var(--text-dark);
    font-family: Arial, Helvetica, sans-serif;
}

button,
a {
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ================= VIP APP ================= */

.vip-app {
    width: 100%;
    max-width: var(--container-width);
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    background:
        linear-gradient(
            180deg,
            #eff6ff 0%,
            #f8fafc 55%,
            #eef4ff 100%
        );
}


/* ================= VIP HERO ================= */

.vip-hero {
    position: relative;
    min-height: 440px;
    overflow: hidden;
    padding-bottom: 58px;
    border-radius: 0 0 50% 50% / 0 0 38px 38px;
    background:
        linear-gradient(
            145deg,
            var(--primary-color) 0%,
            var(--secondary-color) 100%
        );
}


/* ================= VIP HEADER ================= */

.vip-header {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;
    min-height: 82px;
    padding: 14px 18px;
}

.vip-header h1 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    text-align: center;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 25px;
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.back-button:active {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(0.92);
}


/* ================= HERO DECORATION ================= */

.vip-decoration {
    position: absolute;
    top: 105px;
    right: -18px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.18);
    transform: rotate(-10deg);
}

.vip-decoration > span {
    font-size: 105px;
    font-weight: 900;
    letter-spacing: -8px;
}

.decoration-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    border: 6px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.3);
    font-size: 29px;
}


/* ================= VIP ACCOUNT CARD ================= */

.vip-account-card {
    position: relative;
    z-index: 4;
    min-height: 180px;
    margin: 125px 14px 0;
    padding: 28px 23px 35px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px 20px 48% 48% / 20px 20px 35px 35px;
    background:
        linear-gradient(
            135deg,
            #172033 0%,
            #26334d 100%
        );
    color: #ffffff;
    box-shadow: var(--card-shadow);
}

.vip-account-card::before {
    position: absolute;
    top: -90px;
    right: -55px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.1);
    content: "";
}

.vip-account-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.member-id {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
}

.member-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 8px;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
    color: #ffffff;
    font-size: 14px;
    transform: rotate(45deg);
}

.member-icon i {
    transform: rotate(-45deg);
}

.current-vip-level {
    color: #67e8f9;
    font-size: 20px;
}

.upgrade-information {
    position: relative;
    z-index: 2;
    margin-top: 34px;
}

.upgrade-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 11px;
    color: #bfdbfe;
    font-size: 14px;
    font-weight: 700;
}

.upgrade-progress {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border: none;
    border-radius: 20px;
    background: #475569;
    appearance: none;
    -webkit-appearance: none;
}

.upgrade-progress::-webkit-progress-bar {
    border-radius: 20px;
    background: #475569;
}

.upgrade-progress::-webkit-progress-value {
    border-radius: 20px;
    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            var(--secondary-color)
        );
}

.upgrade-progress::-moz-progress-bar {
    border-radius: 20px;
    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            var(--secondary-color)
        );
}


/* ================= VIP MAIN ================= */

.vip-main {
    position: relative;
    z-index: 10;
    margin-top: -35px;
    padding: 0 18px 35px;
}


/* ================= VIP TABS ================= */

.vip-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    min-height: 82px;
}

.vip-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 65px;
    padding: 15px 2px;
    background: transparent;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 800;
}

.vip-tab i {
    font-size: 13px;
}

.vip-tab.active {
    color: var(--primary-color);
}

.vip-tab.active::after {
    position: absolute;
    bottom: 3px;
    left: 50%;
    width: 42px;
    height: 5px;
    border-radius: 10px;
    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            var(--secondary-color)
        );
    content: "";
    transform: translateX(-50%);
}


/* ================= VIP LEVEL CONTENT ================= */

.vip-level-content {
    margin-top: 25px;
}


/* ================= VIP RANK CARD ================= */

.vip-rank-card {
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: 20px;
    background:
        linear-gradient(
            160deg,
            #ffffff 0%,
            #eff6ff 100%
        );
    box-shadow: var(--small-shadow);
}

.vip-rank-artwork {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.rank-glow {
    position: absolute;
    top: 38px;
    left: 50%;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.13);
    filter: blur(5px);
    transform: translateX(-50%);
}

.rank-wreath {
    position: absolute;
    top: 82px;
    left: 50%;
    width: 270px;
    height: 155px;
    border-right: 12px dotted #93c5fd;
    border-bottom: 12px solid #bfdbfe;
    border-left: 12px dotted #93c5fd;
    border-radius: 0 0 50% 50%;
    transform: translateX(-50%);
}

.rank-emblem {
    position: absolute;
    top: 48px;
    left: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 105px;
    height: 115px;
    background:
        linear-gradient(
            145deg,
            #bfdbfe,
            #ffffff 48%,
            #67e8f9
        );
    clip-path:
        polygon(
            50% 0%,
            92% 23%,
            92% 76%,
            50% 100%,
            8% 76%,
            8% 23%
        );
    filter: drop-shadow(0 10px 12px rgba(37, 99, 235, 0.2));
    transform: translateX(-50%);
}

.rank-emblem::before {
    position: absolute;
    inset: 10px;
    background: rgba(255, 255, 255, 0.58);
    content: "";
    clip-path:
        polygon(
            50% 0%,
            92% 23%,
            92% 76%,
            50% 100%,
            8% 76%,
            8% 23%
        );
}

.rank-emblem span {
    position: relative;
    z-index: 2;
    color: var(--primary-dark);
    font-size: 48px;
    font-weight: 800;
}

.rank-podium {
    position: absolute;
    right: 0;
    bottom: 22px;
    left: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.podium-tier {
    display: block;
    border: 1px solid rgba(37, 99, 235, 0.09);
    background:
        linear-gradient(
            180deg,
            #ffffff,
            #bfdbfe
        );
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.12);
}

.podium-top {
    width: 52%;
    height: 54px;
    border-radius: 50% 50% 18px 18px / 18px 18px 18px 18px;
}

.podium-middle {
    width: 70%;
    height: 60px;
    margin-top: -9px;
    border-radius: 50% 50% 20px 20px / 18px 18px 20px 20px;
}

.podium-bottom {
    width: 88%;
    height: 66px;
    margin-top: -9px;
    border-radius: 50% 50% 23px 23px / 18px 18px 23px 23px;
}


/* ================= VIP BUTTONS ================= */

.view-rules-button,
.continue-purchase-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 40px);
    margin-right: auto;
    margin-left: auto;
    font-weight: 800;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.view-rules-button {
    min-height: 58px;
    margin-top: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    background: #ffffff;
    color: var(--primary-color);
    font-size: 17px;
}

.continue-purchase-button {
    min-height: 65px;
    margin-top: 22px;
    border-radius: 35px;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
    color: #ffffff;
    font-size: 18px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.view-rules-button:active,
.continue-purchase-button:active {
    transform: scale(0.96);
}


/* ================= VIP TASK SECTION ================= */

.vip-tasks-section {
    margin-top: 28px;
    padding: 25px 20px;
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--small-shadow);
}

.vip-tasks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.task-title {
    display: flex;
    align-items: center;
    gap: 13px;
}

.task-title h2 {
    color: var(--text-dark);
    font-size: 21px;
}

.task-title span {
    color: var(--text-light);
    font-size: 15px;
    font-weight: 700;
}

.reset-time {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}


/* ================= BONUS SUMMARY ================= */

.bonus-summary {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 20px;
    overflow: hidden;
    border-radius: 15px;
    background:
        linear-gradient(
            135deg,
            #172033,
            #26334d
        );
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.bonus-summary::after {
    position: absolute;
    top: 22%;
    bottom: 22%;
    left: 50%;
    width: 1px;
    background: rgba(103, 232, 249, 0.25);
    content: "";
}

.bonus-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 105px;
    padding: 15px;
    flex-direction: column;
}

.bonus-item span {
    color: #93c5fd;
    font-size: 14px;
    font-weight: 700;
}

.bonus-item strong {
    margin-top: 7px;
    color: #ffffff;
    font-size: 28px;
}


/* ================= TASK LIST ================= */

.vip-task-list {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-direction: column;
}

.vip-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 82px;
    padding: 14px 16px;
    border: 1px solid #eff6ff;
    border-radius: 14px;
    background: #f8fafc;
}

.task-information h3 {
    color: var(--text-dark);
    font-size: 17px;
}

.task-information strong {
    display: block;
    margin-top: 3px;
    color: var(--primary-color);
    font-size: 15px;
}

.task-action-button {
    min-width: 150px;
    min-height: 43px;
    padding: 9px 15px;
    border-radius: 23px;
    background: #e2e8f0;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
}

.task-action-button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}


/* ================= RESPONSIVE ================= */

@media (min-width: 600px) {
    .vip-app {
        box-shadow: 0 0 40px rgba(15, 23, 42, 0.15);
    }
}

@media (max-width: 440px) {
    .vip-hero {
        min-height: 410px;
    }

    .vip-header {
        min-height: 72px;
        padding-right: 13px;
        padding-left: 13px;
    }

    .vip-header h1 {
        font-size: 25px;
    }

    .vip-account-card {
        margin-top: 112px;
        padding-right: 18px;
        padding-left: 18px;
    }

    .member-id,
    .current-vip-level {
        font-size: 17px;
    }

    .upgrade-text {
        font-size: 12px;
    }

    .vip-main {
        padding-right: 13px;
        padding-left: 13px;
    }

    .vip-tab {
        gap: 2px;
        font-size: 13px;
    }

    .vip-tab i {
        font-size: 11px;
    }

    .vip-rank-artwork {
        height: 320px;
    }

    .rank-wreath {
        width: 230px;
    }

    .rank-emblem {
        width: 92px;
        height: 102px;
    }

    .rank-emblem span {
        font-size: 41px;
    }

    .view-rules-button,
    .continue-purchase-button {
        width: calc(100% - 20px);
    }

    .vip-tasks-section {
        padding-right: 15px;
        padding-left: 15px;
    }

    .task-title h2 {
        font-size: 18px;
    }

    .reset-time {
        font-size: 11px;
    }

    .task-action-button {
        min-width: 125px;
        font-size: 12px;
    }
}

@media (max-width: 350px) {
    .vip-tab {
        font-size: 11px;
    }

    .vip-tab i {
        display: none;
    }

    .vip-tasks-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .vip-task-item {
        padding-right: 11px;
        padding-left: 11px;
    }

    .task-action-button {
        min-width: 110px;
        padding-right: 8px;
        padding-left: 8px;
    }
}

/* =========================================
   VIP FUNCTIONAL STATES
========================================= */

.vip-tab {
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.vip-tab:active {
    transform: scale(0.97);
}

.vip-tab.unlocked {
    border-color: #21bc91;
}

.vip-tab.unlocked i {
    color: #0aa779;
}

.vip-tab.current-level {
    background: linear-gradient(135deg, #ecfff9, #d7f8ed);
}

.vip-level-details {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #dcecf0;
    border-radius: 16px;
    background: #f3fbfd;
}

.vip-level-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.vip-level-details-header h2 {
    margin: 0;
    color: #173641;
    font-size: 18px;
}

.vip-level-status {
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff0ee;
    color: #e45850;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.vip-level-status.unlocked {
    background: #ddfaef;
    color: #079b70;
}

.vip-level-information {
    display: grid;
    gap: 9px;
}

.vip-level-information-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.vip-level-information-row span {
    color: #7b8b91;
    font-size: 12px;
}

.vip-level-information-row strong {
    color: #087d9f;
    text-align: right;
    font-size: 13px;
}

.vip-level-benefit {
    margin: 12px 0 0;
    padding-top: 11px;
    border-top: 1px solid #deecef;
    color: #61747c;
    font-size: 12px;
    line-height: 1.5;
}

.continue-purchase-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}


/* VIP Tasks */

.vip-task-item .task-information p {
    margin: 4px 0 5px;
    color: #84949a;
    font-size: 11px;
}

.task-action-button.claimable {
    border-color: transparent;
    background: linear-gradient(135deg, #14c8df, #087d9f);
    color: #ffffff;
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 7px 16px rgba(8, 137, 165, 0.18);
}

.task-action-button.claimed {
    background: #e3f8f0;
    color: #079b70;
    opacity: 1;
}


/* =========================================
   VIP RULES MODAL
========================================= */

body.vip-modal-open {
    overflow: hidden;
}

.vip-rules-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.vip-rules-modal.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.vip-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 22, 31, 0.72);
    backdrop-filter: blur(5px);
}

.vip-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(100%, 430px);
    max-height: calc(100vh - 35px);
    overflow-y: auto;
    padding: 28px 20px 20px;
    border: 1px solid #d9edf3;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 25px 70px rgba(0, 50, 68, 0.3);
    transform: translateY(24px) scale(0.96);
    transition: transform 0.25s ease;
}

.vip-rules-modal.open .vip-modal-dialog {
    transform: translateY(0) scale(1);
}

.vip-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #edf8fb;
    color: #49616b;
    font-size: 17px;
    cursor: pointer;
}

.vip-modal-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 19px;
    background: linear-gradient(135deg, #16c8df, #087d9f);
    color: #ffffff;
    font-size: 26px;
}

.vip-modal-dialog h2 {
    margin: 0;
    color: #16323d;
    text-align: center;
    font-size: 23px;
}

.vip-modal-description {
    margin: 8px auto 18px;
    color: #718188;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

.vip-general-rules {
    margin: 0 0 17px;
    padding-left: 22px;
    color: #61747c;
    font-size: 12px;
    line-height: 1.65;
}

.vip-rule-level-list {
    display: grid;
    gap: 8px;
}

.vip-rule-level {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 12px;
    border: 1px solid #dfedf1;
    border-radius: 13px;
}

.vip-rule-level.selected {
    border-color: #0ba9c4;
    background: #effbfe;
}

.vip-rule-level span {
    color: #536971;
    font-size: 12px;
    font-weight: 700;
}

.vip-rule-level strong {
    color: #087d9f;
    font-size: 13px;
}

.vip-modal-done {
    width: 100%;
    min-height: 49px;
    margin-top: 19px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #14c8df, #087d9f);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}


/* Toast */

.vip-page-toast {
    position: fixed;
    left: 50%;
    bottom: 100px;
    z-index: 100000;
    max-width: calc(100% - 35px);
    padding: 12px 18px;
    border-radius: 13px;
    background: #153842;
    color: #ffffff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(0, 34, 45, 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 20px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.vip-page-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 480px) {
    .vip-rules-modal {
        align-items: end;
        padding: 12px;
    }

    .vip-modal-dialog {
        width: 100%;
        padding: 27px 17px 18px;
        border-radius: 24px 24px 18px 18px;
    }
}


/* =========================================================
   MARATHON VIP — PREMIUM RESPONSIVE LAYOUT OVERRIDE

   Paste this complete block at the END of vip.css.
   No HTML or JavaScript changes are required.
   Existing VIP calculations, purchases, tasks and modal stay unchanged.
========================================================= */

/* ---------- Page and hero proportions ---------- */

.vip-app {
    --vip-content-width: 470px;
}

.vip-hero {
    min-height: 352px;
    padding-bottom: 42px;
    border-radius: 0 0 34px 34px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.24);
}

.vip-header {
    min-height: 68px;
    padding: 12px 20px;
}

.vip-header h1 {
    font-size: 24px;
    letter-spacing: 0.3px;
}

.back-button {
    width: 40px;
    height: 40px;
    font-size: 21px;
}

.vip-decoration {
    top: 76px;
    right: -12px;
    gap: 10px;
}

.vip-decoration > span {
    font-size: 82px;
    letter-spacing: -6px;
}

.decoration-circle {
    width: 54px;
    height: 54px;
    border-width: 5px;
    font-size: 23px;
}

/* ---------- Compact account summary ---------- */

.vip-account-card {
    width: min(calc(100% - 36px), var(--vip-content-width));
    min-height: 142px;
    margin: 72px auto 0;
    padding: 20px 20px 24px;
    border-radius: 22px 22px 34px 34px;
    box-shadow: 0 13px 30px rgba(13, 35, 66, 0.22);
}

.vip-account-card::after {
    position: absolute;
    top: 0;
    right: 24px;
    left: 24px;
    height: 2px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(103, 232, 249, 0.72),
        transparent
    );
    content: "";
}

.member-id {
    gap: 9px;
    font-size: 17px;
}

.member-icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
    font-size: 12px;
}

.current-vip-level {
    font-size: 17px;
}

.upgrade-information {
    margin-top: 24px;
}

.upgrade-text {
    gap: 10px;
    margin-bottom: 9px;
    font-size: 12px;
    line-height: 1.35;
}

.upgrade-progress {
    height: 9px;
}

/* ---------- Main content ---------- */

.vip-main {
    margin-top: -26px;
    padding: 0 18px 40px;
}

/* ---------- Premium VIP level selector ---------- */

.vip-tabs {
    width: min(100%, var(--vip-content-width));
    min-height: 0;
    margin-inline: auto;
    padding: 6px;
    gap: 6px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.12);
    backdrop-filter: blur(10px);
}

.vip-tab {
    position: relative;
    min-height: 60px;
    padding: 7px 2px;
    gap: 5px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e4ecf7;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f5f8fd);
    color: #64748b;
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 3px 9px rgba(30, 64, 175, 0.05);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.vip-tab::before {
    position: absolute;
    top: 0;
    right: 18%;
    left: 18%;
    height: 3px;
    border-radius: 0 0 6px 6px;
    background: #cbd5e1;
    content: "";
}

.vip-tab i {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #edf2f8;
    color: #94a3b8;
    font-size: 8px;
}

.vip-tab.unlocked:not(.active) {
    border-color: #a7ead5;
    background: linear-gradient(180deg, #f2fffb, #e7faf4);
    color: #078b69;
}

.vip-tab.unlocked:not(.active)::before {
    background: #10b981;
}

.vip-tab.unlocked:not(.active) i {
    background: #d5f7eb;
    color: #079b70;
}

.vip-tab.current-level:not(.active) {
    border-color: #85ddec;
    background: linear-gradient(180deg, #f0fcff, #def7fb);
    color: #087d9f;
    box-shadow: 0 5px 14px rgba(8, 137, 165, 0.12);
}

.vip-tab.current-level:not(.active)::before {
    background: #06b6d4;
}

.vip-tab.active {
    border-color: transparent;
    background: linear-gradient(145deg, #2563eb, #06b6d4);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
    transform: translateY(-2px);
}

.vip-tab.active::before {
    right: 24%;
    left: 24%;
    background: rgba(255, 255, 255, 0.8);
}

.vip-tab.active::after {
    display: none;
}

.vip-tab.active i {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* ---------- Rank stage ---------- */

.vip-level-content {
    width: min(100%, var(--vip-content-width));
    margin: 16px auto 0;
}

.vip-rank-card {
    padding: 9px;
    border-color: rgba(37, 99, 235, 0.12);
    border-radius: 22px;
    background-image:
        radial-gradient(
            circle at 50% 28%,
            rgba(103, 232, 249, 0.2),
            transparent 35%
        ),
        linear-gradient(160deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.09);
}

.vip-rank-artwork {
    height: 260px;
    border: 1px solid rgba(37, 99, 235, 0.07);
    border-radius: 17px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.72),
        rgba(239, 246, 255, 0.68)
    );
}

.rank-glow {
    top: 25px;
    width: 175px;
    height: 175px;
}

.rank-wreath {
    top: 62px;
    width: 215px;
    height: 115px;
    border-right-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 8px;
}

.rank-emblem {
    top: 34px;
    width: 84px;
    height: 92px;
}

.rank-emblem::before {
    inset: 8px;
}

.rank-emblem span {
    font-size: 38px;
}

.rank-podium {
    bottom: 14px;
}

.podium-top {
    width: 50%;
    height: 38px;
}

.podium-middle {
    width: 68%;
    height: 44px;
    margin-top: -7px;
}

.podium-bottom {
    width: 86%;
    height: 50px;
    margin-top: -7px;
}

/* ---------- Selected level information ---------- */

.vip-level-details {
    position: relative;
    width: calc(100% - 16px);
    margin: 12px auto 0;
    padding: 16px;
    overflow: hidden;
    border-color: #d7eaf1;
    border-radius: 17px;
    background: linear-gradient(145deg, #f6fdff, #edf9fc);
    box-shadow: 0 7px 18px rgba(8, 82, 108, 0.06);
}

.vip-level-details::before {
    position: absolute;
    top: 13px;
    bottom: 13px;
    left: 0;
    width: 4px;
    border-radius: 0 5px 5px 0;
    background: linear-gradient(180deg, #2563eb, #06b6d4);
    content: "";
}

.vip-level-details-header {
    margin-bottom: 11px;
}

.vip-level-details-header h2 {
    font-size: 18px;
}

.vip-level-status {
    padding: 5px 9px;
    border: 1px solid rgba(228, 88, 80, 0.12);
    font-size: 9px;
    letter-spacing: 0.25px;
}

.vip-level-status.unlocked {
    border-color: rgba(7, 155, 112, 0.14);
}

.vip-level-information {
    gap: 6px;
}

.vip-level-information-row {
    align-items: center;
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
}

.vip-level-information-row span {
    font-size: 11px;
}

.vip-level-information-row strong {
    font-size: 12px;
}

.vip-level-benefit {
    margin-top: 10px;
    padding: 10px 8px 0;
    font-size: 11px;
    line-height: 1.45;
}

/* ---------- Action buttons ---------- */

.view-rules-button,
.continue-purchase-button {
    width: min(calc(100% - 16px), 440px);
    border-radius: 16px;
}

.view-rules-button {
    min-height: 50px;
    margin-top: 13px;
    font-size: 15px;
}

.continue-purchase-button {
    min-height: 56px;
    margin-top: 12px;
    font-size: 16px;
    box-shadow: 0 9px 20px rgba(37, 99, 235, 0.22);
}

/* ---------- VIP tasks ---------- */

.vip-tasks-section {
    width: min(100%, var(--vip-content-width));
    margin: 18px auto 0;
    padding: 18px;
    border-radius: 19px;
    box-shadow: 0 8px 22px rgba(30, 64, 175, 0.08);
}

.vip-tasks-header {
    gap: 12px;
}

.task-title {
    gap: 9px;
}

.task-title h2 {
    font-size: 19px;
}

.task-title span {
    font-size: 12px;
}

.reset-time {
    font-size: 11px;
}

.bonus-summary {
    margin-top: 14px;
    border-radius: 14px;
}

.bonus-item {
    min-height: 84px;
    padding: 12px;
}

.bonus-item span {
    font-size: 12px;
}

.bonus-item strong {
    margin-top: 5px;
    font-size: 23px;
}

.vip-task-list {
    gap: 9px;
    margin-top: 14px;
}

.vip-task-item {
    min-height: 70px;
    padding: 11px 13px;
    border-color: #e9f0f8;
    border-radius: 13px;
    background: linear-gradient(180deg, #fbfdff, #f5f8fc);
}

.task-information h3 {
    font-size: 15px;
}

.vip-task-item .task-information p {
    margin: 3px 0 4px;
    font-size: 10px;
    line-height: 1.3;
}

.task-information strong {
    font-size: 13px;
}

.task-action-button {
    min-width: 130px;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 12px;
}

/* ---------- Dark theme refinements ---------- */

html:is(.dark-theme, [data-marathon-theme="dark"]) .vip-tabs,
body.dark-theme .vip-tabs {
    border-color: #334155;
    background: rgba(15, 23, 42, 0.94);
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .vip-tab,
body.dark-theme .vip-tab {
    border-color: #334155;
    background: linear-gradient(180deg, #1e293b, #172033);
    color: #cbd5e1;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .vip-tab.active,
body.dark-theme .vip-tab.active {
    border-color: transparent;
    background: linear-gradient(145deg, #2563eb, #0891b2);
    color: #ffffff;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .vip-level-content,
body.dark-theme .vip-level-content {
    background-color: transparent !important;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .vip-rank-card,
body.dark-theme .vip-rank-card {
    border-color: #334155;
    background-image:
        radial-gradient(
            circle at 50% 28%,
            rgba(6, 182, 212, 0.16),
            transparent 35%
        ),
        linear-gradient(160deg, #1e293b, #111827);
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .vip-rank-artwork,
body.dark-theme .vip-rank-artwork {
    border-color: #334155;
    background: linear-gradient(
        180deg,
        rgba(30, 41, 59, 0.8),
        rgba(15, 23, 42, 0.74)
    );
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .vip-level-details,
body.dark-theme .vip-level-details {
    border-color: #334155;
    background: linear-gradient(145deg, #172a34, #13212b);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
    .vip-level-information-row,
body.dark-theme .vip-level-information-row {
    background: rgba(15, 23, 42, 0.5);
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .vip-task-item,
body.dark-theme .vip-task-item {
    border-color: #334155;
    background: linear-gradient(180deg, #1e293b, #172033);
}

/* ---------- Mobile ---------- */

@media (max-width: 440px) {
    .vip-hero {
        min-height: 324px;
        padding-bottom: 36px;
        border-radius: 0 0 27px 27px;
    }

    .vip-header {
        min-height: 64px;
        padding: 10px 13px;
    }

    .vip-header h1 {
        font-size: 22px;
    }

    .back-button {
        width: 38px;
        height: 38px;
        font-size: 19px;
    }

    .vip-decoration {
        top: 69px;
    }

    .vip-decoration > span {
        font-size: 68px;
    }

    .decoration-circle {
        width: 47px;
        height: 47px;
        font-size: 20px;
    }

    .vip-account-card {
        width: calc(100% - 26px);
        min-height: 132px;
        margin-top: 58px;
        padding: 17px 16px 21px;
        border-radius: 19px 19px 29px 29px;
    }

    .member-id,
    .current-vip-level {
        font-size: 15px;
    }

    .upgrade-information {
        margin-top: 20px;
    }

    .upgrade-text {
        font-size: 10px;
    }

    .vip-main {
        margin-top: -22px;
        padding: 0 12px 32px;
    }

    .vip-tabs {
        padding: 5px;
        gap: 4px;
        border-radius: 17px;
    }

    .vip-tab {
        min-height: 54px;
        padding: 6px 1px;
        gap: 4px;
        border-radius: 11px;
        font-size: 11px;
    }

    .vip-tab i {
        width: 16px;
        height: 16px;
        font-size: 7px;
    }

    .vip-level-content {
        margin-top: 12px;
    }

    .vip-rank-card {
        padding: 7px;
        border-radius: 18px;
    }

    .vip-rank-artwork {
        height: 228px;
        border-radius: 14px;
    }

    .rank-glow {
        top: 22px;
        width: 155px;
        height: 155px;
    }

    .rank-wreath {
        top: 54px;
        width: 190px;
        height: 104px;
        border-right-width: 7px;
        border-bottom-width: 7px;
        border-left-width: 7px;
    }

    .rank-emblem {
        top: 29px;
        width: 76px;
        height: 84px;
    }

    .rank-emblem span {
        font-size: 34px;
    }

    .rank-podium {
        bottom: 11px;
    }

    .podium-top {
        height: 34px;
    }

    .podium-middle {
        height: 39px;
        margin-top: -6px;
    }

    .podium-bottom {
        height: 44px;
        margin-top: -6px;
    }

    .vip-level-details {
        width: calc(100% - 10px);
        margin-top: 10px;
        padding: 13px;
        border-radius: 14px;
    }

    .vip-level-details-header h2 {
        font-size: 16px;
    }

    .view-rules-button,
    .continue-purchase-button {
        width: calc(100% - 10px);
    }

    .view-rules-button {
        min-height: 46px;
        margin-top: 11px;
        font-size: 14px;
    }

    .continue-purchase-button {
        min-height: 52px;
        margin-top: 10px;
        font-size: 15px;
    }

    .vip-tasks-section {
        margin-top: 15px;
        padding: 14px;
        border-radius: 16px;
    }

    .task-title h2 {
        font-size: 17px;
    }

    .bonus-summary {
        margin-top: 12px;
    }

    .bonus-item {
        min-height: 76px;
        padding: 10px 7px;
    }

    .bonus-item span {
        font-size: 10px;
    }

    .bonus-item strong {
        font-size: 20px;
    }

    .vip-task-item {
        min-height: 66px;
        padding: 10px 11px;
    }

    .task-action-button {
        min-width: 112px;
        min-height: 37px;
        padding: 7px 9px;
        font-size: 10px;
    }
}

/* ---------- Very small phones ---------- */

@media (max-width: 350px) {
    .vip-tab {
        min-height: 50px;
        font-size: 10px;
    }

    .vip-tab i {
        display: grid;
        width: 14px;
        height: 14px;
        font-size: 6px;
    }

    .vip-account-card {
        width: calc(100% - 20px);
    }

    .member-id,
    .current-vip-level {
        font-size: 14px;
    }

    .vip-tasks-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .task-action-button {
        min-width: 102px;
    }
}

/* ---------- Desktop presentation ---------- */

@media (min-width: 600px) {
    body {
        padding-block: 24px;
    }

    .vip-app {
        min-height: calc(100vh - 48px);
        border-radius: 26px;
        box-shadow: 0 20px 55px rgba(15, 23, 42, 0.16);
    }

    .vip-hero {
        border-radius: 26px 26px 34px 34px;
    }
}

/* ---------- Premium rank artwork details ---------- */

.vip-rank-card {
    position: relative;
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow:
        0 12px 28px rgba(30, 64, 175, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.vip-rank-card::before {
    position: absolute;
    inset: 0;
    z-index: 8;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.08);
    content: "";
    pointer-events: none;
}

.vip-rank-artwork {
    isolation: isolate;
    background-image:
        radial-gradient(
            circle at 50% 24%,
            rgba(255, 255, 255, 0.98) 0 8%,
            rgba(103, 232, 249, 0.23) 25%,
            transparent 47%
        ),
        linear-gradient(
            155deg,
            rgba(255, 255, 255, 0.92),
            rgba(224, 242, 254, 0.76) 55%,
            rgba(219, 234, 254, 0.9)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -18px 34px rgba(37, 99, 235, 0.05);
}

/* Decorative orbit behind the rank emblem. */
.vip-rank-artwork::before {
    position: absolute;
    top: 19px;
    left: 50%;
    z-index: 1;
    width: 190px;
    aspect-ratio: 1;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-top-color: rgba(6, 182, 212, 0.58);
    border-right-color: rgba(37, 99, 235, 0.34);
    border-radius: 50%;
    box-shadow:
        0 0 0 13px rgba(6, 182, 212, 0.035),
        0 0 32px rgba(6, 182, 212, 0.12);
    content: "";
    transform: translateX(-50%);
    animation: vip-rank-orbit 14s linear infinite;
}

/* Small premium label; the numeric level remains controlled by vip.js. */
.vip-rank-artwork::after {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 7;
    padding: 5px 9px;
    border: 1px solid rgba(37, 99, 235, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #39739d;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1px;
    content: "VIP RANK";
    box-shadow: 0 5px 13px rgba(30, 64, 175, 0.08);
    backdrop-filter: blur(7px);
}

.rank-glow {
    z-index: 0;
    background: radial-gradient(
        circle,
        rgba(103, 232, 249, 0.42),
        rgba(37, 99, 235, 0.1) 48%,
        transparent 72%
    );
    filter: blur(7px);
    animation: vip-rank-aura 3.8s ease-in-out infinite;
}

.rank-wreath {
    z-index: 2;
    border-right-color: #60a5fa;
    border-bottom-color: #67e8f9;
    border-left-color: #60a5fa;
    filter: drop-shadow(0 8px 10px rgba(37, 99, 235, 0.14));
}

.rank-wreath::before,
.rank-wreath::after {
    position: absolute;
    top: 43%;
    color: #38bdf8;
    font-size: 18px;
    line-height: 1;
    content: "✦";
    text-shadow: 0 0 12px rgba(6, 182, 212, 0.6);
    transform: translateY(-50%);
}

.rank-wreath::before {
    left: -19px;
}

.rank-wreath::after {
    right: -19px;
}

.rank-emblem {
    background: linear-gradient(
        145deg,
        #60a5fa,
        #ffffff 34%,
        #a5f3fc 64%,
        #2563eb
    );
    filter:
        drop-shadow(0 12px 13px rgba(37, 99, 235, 0.25))
        drop-shadow(0 0 16px rgba(103, 232, 249, 0.28));
    animation: vip-rank-float 3.8s ease-in-out infinite;
}

.rank-emblem::before {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.96),
        rgba(239, 246, 255, 0.78)
    );
    box-shadow: inset 0 0 16px rgba(37, 99, 235, 0.1);
}

.rank-emblem::after {
    position: absolute;
    bottom: 13px;
    left: 50%;
    z-index: 3;
    color: #0891b2;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 1.4px;
    content: "VIP";
    transform: translateX(-50%);
}

.rank-emblem span {
    color: #1d4ed8;
    text-shadow:
        0 2px 0 #ffffff,
        0 5px 12px rgba(37, 99, 235, 0.24);
    transform: translateY(-5px);
}

.rank-podium {
    filter: drop-shadow(0 12px 16px rgba(30, 64, 175, 0.13));
}

.rank-podium::before {
    position: absolute;
    right: 13%;
    bottom: -4px;
    left: 13%;
    z-index: -1;
    height: 18px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.18);
    content: "";
    filter: blur(10px);
}

.podium-tier {
    position: relative;
    overflow: hidden;
    border-color: rgba(37, 99, 235, 0.14);
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #dbeafe 50%,
        #b8dafb 100%
    );
    box-shadow:
        0 10px 18px rgba(37, 99, 235, 0.12),
        inset 0 2px 0 rgba(255, 255, 255, 0.96);
}

.podium-tier::before {
    position: absolute;
    top: 5px;
    right: 14%;
    left: 14%;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    content: "";
    filter: blur(1px);
}

.podium-tier::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20%;
    width: 18%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.46),
        transparent
    );
    content: "";
    transform: skewX(-22deg);
}

.podium-top {
    background: linear-gradient(180deg, #ffffff, #ccfbf1 52%, #a5f3fc);
}

@keyframes vip-rank-float {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-4px);
    }
}

@keyframes vip-rank-aura {
    0%,
    100% {
        opacity: 0.82;
        transform: translateX(-50%) scale(0.96);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.04);
    }
}

@keyframes vip-rank-orbit {
    from {
        transform: translateX(-50%) rotate(0deg);
    }

    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

html:is(.dark-theme, [data-marathon-theme="dark"])
    .vip-rank-artwork,
body.dark-theme .vip-rank-artwork {
    background-image:
        radial-gradient(
            circle at 50% 24%,
            rgba(34, 211, 238, 0.2),
            transparent 44%
        ),
        linear-gradient(155deg, #172033, #111c2c 58%, #0f172a);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -18px 34px rgba(2, 6, 23, 0.28);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
    .vip-rank-artwork::after,
body.dark-theme .vip-rank-artwork::after {
    border-color: #334155;
    background: rgba(15, 23, 42, 0.72);
    color: #7dd3fc;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .podium-tier,
body.dark-theme .podium-tier {
    border-color: #3b5268;
    background: linear-gradient(180deg, #38516b, #253c55 55%, #17283d);
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .podium-top,
body.dark-theme .podium-top {
    background: linear-gradient(180deg, #3e7181, #28566a 55%, #183b51);
}

@media (max-width: 440px) {
    .vip-rank-artwork::before {
        top: 17px;
        width: 160px;
        box-shadow:
            0 0 0 10px rgba(6, 182, 212, 0.035),
            0 0 26px rgba(6, 182, 212, 0.1);
    }

    .vip-rank-artwork::after {
        top: 9px;
        left: 9px;
        padding: 4px 7px;
        font-size: 7px;
    }

    .rank-wreath::before,
    .rank-wreath::after {
        font-size: 15px;
    }

    .rank-wreath::before {
        left: -16px;
    }

    .rank-wreath::after {
        right: -16px;
    }

    .rank-emblem::after {
        bottom: 11px;
        font-size: 6px;
    }
}

/* ---------- Keyboard and motion accessibility ---------- */

.vip-tab:focus-visible,
.view-rules-button:focus-visible,
.continue-purchase-button:focus-visible,
.task-action-button:focus-visible,
.back-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.34);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .rank-emblem,
    .rank-glow,
    .vip-rank-artwork::before {
        animation: none;
    }

    .vip-tab,
    .view-rules-button,
    .continue-purchase-button,
    .back-button {
        transition: none;
    }
}
