.rewards-header h2,
.rewards-intro h1 {
    font-family: var(--title-font);
    background: linear-gradient(45deg, #fff, #e0aaff);
    -webkit-text-fill-color: transparent
}

.recent-rewards h2,
.rewards-header h2,
.rewards-intro h1 {
    -webkit-text-fill-color: transparent
}

.claim-button,
.modal-button,
.modal-close {
    cursor: pointer;
    min-height: 44px
}

.rewards-intro {
    max-width: 800px;
    margin-bottom: 2rem
}

.rewards-intro h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    -webkit-background-clip: text;
    background-clip: text
}

.rewards-intro p {
    font-family: var(--subtitle-font);
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc
}

.rewards-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-bottom: 3rem
}

.rewards-calendar,
.rewards-header {
    margin-bottom: 2rem
}

.rewards-card {
    background: rgba(20, 10, 30, .8);
    border-radius: 15px;
    border: 1px solid rgba(157, 78, 221, .5);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3)
}

.calendar-day,
.streak-counter {
    font-family: var(--subtitle-font);
    background: rgba(157, 78, 221, .1)
}

.rewards-header,
.rewards-info h3 {
    border-bottom: 1px solid rgba(157, 78, 221, .3)
}

.rewards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem
}

.rewards-header h2 {
    font-size: 1.5rem;
    -webkit-background-clip: text;
    background-clip: text
}

.streak-counter {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(157, 78, 221, .3)
}

.streak-days,
.streak-label {
    color: #ccc
}

.streak-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e0aaff
}

.calendar-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px
}

.calendar-day {
    position: relative;
    border-radius: 10px;
    padding: 1rem .5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: .3s;
    aspect-ratio: 1
}

.claim-button,
.special-marker {
    background: linear-gradient(45deg, #9d4edd, #c77dff)
}

.calendar-day:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(157, 78, 221, .3)
}

.calendar-day.active {
    border: 2px solid #e0aaff;
    background: rgba(157, 78, 221, .2)
}

.calendar-day.claimed {
    background: rgba(157, 78, 221, .3)
}

.calendar-day.special {
    background: linear-gradient(135deg, rgba(157, 78, 221, .2), rgba(199, 125, 255, .3));
    border: 1px solid rgba(199, 125, 255, .5)
}

.day-number {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .3rem;
    color: #fff
}

.reward-amount {
    font-size: .9rem;
    color: #e0aaff;
    font-weight: 500
}

.day-status {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 15px;
    height: 15px;
    border-radius: 50%
}

.calendar-day.claimed .day-status {
    background: #64dd17
}

.calendar-day.active .day-status {
    background: #e0aaff;
    animation: 1.5s infinite pulse
}

.special-marker {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap
}

.rewards-status {
    display: flex;
    flex-direction: column;
    gap: 1.5rem
}

.time-remaining {
    font-family: var(--subtitle-font);
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #ccc;
    font-size: 1rem
}

.time-remaining .material-icons {
    color: #e0aaff
}

.claim-status {
    display: flex;
    flex-direction: column;
    gap: 1rem
}

.claim-message {
    font-family: var(--title-font);
    color: #ccc;
    text-align: center
}

.claim-button {
    font-family: var(--subtitle-font);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1rem;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    transition: .3s;
    width: 100%
}

.balance-amount,
.claimed-amount,
.streak-count {
    font-weight: 700;
    color: #e0aaff
}

.claim-button:hover:not(:disabled),
.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(157, 78, 221, .5)
}

.claim-button:disabled {
    background: #4a4a6a;
    cursor: not-allowed;
    opacity: .7
}

.claim-button:focus,
.modal-button:focus,
.modal-close:focus {
    outline-offset: 2px
}

.rewards-info {
    background: rgba(20, 10, 30, .8);
    border-radius: 15px;
    border: 1px solid rgba(157, 78, 221, .5);
    padding: 2rem
}

.rewards-info h3 {
    font-family: var(--title-font);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #e0aaff;
    padding-bottom: .8rem
}

.rewards-info ul {
    list-style: none;
    padding: 0
}

.rewards-info ul li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start
}

.rewards-info ul li .material-icons {
    color: #e0aaff;
    font-size: 1.5rem
}

.rewards-info ul li strong {
    font-family: var(--title-font);
    color: #e0aaff;
    display: block;
    margin-bottom: .3rem
}

.rewards-info ul li div {
    font-family: var(--subtitle-font);
    color: #ccc;
    line-height: 1.4
}

