:root {
    --bg: #0f1623;
    --text: #e7eefc;
    --accent: #8fe388;
    --accent-dark: #5ac06a;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.header-rewards {
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid #223150;
    padding: 4px 0 12px;
    margin-bottom: 16px;
}

.tabs {
    display: flex;
    gap: 14px;
    background: rgba(18, 18, 22, .35);
    padding: 6px;
    border-radius: 16px;
}

.tab {
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 18px;
    color: #9fb2d1;
    background: transparent;
    border: 0;
    cursor: pointer;
    align-items: center;
    display: flex;

    img {
        width: auto;
        height: auto;
        object-fit: contain;
        margin-right: 5px;
    }

    &:hover {
        background: rgba(255, 255, 255, .06);
    }
}

.tab.active {
    background: #223150;
    color: var(--text);
}

.tab-panel {
    display: block;
}

.tab-panel[hidden] {
    display: none !important;
}

.top-rewards-pass {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;

    .card-rewards-pass {
        border-radius: 14px;
        gap: 10px;
        display: grid;

        .profile-rewards-pass {
            display: grid;
            grid-template-columns: 88px 1fr;
            gap: 14px;
            align-items: center;
            padding: 10px;
            border: 2px solid rgba(255, 255, 255, .10);
            border-radius: 14px;

            .avatar-rewards-pass {
                width: 80px;
                height: 80px;
                border-radius: 12px;
                background: linear-gradient(145deg, #2a395a, #16243d);
                display: grid;
                place-items: center;
                border: 1px solid #2b3a5e;
                position: relative;
                overflow: hidden;

                img {
                    width: 120px;
                    height: 100%;
                    object-fit: cover;
                    border-radius: 12px;
                    top: -26px;
                    position: relative;
                    left: -23px;
                }
            }

            .wins-rewards-pass {
                display: grid;
                height: 100%;
                align-content: center;
                gap: 10px;

                .wins-text-rewards-pass {
                    font-weight: 800;
                    font-size: 20px;
                }

                .badges-rewards-pass {
                    display: flex;
                    gap: 8px;

                    .badge-rewards-pass {
                        min-width: 26px;
                        height: 26px;
                        border-radius: 999px;
                        background: #24324a;
                        display: grid;
                        place-items: center;
                        font-weight: 800;
                        font-size: 14px;
                        color: #b8c9e8;
                        border: 1px solid #314265;
                    }

                    .progress-rewards-pass {
                        --track: #133c25;
                        --border: #1d5f3a;
                        --fill: var(--accent, #8fe388);

                        display: inline-grid;
                        align-items: center;
                        height: 28px;
                        padding: 0 12px;
                        border-radius: 999px;
                        border: 1px solid var(--border);
                        background: rgba(18, 18, 22, .35);
                        position: relative;
                        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
                        z-index: 20;
                        width: 160px;

                        &:before {
                            content: "";
                            position: absolute;
                            inset: 0;
                            border-radius: inherit;
                            background: linear-gradient(to right, #4caf50, #f0c85a);
                            width: calc((var(--value) / var(--max)) * 100%);
                            z-index: 0;
                            opacity: .70;
                        }

                        &:after {
                            content: "";
                            position: absolute;
                            inset: 1px;
                            border-radius: inherit;
                            background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0));
                            pointer-events: none;
                        }

                        .progress-text-rewards-pass {
                            z-index: 100;
                            color: #FFFFFF;
                            font-weight: 800;
                            font-size: 15px;
                            line-height: 1;
                            letter-spacing: 1px;
                            white-space: nowrap;
                            text-shadow: 0 1px 0 rgba(0, 0, 0, .45), 0 0 3px rgba(0, 0, 0, .35);
                        }
                    }
                }
            }
        }

        .info-with-button-rewards-pass {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            margin-top: 10px;

            .info-rewards-pass {
                border: 2px solid #1b4a7f;
                border-radius: 12px;
                padding: 10px;
                color: #d6e8ff;
                font-size: 14px;
                line-height: 1.4;
                -webkit-backdrop-filter: blur(12px) saturate(160%);
                overflow: visible;
                isolation: isolate;

                &:before {
                    content: "";
                    position: absolute;
                    inset: 0;
                    border-radius: inherit;
                    background: linear-gradient(to bottom right, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 45%);
                    pointer-events: none;
                    z-index: 0;
                }

                .b {
                    color: #8fe388;
                    font-weight: 800;
                }
            }

            .btn-reward-claim {
                display: block;
                padding: 10px;
                margin: 10px 0;
                font-size: 15px;
                font-weight: bold;
                border-radius: 8px;
                background: var(--button-secondary);
                border: none;
                color: white;
                cursor: pointer;
                width: 20%;

                &:hover {
                    opacity: 0.9;
                }
            }
        }
    }

    .lot-rewards-pass {
        display: grid;
        gap: 10px;
        padding: 14px;
        place-items: center;
        height: 100%;
        border: 2px solid var(--color-green);
        border-radius: 14px;
        -webkit-backdrop-filter: blur(12px) saturate(160%);
        overflow: visible;
        isolation: isolate;
        position: relative;

        .image-lot-rewards-pass {
            max-width: 180px;
            max-height: 180px;
            border-radius: 16px;

            img {
                width: auto;
                height: auto;
                object-fit: cover;
                image-rendering: pixelated;
            }
        }

        .desc-lot-rewards-pass {
            background: var(--accent);
            color: #FFFFFF;
            padding: 10px 16px;
            font-weight: 600;
            border-radius: 999px;
            border: 1px solid var(--accent-dark);
            width: 100%;
            text-align: center;
            font-size: 18px;
        }

        .vip-tag-vitrine {
            position: absolute;
            top: -2px;
            left: -2px;
            background: #17243b;
            color: #FFFFFF;
            font-size: 18px;
            font-weight: 600;
            border: 2px solid var(--button-secondary);
            border-radius: 6px 0 6px 0;
            padding: 2px;
            letter-spacing: 1px;
            width: 36px;
            height: 30px;
        }
    }
}

.tracks-rewards-pass {
    margin-top: 16px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, .10);
    padding: 12px;

    .tracks-grid-rewards-pass {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 80px;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 6px;

        .tracks-col-rewards-pass {
            display: grid;
            grid-template-rows: 1fr auto 1fr;
            align-items: stretch;
            gap: 8px;

            .tracks-free-rewards-pass {
                border: 2px solid var(--color-green);
                border-radius: 12px;
                min-height: 54px;
                display: grid;
                place-items: center;
                position: relative;
                overflow: hidden;

                .tracks-image-rewards-pass {
                    width: 40px;
                    height: 40px;
                    border-radius: 10px;
                    display: grid;
                    place-items: center;

                    img {
                        width: auto;
                        height: auto;
                        object-fit: cover;
                        max-width: 40px;
                        max-height: 40px;
                    }
                }
            }

            .tracks-lvl-rewards-pass {
                border: 2px solid var(--color-blue);
                border-radius: 12px;
                min-height: 24px;
                display: grid;
                place-items: center;
                position: relative;
                max-width: 30%;
                left: 35%;
            }

            .tracks-vip-rewards-pass {
                border: 2px solid var(--button-secondary);
                border-radius: 12px;
                min-height: 54px;
                display: grid;
                place-items: center;
                position: relative;
                overflow: hidden;

                .tracks-image-rewards-pass {
                    width: 40px;
                    height: 40px;
                    border-radius: 10px;
                    display: grid;
                    place-items: center;

                    img {
                        width: auto;
                        height: auto;
                        object-fit: cover;
                        max-width: 40px;
                        max-height: 40px;
                    }
                }

                .vip-tag {
                    position: absolute;
                    top: -1px;
                    left: -1%;
                    background: #17243b;
                    color: #FFFFFF;
                    font-size: 11px;
                    font-weight: 600;
                    border: 2px solid var(--button-secondary);
                    border-radius: 6px 0px 6px 0px;
                    padding: 2px;
                    letter-spacing: 1px;
                }
            }

            &:hover {
                opacity: 0.4;
                cursor: pointer;
            }
        }

        .tracks-col-rewards-pass-obtain {
            opacity: 0.6;
        }
    }
}

