html {
    --f: #000;
    --accent: #f0b418;
    --tg-bottom-safe-padding: 0px;
    --tg-bottom-safe-padding: constant(safe-area-inset-bottom);
    --tg-bottom-safe-padding: env(safe-area-inset-bottom, 0px);
    --bottom-nav-height: 0px;
    --white-40: #FFFFFF66;
    --white-70: #FFFFFFB2;
    --white-10: #ffffff0a; /* #FFFFFF1A; */
    --white-5: #FFFFFF0D;
    --white: #fff;
    --tabbar: #0b0b0b;
    --tg-header-top-padding: 10px;
    --tg-header-top-padding: constant(safe-area-inset-top);
    --tg-header-top-padding: env(safe-area-inset-top, 10px);
    box-sizing: border-box;
    height: 100%;
    background-color: #0b0b0b;
    font-family: "Adelle Sans Global", "iQOO Type", sans-serif;
    -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
    font-family: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

button:focus,
button:focus-visible,
button:active {
    outline: none;
    box-shadow: none;
}

body {
    position: relative;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    min-width: 100%;
    /* overflow: hidden; */
    background-color: #0b0b0b;
    color: #fff;
}

.page-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(11, 11, 11, 0.72), rgba(11, 11, 11, 0.72)),
        url("data/back.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #0b0b0b;
    pointer-events: none;
}

.fixed-slot {
    flex: 0 0 auto;
    width: 100%;    
    height: 0;
    pointer-events: none;
    visibility: hidden;
}

.page-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    min-height: 0;
    /* overflow: hidden; */
}

.page-layers {
    flex: 1;
    min-height: 0;
}

.page-layer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* height: 100%; */
    min-height: 0;
    padding-bottom: calc(var(--bottom-nav-height) + 16px);
}

.page-layer[hidden] {
    display: none;
}

img {
    box-sizing: border-box;
    display: block;
    max-width: 100%;
}

.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    border-bottom-right-radius: 32px;
    border-bottom-left-radius: 32px;
    padding: calc(12px + var(--tg-header-top-padding)) 16px 12px;
    gap: 16px;
    border-bottom: 1px solid var(--white-5);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(30.5px);
    backdrop-filter: blur(30.5px);
    background-color: rgba(11, 11, 11, 0.7);
}

.page-header__logo {
    height: 24px;
    width: auto;
}

.page-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-section--fill {
    flex: 1;
    min-height: 0;
    /* overflow: hidden; */
}

.grand-cards {
    
    padding: 16px 12px !important;
    border-radius: 28px !important;
}
.grand-card {
    border-radius: 20px !important;
}
.section-title, .section-sub-title {
    margin: 0;
    color: var(--white);
    font-size: 24px;
    font-weight: 550;
    line-height: 1;
    z-index: 10;
}

.section-sub-title {
    font-size: 17px;

}

.panel {
    background-color: var(--white-10);
    border-top: 1px solid var(--white-40);
    border-bottom: 1px solid var(--white-40);
    border-radius: 28px;
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}

.placeholder-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 20px !important;
}

.placeholder-card__title {
    font-size: 18px;
    font-weight: 550;
    line-height: 1.2;
    color: var(--white);
}

.placeholder-card__text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--white-70);
}

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.leaderboard > .leaderboard-entry:first-child {
    box-shadow: 0px 0px 12px 0px #F1B419BF inset;
    border-width: 1px 0px 1px 0px !important;
    border-style: solid;
    border-color: var(--accent, #F0B418);


}
.leaderboard-entry {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 20px;
}

.own-leader-entry {
    border: 0.5px solid var(--white-10);
    gap: 8px;
}

.leaderboard-entry__place {
    align-self: flex-start;
    font-size: 18px;
    flex: 0 0 18px;
    font-weight: 550;
    line-height: 20px;
    color: #F0B418;
}

.leaderboard-entry__person {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    flex-direction: column;
}

.leaderboard-entry__hint {
    text-align: right;
    font-size: 18px;
    font-weight: 550;
    line-height: 1.2;
    color: var(--white-70);

    font-weight: 300;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: 0%;
}
.leaderboard-entry__hint__top {
    font-size: 14px;
    margin: auto 0;
}

.leaderboard-entry__name {
    font-size: 18px;
    font-weight: 550;
    line-height: 1.2;
    color: var(--white);
}
.market-list {
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex-wrap: wrap;
}
.market-entry {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
    border: 0.5px solid var(--white-10);
    background-color: var(--white-10);
    flex: 0 0 calc(50% - 8px);
    height: fit-content;
}

.market-entry.fat {
    flex: 0 0 100%;

}

.market-entry__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: cover;
    background: #00000040;
}