.recent-rewards {
    margin-top: 2rem
}

.recent-rewards h2 {
    font-family: var(--title-font);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #fff, #e0aaff);
    -webkit-background-clip: text;
    background-clip: text
}

.transactions-container {
    font-family: var(--subtitle-font);
    background: rgba(20, 10, 30, .8);
    border-radius: 15px;
    border: 1px solid rgba(157, 78, 221, .5);
    padding: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
}

.transactions-table {
    width: 100%;
    border-collapse: collapse
}

.transactions-table td,
.transactions-table th {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(157, 78, 221, .2)
}

.transactions-table th {
    color: #e0aaff;
    font-weight: 600
}

.transactions-table tr:last-child td {
    border-bottom: none
}

.loading-transactions {
    text-align: center;
    color: #ccc;
    padding: 2rem 0
}

.reward-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: .3s
}

.fl-token,
.modal-close {
    justify-content: center;
    display: flex
}

.reward-modal.active {
    opacity: 1;
    visibility: visible
}

.reward-modal-content {
    position: relative;
    background: rgba(20, 10, 30, .95);
    border-radius: 20px;
    border: 2px solid rgba(157, 78, 221, .8);
    padding: 2.5rem;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 0 50px rgba(157, 78, 221, .5);
    transform: translateY(30px);
    transition: transform .5s cubic-bezier(.18, .89, .32, 1.28)
}

.fl-token,
.modal-close,
.sparkle {
    border-radius: 50%
}

.reward-modal.active .reward-modal-content {
    transform: translateY(0)
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(157, 78, 221, .3);
    align-items: center;
    transition: background .3s;
    min-width: 44px
}

.modal-close:hover {
    background: rgba(157, 78, 221, .5)
}

.modal-close .material-icons {
    font-size: 20px;
    color: #fff
}

.reward-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem
}

.fl-token,
.sparkles {
    width: 100%;
    height: 100%;
    position: absolute
}

.new-balance,
.reward-message {
    margin-bottom: 1.5rem
}

.fl-token {
    background: linear-gradient(45deg, #9d4edd, #c77dff);
    align-items: center;
    color: #fff;
    font-size: 3rem;
    font-weight: 700;
    box-shadow: 0 0 30px rgba(157, 78, 221, .8);
    animation: 2s infinite pulse
}

.sparkles {
    top: 0;
    left: 0
}

.sparkle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #e0aaff;
    opacity: 0
}

.sparkle.s1 {
    top: 0;
    left: 50%;
    animation: 2s .1s infinite sparkle
}

.sparkle.s2 {
    top: 50%;
    right: 0;
    animation: 2s .3s infinite sparkle
}

.sparkle.s3 {
    bottom: 0;
    left: 50%;
    animation: 2s .5s infinite sparkle
}

.sparkle.s4 {
    top: 50%;
    left: 0;
    animation: 2s .7s infinite sparkle
}

.sparkle.s5 {
    top: 25%;
    left: 25%;
    animation: 2s .9s infinite sparkle
}

.reward-message h3 {
    font-size: 1.8rem;
    margin-bottom: .5rem;
    color: #e0aaff
}

.reward-message p {
    color: #ccc;
    margin-bottom: .5rem
}

.claimed-amount {
    font-size: 1.2rem
}

.streak-message {
    font-size: .9rem
}

.new-balance {
    background: rgba(157, 78, 221, .2);
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    gap: .5rem
}

.modal-button {
    background: linear-gradient(45deg, #9d4edd, #c77dff);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: .3s
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(224, 170, 255, .7)
    }

    70% {
        box-shadow: 0 0 0 10px rgba(224, 170, 255, 0)
    }

    100% {
        box-shadow: 0 0 0 0 rgba(224, 170, 255, 0)
    }
}

@keyframes sparkle {

    0%,
    100%,
    50% {
        transform: scale(0);
        opacity: 0
    }

    20% {
        transform: scale(1);
        opacity: 1
    }
}

@media (max-width:1200px) {
    .rewards-container {
        grid-template-columns: 1fr 300px;
        gap: 1.5rem
    }

    .rewards-info ul li {
        gap: .8rem
    }
}

@media (max-width:992px) {
    .rewards-container {
        grid-template-columns: 1fr;
        gap: 2rem
    }

    .rewards-info {
        order: 1
    }

    .rewards-intro {
        max-width: 100%
    }

    .rewards-info h3 {
        font-size: 1.4rem
    }

    .transactions-container {
        overflow-x: auto
    }

    .calendar-day,
    .claim-button,
    .modal-button,
    .modal-close {
        cursor: pointer;
        min-height: 48px
    }
}