.tracks-col-rewards-pass-obtain.newly-obtained {
    animation: pop-reward 0.45s ease-out;
    position: relative;
}

@keyframes pop-reward {
    0% {
        transform: scale(0.85);
        filter: brightness(1.3);
    }
    60% {
        transform: scale(1.1);
        filter: brightness(1.6);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}


.tracks-is-locked::after {
    content: "🔒";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(10, 15, 28, .72);
    border-radius: inherit;
    font-size: 16px;
}

.rewards-quests-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;

    .rewards-quest-filters {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;

        .rewards-quest-filter-btn {
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid #273a62;
            background: rgba(18, 18, 22, .35);
            color: #FFFFFF;
            font-size: 16px;
            cursor: pointer;

            &:hover {
                opacity: 0.5;
            }
        }

        .rewards-quest-filter-btn.is-active {
            background: var(--accent, #8fe388);
            border-color: var(--accent-dark, #5ac06a);

            &:hover {
                opacity: 0.5;
            }
        }
    }
}

.rewards-quests-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(1, minmax(260px, 1fr));

    .rewards-quest-card {
        background: #0f192b;
        border: 1px solid #223150;
        border-radius: 12px;
        padding: 12px;
        position: relative;
        overflow: hidden;

        .rewards-quest-top {
            display: flex;
            gap: 12px;
            align-items: center;

            .rewards-quest-icon {
                width: 50px;
                height: 50px;
                border-radius: 10px;
                display: grid;
                place-items: center;
                font-size: 18px;
                background: linear-gradient(180deg, #2b3b5c, #18243d);
                flex: 0 0 auto;

                img {
                    width: auto;
                    height: auto;
                    object-fit: cover;
                    max-width: 40px;
                    max-height: 40px;
                }
            }

            .rewards-quest-text {
                margin: 0;
                font-size: 16px;
                color: #9fb2d1;
            }

            .rewards-quest-badges {
                margin-left: auto;
                display: flex;
                gap: 6px;
                flex-wrap: wrap;

                .rewards-quest-badges-time {
                    background: #17243b;
                    color: #cfe0ff;
                    border: 1px solid #233358;
                    border-radius: 999px;
                    padding: 4px;
                    font-size: 14px;
                    font-weight: 800;
                    display: flex;

                    &:before {
                        content: '';
                        width: 18px;
                        height: 18px;
                        background-image: url(/assets/img/icon/icon_time.png);
                        background-size: contain;
                        background-repeat: no-repeat;
                        background-position: center;
                        margin-right: 4px;
                    }
                }

                .rewards-quest-badges-winwins {
                    background: #13213b;
                    border: 1px solid #273a62;
                    color: #cfe0ff;
                    border-radius: 999px;
                    padding: 4px;
                    font-size: 14px;
                    font-weight: 800;
                    display: flex;

                    &:before {
                        content: '';
                        width: 18px;
                        height: 18px;
                        background-image: url(/assets/img/center/money/icon_winwin.png);
                        background-size: contain;
                        background-repeat: no-repeat;
                        background-position: center;
                        margin-right: 4px;
                        image-rendering: pixelated;
                    }
                }
            }
        }

        .rewards-quest-progress-row {
            display: flex;
            align-items: center;
            gap: 8px;

            .rewards-quest-progress {
                position: relative;
                height: 10px;
                flex: 1;
                background: #0f1628;
                border: 1px solid #223150;
                border-radius: 999px;
                overflow: hidden;

                .rewards-quest-progress-fill {
                    position: absolute;
                    inset: 0 auto 0 0;
                    width: calc((var(--value) / var(--max)) * 100%);
                    background: var(--accent, #8fe388);
                    transition: width .25s ease;
                }
            }

            .rewards-quest-progress-label {
                font-size: 14px;
                color: #b9c8e2;
                background: #13213b;
                border: 1px solid #273a62;
                border-radius: 999px;
                padding: 4px;
                display: flex;
            }
        }
    }
}

.rewards-quest-card.is-locked {
    opacity: 0.5;
    user-select: none;

    &:after {
        content: "🔒";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 30px;
        border-radius: 6px;
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        line-height: 0;
        background: none;
        pointer-events: none;
    }
}

.rewards-calendar {
    padding: 6px;
    position: relative;

    .rewards-calendar-title-content {
        text-align: center;
    }

    .rewards-calendar-icon-content {
        z-index:2;
    }

    .rewards-calendar-icon-badge {
        position: absolute;
        top: 44%;
    }

    .rewards-calendar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
        gap: 20px;

        .rewards-calendar-header-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: grid;
            place-items: center;
            background-image: url(/assets/img/prestige/marion_citybox_Autonme2025_icon.png);
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }

        .rewards-calendar-header-right {
            display: block;
            align-items: center;
            margin-right: auto;

            .rewards-calendar-header-title {
                margin: 0 0 4px;
                font-size: 18px;
                font-weight: 700;
            }

            .rewards-calendar-header-subtitle {
                font-size: 14px;
                color: #9fb2d1;
            }
        }
    }

    .rewards-calendar-arrow {
        position: absolute;
        top: 59%;
        transform: translateY(-50%);
        width: 40px;
        height: 250px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--button-secondary);
        border-radius: .5rem;
        cursor: pointer;
        transition: background 0.2s;
        z-index: 5;
        opacity: .7;

        &:hover {
            opacity: .9;
        }

        img {
            width: 20px;
            height: 20px;
            pointer-events: none;
        }
    }

    .rewards-calendar-arrow.rewards-calendar-left {
        left: 5px;
    }

    .rewards-calendar-arrow.rewards-calendar-right {
        right: 5px;
    }

    .rewards-calendar-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 120px;
        gap: 8px;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        width: 87%;
        margin: auto;

        .rewards-calendar-day {
            position: relative;
            overflow: hidden;
            background: var(--button-secondary);
            border: 1px solid #223150;
            border-radius: 10px;
            height: 250px;
            width: 120px;
            padding: 8px 6px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            color: #e7eefc;
            user-select: none;

            .rewards-calendar-day-text {
                position: absolute;
                color: #FFF;
                background: #F2A40F;
                z-index: 1;
                width: 100%;
                height: 10%;
                top: 0;
                text-align: center;
                align-content: center;
                box-shadow: var(--shadow);
                font-size: 20px;
                font-weight: 600;
            }

            .rewards-calendar-img {
                width: 60px;
                height: 60px;
                object-fit: cover;
                background: rgba(18, 18, 22, .35);
                border-radius: 50%;
                top: 40%;
                position: relative;
                align-content: center;
                text-align: center;

                img {
                    width: auto;
                    height: auto;
                    object-fit: cover;
                    max-width: 50px;
                    max-height: 50px;
                }

                &:before {
                    content: "";
                    position: absolute;
                    inset: 0;
                    border-radius: inherit;
                    background: linear-gradient(to bottom right, rgba(255, 255, 255, .40), rgba(255, 255, 255, 0) 45%);
                    pointer-events: none;
                    z-index: 2;
                }
            }

            .rewards-calendar-img.noclaimed {
                opacity: 0.5;
                width: 60px;
                height: 60px;
                object-fit: cover;
                background: rgba(18, 18, 22, .35);
                border-radius: 50%;
                top: 40%;
                position: relative;
                align-content: center;
                text-align: center;

                img {
                    width: auto;
                    height: auto;
                    object-fit: cover;
                    max-width: 50px;
                    max-height: 50px;
                }

                &:before {
                    content: "";
                    position: absolute;
                    inset: 0;
                    border-radius: inherit;
                    background: linear-gradient(to bottom right, rgba(255, 255, 255, .40), rgba(255, 255, 255, 0) 45%);
                    pointer-events: none;
                    z-index: 2;
                }
            }

            .rewards-calendar-day-action {
                position: absolute;
                color: #FFF;
                background: #F2A40F;
                z-index: 1;
                width: 100%;
                height: 10%;
                bottom: 0;
                text-align: center;
                align-content: center;
                box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
                font-size: 20px;
                font-weight: 600;
            }

            .rewards-calendar-day-action-claim {
                position: absolute;
                color: #FFF;
                background: var(--accent-dark);
                z-index: 1;
                width: 100%;
                height: 10%;
                bottom: 0;
                text-align: center;
                align-content: center;
                box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
                font-size: 20px;
                font-weight: 600;

                &:hover {
                    background: var(--accent);
                    cursor: pointer;
                    filter: brightness(1.02);
                }
            }
        }

        .rewards-calendar-day.next-day {
            position: relative;
            overflow: hidden;
            background: var(--button-secondary);
            border: 1px solid #223150;
            border-radius: 10px;
            height: 250px;
            width: 120px;
            padding: 8px 6px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            color: #e7eefc;
            user-select: none;

            .rewards-calendar-day-text {
                position: absolute;
                color: #FFF;
                background: #F2A40F;
                z-index: 1;
                width: 100%;
                height: 10%;
                top: 0;
                text-align: center;
                align-content: center;
                box-shadow: var(--shadow);
                font-size: 20px;
                font-weight: 600;
            }

            .rewards-calendar-img {
                width: 60px;
                height: 60px;
                object-fit: cover;
                background: rgba(18, 18, 22, .35);
                border-radius: 50%;
                top: 40%;
                position: relative;
                align-content: center;
                text-align: center;

                img {
                    width: auto;
                    height: auto;
                    object-fit: cover;
                    max-width: 50px;
                    max-height: 50px;
                }

                &:before {
                    content: "";
                    position: absolute;
                    inset: 0;
                    border-radius: inherit;
                    background: linear-gradient(to bottom right, rgba(255, 255, 255, .40), rgba(255, 255, 255, 0) 45%);
                    pointer-events: none;
                    z-index: 2;
                }
            }

            .rewards-calendar-day-action-claim {
                position: absolute;
                color: #FFF;
                background: var(--accent-dark);
                z-index: 1;
                width: 100%;
                height: 10%;
                bottom: 0;
                text-align: center;
                align-content: center;
                box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
                font-size: 20px;
                font-weight: 600;
                display: none;

                &:hover {
                    background: var(--accent);
                    cursor: pointer;
                    filter: brightness(1.02);
                }
            }
        }
    }
}

.rewards-calendar .rewards-calendar-grid::-webkit-scrollbar {
    display: none;
}