.market-entry__title {
    color: var(--white);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
}

.market-entry__quantity {
    color: var(--white-70);
    font-size: 12px;
    font-weight: 450;
    line-height: 1.2;
}
.market-entry__info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.market-entry__buy {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--f);
    font-size: 14px;
    font-weight: 600;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-category-nav {
    position: sticky;
    top: calc(var(--tg-header-top-padding) + 64px);
    z-index: 15;
    width: 100%;
}

.task-category-nav[hidden] {
    display: none;
}

.task-category-nav__items {
    position: relative;
    display: flex;
    width: 100%;
    gap: 10px;
    padding: 4px;
    border: 0.5px solid var(--white-40);
    border-radius: 1000px;
    background-color: rgba(255, 255, 255, 0.10);
    -webkit-backdrop-filter: blur(30.5px);
    backdrop-filter: blur(30.5px);
}

.task-category-nav__indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: 0;
    border-radius: 1000px;
    background-color: var(--white-10);
    transition:
        transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
        width 260ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 180ms ease;
    pointer-events: none;
}

.task-category-nav__item {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 0;
    min-height: 36px;
    border: 0;
    border-radius: 1000px;
    padding: 7px 10px;
    background: transparent;
    color: var(--white-70);
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-category-nav__item--selected {
    color: var(--white);
}

.task-entry {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 20px;
    border: 0.5px solid var(--white-10);
}

.task-entry__title {
    color: var(--white);
    font-size: 18px;
    font-weight: 650;
    line-height: 1.2;
}

.task-entry__hashtag {
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.task-entry__description {
    color: var(--white-70);
    font-size: 14px;
    font-weight: 450;
    line-height: 1.35;
}

.task-entry__rules {
    min-height: 42px;
    border: 0.5px solid var(--white-10);
    border-radius: 18px;
    background: var(--white-10);
    color: var(--white);
    font-size: 15px;
    font-weight: 650;
}

.task-entry__rules--completed {
    border-color: rgba(240, 180, 24, 0.48);
    background: var(--accent);
    color: var(--f);
}

.market-purchase-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.62);
}

.market-purchase-modal--open {
    display: flex;
}

.market-purchase-modal__card {
    width: min(340px, 100%);
    padding: 16px;
    border: 1px solid var(--white-10);
    border-radius: 24px;
    background: #111;
    color: var(--white);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}

.market-purchase-modal__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.market-purchase-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.market-purchase-modal__actions--single {
    grid-template-columns: 1fr;
}

.market-purchase-modal__text {
    margin-top: 8px;
    color: var(--white-70);
    font-size: 15px;
    line-height: 1.35;
}

.market-purchase-modal__button {
    min-height: 42px;
    border: 1px solid var(--white-40);
    border-radius: 16px;
    background: var(--white-10);
    color: var(--white);
    font-size: 16px;
    font-weight: 650;
}

.market-purchase-modal__button--accent {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--f);
}

.streak-reward-modal__card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
    text-align: center;
    background: #111;
    background:
        radial-gradient(circle at 50% 0%, rgba(240, 180, 24, 0.26), transparent 46%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(17, 17, 17, 0.92)),
        #111;
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}

.streak-reward-modal__group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.streak-reward-modal__gift {
    width: 116px;
    height: 116px;
    object-fit: contain;
}

.streak-reward-modal__points {
    color: var(--accent);
    font-size: 24px;
    font-weight: 750;
    line-height: 1;
}

.streak-reward-modal__title {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.streak-reward-modal__text {
    margin-top: 0;
    color: #FFFFFFB2;
    font-size: 14px;
    line-height: 1.3;
}

.streak-reward-modal__actions {
    margin-top: 0;
}

.referral-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 16px;
    border: 0.5px solid var(--white-10);
}

.giveaway-progress__title {
    font-size: 14px;
    line-height: 1.15;
}

.giveaway-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 35px;
    align-items: center;
    gap: 18px;
}

.giveaway-progress__bar {
    position: relative;
    height: 35px;
    min-width: 0;
    overflow: hidden;
    border-radius: 999px;
    background-color: #303030;
}