@media (max-width:768px) {
    .rewards-intro h1 {
        font-size: clamp(1.8rem, 5vw, 2.5rem)
    }

    .rewards-intro p {
        font-size: clamp(.95rem, 2.5vw, 1.1rem)
    }

    .rewards-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem
    }

    .calendar-day {
        padding: clamp(.5rem, 2vw, .8rem) clamp(.2rem, 1vw, .3rem);
        min-height: 60px;
        min-width: 60px;
        position: relative;
        cursor: pointer
    }

    .calendar-day * {
        pointer-events: none
    }

    .day-number {
        font-size: clamp(.9rem, 2.5vw, 1rem)
    }

    .reward-amount {
        font-size: clamp(.75rem, 2vw, .8rem)
    }

    .special-marker {
        font-size: clamp(.55rem, 1.5vw, .6rem);
        padding: 2px 6px;
        bottom: -8px
    }

    .reward-modal-content {
        padding: clamp(1.5rem, 4vw, 2rem);
        max-width: 400px
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px
    }

    .rewards-card,
    .rewards-info {
        padding: clamp(1.2rem, 4vw, 2rem)
    }

    .recent-rewards h2 {
        font-size: clamp(1.5rem, 4vw, 1.8rem)
    }

    .claim-button,
    .modal-button {
        padding: clamp(.8rem, 2vw, 1rem);
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(224, 170, 255, 0.3)
    }
}

@media (max-width:576px) {
    .calendar-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: clamp(5px, 2vw, 10px)
    }

    .calendar-day:nth-child(5),
    .calendar-day:nth-child(6),
    .calendar-day:nth-child(7) {
        margin-top: clamp(5px, 2vw, 10px)
    }

    .calendar-day:nth-child(5) {
        grid-column: 2
    }

    .calendar-day {
        margin-bottom: 3px;
        min-height: 65px
    }

    .rewards-info ul li {
        flex-direction: column;
        gap: .5rem
    }

    .rewards-intro h1 {
        font-size: clamp(1.6rem, 5vw, 2rem)
    }

    .rewards-intro p {
        font-size: clamp(.9rem, 2.5vw, 1rem)
    }

    .transactions-table td,
    .transactions-table th {
        padding: clamp(.5rem, 2vw, .8rem) clamp(.3rem, 1.5vw, .5rem);
        font-size: clamp(.8rem, 2.2vw, .9rem)
    }

    .streak-counter {
        padding: .5rem .8rem
    }

    .streak-value {
        font-size: clamp(1.2rem, 3vw, 1.5rem)
    }

    .reward-message h3 {
        font-size: clamp(1.4rem, 4vw, 1.8rem)
    }

    .claimed-amount {
        font-size: clamp(1rem, 3vw, 1.2rem)
    }

    .new-balance {
        padding: clamp(.7rem, 2vw, 1rem)
    }

    .transactions-table a,
    .transactions-table button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center
    }
}

@media (max-width:480px) {
    .calendar-row {
        gap: 8px
    }

    .calendar-day {
        aspect-ratio: auto;
        min-height: 65px;
        padding: 8px 4px
    }

    .rewards-header h2 {
        font-size: clamp(1.2rem, 4vw, 1.5rem)
    }

    .claim-button,
    .modal-button {
        padding: clamp(.8rem, 2.5vw, 1rem);
        font-size: clamp(.9rem, 2.5vw, 1rem);
        min-height: 50px
    }

    .reward-animation {
        width: clamp(90px, 25vw, 120px);
        height: clamp(90px, 25vw, 120px)
    }

    .transactions-table tr {
        height: 50px
    }
}

@media (max-width:400px) {
    .calendar-row {
        grid-template-columns: repeat(3, 1fr)
    }

    .calendar-day:nth-child(4),
    .calendar-day:nth-child(5),
    .calendar-day:nth-child(6),
    .calendar-day:nth-child(7) {
        margin-top: 8px
    }

    .calendar-day:nth-child(4) {
        grid-column: 1
    }

    .calendar-day:nth-child(5) {
        grid-column: 2
    }

    .calendar-day:nth-child(6) {
        grid-column: 3
    }

    .calendar-day:nth-child(7) {
        grid-column: 2;
        margin-top: 8px
    }

    .rewards-card {
        padding: clamp(1rem, 3vw, 1.5rem) clamp(.7rem, 2vw, 1rem)
    }

    .reward-message h3 {
        font-size: clamp(1.2rem, 3.5vw, 1.5rem)
    }

    .fl-token {
        font-size: clamp(2rem, 6vw, 2.5rem)
    }

    .rewards-info h3 {
        font-size: clamp(1.1rem, 3.5vw, 1.3rem)
    }

    .claim-button,
    .modal-button {
        min-height: 54px
    }

    .rewards-info ul li {
        margin-bottom: 20px
    }
}