.giveaway-progress__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    min-width: 35px;
    border-radius: inherit;
    background-color: var(--accent);
    transition: width 220ms ease;
}

.giveaway-progress__fill--empty {
    min-width: 0;
}

.giveaway-progress__value {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.giveaway-progress__gift {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.referral-card__url {
    padding: 12px 16px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 300;
    color: var(--white);
    background-color: var(--white-10);
    -webkit-backdrop-filter: blur(30.5px);
    backdrop-filter: blur(30.5px);
    overflow-wrap: anywhere;
}

.referral-card__actions {
    display: flex;
    gap: 8px;
}

.action-button {
    border: 0;
    border-radius: 20px;
    background-color: var(--accent);
    color: var(--f);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    z-index: 10;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}

.action-button--primary {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
}

.action-button--icon {
    flex: 0 0 auto;
    width: 48px;
    min-width: 48px;
}

.result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 12px;
    border-radius: 16px;
}

.result-card__label {
    font-size: 14px;
    font-weight: 300;
    line-height: 1;
    color: var(--white);
}

.result-card__value {
    font-size: 20px;
    font-weight: 550;
    line-height: 1;
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 16px;
}

.stat-card__value {
    font-size: 20px;
    font-weight: 550;
    line-height: 1;
    color: var(--white);
}

.stat-card__label {
    font-size: 12px;
    line-height: 1.25;
    color: var(--white-70);
}

.referrals-list {
    display: flex;
    flex: 1;
    min-height: 0;
    /* padding-bottom: calc(var(--bottom-nav-height) + 16px);
    overflow: auto; */
    flex-direction: column;
    gap: 10px;
}

.referral-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 20px;
    padding: 12px 16px;
}

.referral-item__info {
    min-width: 0;
}

.referral-item__name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--white);
}

.referral-item__date {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.2;
    color: var(--white-70);
}

.referral-item__status {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.2;
    color: var(--white-70);
}

.referral-item__status--accent {
    color: var(--white);
    font-weight: 600;
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    /* border-top: 1px solid var(--white-40); */
    color: #fff;
    width: 100%;
    border-radius: 32px 32px 0 0;
    height: fit-content;
    padding: 12px 16px calc(24px + var(--tg-bottom-safe-padding)) 16px;
    box-sizing: border-box;
    /* -webkit-backdrop-filter: blur(30.5px);
    backdrop-filter: blur(30.5px);
    background-color: rgba(11, 11, 11, 0.7); */
}

.bottom-nav__items {
    position: relative;
    width: 100%;
    height: fit-content;
    border: 0.5px solid var(--white-10);
    -webkit-backdrop-filter: blur(30.5px);
    backdrop-filter: blur(30.5px);
    background-color: var(--white-10);
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    border-radius: 1000px;
    padding: 4px;
    gap: 10px;
}

.bottom-nav__indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: -1px;
    width: 0;
    border-radius: 1000px;
    background-color: var(--white-10);
    /* box-shadow: 0 8px 24px rgba(240, 179, 24, 0.062); */
    transition:
        transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
        width 260ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 180ms ease;
    pointer-events: none;
}
.grand-cards > .grand-card:nth-child(1) {
    border-color: var(--accent, #F0B418);
    box-shadow: 0px 0px 12px 0px #F1B419BF inset;

}
.bottom-nav__item {
    position: relative;
    z-index: 1;
    border: 0;
    background-color: transparent;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    justify-content: center;
    padding: 7px 8px;
    gap: 1px;
    font-size: 12px;
    font-weight: 300;
    cursor: pointer;
}

.bottom-nav__icon {
    width: 24px;
    height: 24px;
}

.bottom-nav__item--selected {
    /* background: var(--white-10); */
    border-radius: 1000px;
    color: inherit;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .page-header,
    .bottom-nav {
        background-color: rgba(11, 11, 11, 0.92);
    }

    .panel,
    .referral-card__url,
    .bottom-nav__items {
        background-color: rgba(23, 23, 23, 0.96);
    }
}

@media (min-width: 640px) {
    .page-layer, .bottom-nav, .page-header {
        max-width: 400px;
        margin: 0 auto;
    }
    .bottom-nav {
        padding: 12px 16px;
        background-color: #00000000;
        -webkit-backdrop-filter: unset;
        backdrop-filter: unset;
        border-top: unset;
    }
}