@media only screen and (min-device-width:375px) and (max-device-width:428px) {
    .rewards-card {
        padding: clamp(1rem, 3vw, 1.2rem) clamp(.6rem, 2vw, .8rem)
    }

    .calendar-day {
        padding: clamp(.4rem, 1.5vw, .6rem) clamp(.1rem, .5vw, .2rem);
        min-height: 60px;
        transform: none !important;
        box-shadow: none !important;
        -webkit-tap-highlight-color: rgba(224, 170, 255, 0.4)
    }

    .calendar-day:active {
        background-color: rgba(157, 78, 221, .4)
    }

    .day-number {
        font-size: clamp(.8rem, 2.2vw, .9rem);
        margin-bottom: .2rem
    }

    .reward-amount {
        font-size: clamp(.7rem, 2vw, .75rem)
    }

    .reward-modal-content {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom))
    }

    .calendar-day:active,
    .claim-button:active,
    .modal-button:active,
    .modal-close:active {
        opacity: .8
    }
}

@media only screen and (min-device-width:360px) and (max-device-width:412px) {
    .rewards-intro h1 {
        font-size: clamp(1.5rem, 5vw, 1.8rem)
    }

    .calendar-day {
        padding: clamp(.3rem, 1.5vw, .5rem) clamp(.1rem, .5vw, .2rem);
        min-height: 58px;
        transform: none !important
    }

    .special-marker {
        font-size: clamp(.5rem, 1.5vw, .55rem);
        padding: 2px 5px;
        bottom: -8px
    }

    .rewards-info ul li .material-icons {
        font-size: clamp(1.2rem, 3.5vw, 1.5rem)
    }
}

@media only screen and (max-width:320px) {
    .calendar-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px
    }

    .calendar-day:nth-child(3),
    .calendar-day:nth-child(4),
    .calendar-day:nth-child(5),
    .calendar-day:nth-child(6),
    .calendar-day:nth-child(7) {
        margin-top: 6px
    }

    .rewards-intro h1 {
        font-size: 1.4rem
    }

    .rewards-card,
    .rewards-info {
        padding: 1rem .7rem
    }

    .calendar-day {
        min-height: 70px
    }
}

@supports (padding-top:env(safe-area-inset-top)) {
    .reward-modal {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom)
    }

    .reward-modal-content {
        max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 40px);
        overflow-y: auto
    }
}

@media (hover:none) {

    .calendar-day:hover,
    .claim-button:hover:not(:disabled),
    .modal-button:hover,
    .modal-close:hover {
        transform: none !important;
        box-shadow: none !important
    }

    .calendar-day:active,
    .claim-button:active:not(:disabled),
    .modal-button:active,
    .modal-close:active {
        background-color: rgba(157, 78, 221, .4);
        opacity: .9
    }

    .calendar-day,
    .claim-button,
    .modal-button,
    .modal-close,
    a[role=button],
    button,
    input[type=button],
    input[type=submit] {
        min-height: 44px;
        min-width: 44px;
        -webkit-tap-highlight-color: rgba(224, 170, 255, 0.3);
        touch-action: manipulation
    }

    * {
        touch-action: manipulation
    }
}

@media (prefers-reduced-motion:reduce) {

    .calendar-day,
    .claim-button,
    .fl-token,
    .modal-button,
    .reward-modal-content,
    .sparkle {
        transition: none !important;
        animation: none !important
    }

    .calendar-day:hover,
    .claim-button:hover:not(:disabled),
    .modal-button:hover {
        transform: none !important
    }
}

.calendar-day:focus,
.claim-button:focus,
.modal-button:focus,
.modal-close:focus {
    outline: #e0aaff solid 3px !important;
    outline-offset: 2px !important;
    position: relative;
    z-index: 5
}

@supports (-webkit-touch-callout:none) {

    .calendar-day,
    .claim-button,
    .modal-button,
    .modal-close {
        cursor: pointer;
        -webkit-touch-callout: none;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: rgba(224, 170, 255, 0.3)
    }

    .calendar-day {
        touch-action: manipulation
    }
}