/* Background Art */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 10%, #1a1a2e 0%, #000000 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 25s infinite ease-in-out alternate;
}

.orb-1 {
    top: -5%;
    left: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.orb-2 {
    bottom: 10%;
    right: -20%;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    animation-delay: -5s;
    animation-duration: 30s;
}

.orb-3 {
    top: 40%;
    left: 30%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #e17055 0%, transparent 70%);
    animation-delay: -10s;
    opacity: 0.3;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -20px) scale(1.1);
    }

    100% {
        transform: translate(-10px, 20px) scale(0.9);
    }
}

/* Home Header */
.brand-header {
    text-align: center;
    margin-bottom: 30px;
}

.brand-logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, #a29bfe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.user-greeting {
    margin-top: 4px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Wallet Card (Hero) */
.wallet-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 24px;
    margin: 20px 0 40px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.wallet-card::before {
    /* Decorative Circle */
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.4), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.wallet-card .label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wallet-card .label::after {
    /* Chip Icon Placeholder */
    content: '💳';
    font-size: 20px;
    opacity: 0.8;
}

.wallet-card .value {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.wallet-card .value span {
    background: linear-gradient(to bottom, #fff, #dfe6e9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wallet-card .currency {
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
}


/* Streak Widget Premium */
.streak-widget {
    background: rgba(20, 20, 25, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.streak-widget::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, rgba(253, 203, 110, 0.08) 0%, transparent 100%);
    pointer-events: none;
}

.streak-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.streak-info {
    display: flex;
    flex-direction: column;
}

.streak-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.streak-count-wrapper {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.streak-value {
    font-size: 32px;
    font-weight: 800;
    color: #fdcb6e;
    line-height: 1;
    text-shadow: 0 0 15px rgba(253, 203, 110, 0.5);
}

.streak-unit {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* 7-Day Timeline */
.streak-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 10px;
}

.timeline-progress-bar {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    z-index: 1;
    transform: translateY(-50%);
}

.timeline-progress-bar .progress-fill {
    height: 100%;
    background: #fdcb6e;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(253, 203, 110, 0.5);
}

.day-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2d3436;
    border: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

/* Big Reward Day 7 */
.day-circle.big-reward {
    width: 40px;
    height: 40px;
    border-color: rgba(253, 203, 110, 0.3);
    background: rgba(45, 52, 54, 0.8);
    font-size: 18px;
}

/* Active State (Today) */
.day-circle.active {
    background: #fdcb6e;
    border-color: #fdcb6e;
    color: #2d3436;
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(253, 203, 110, 0.6);
    animation: pulseCircle 2s infinite;
}

/* Completed State */
.day-circle.completed {
    background: #fdcb6e;
    border-color: #fdcb6e;
    color: #2d3436;
}

/* Upcoming (Next) */
.day-circle.upcoming {
    border-color: rgba(253, 203, 110, 0.5);
    color: #fff;
    background: rgba(253, 203, 110, 0.1);
}


@keyframes pulseCircle {
    0% {
        box-shadow: 0 0 0 0 rgba(253, 203, 110, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(253, 203, 110, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(253, 203, 110, 0);
    }
}

/* Footer Section */
.streak-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.streak-btn {
    width: 100%;
    padding: 14px;
    background: var(--gold-gradient, linear-gradient(135deg, #fdcb6e 0%, #e17055 100%));
    border: none;
    border-radius: 12px;
    color: #2d3436;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.streak-btn:active {
    transform: scale(0.98);
}

.streak-btn.claimed {
    background: #2d3436;
    color: #00b894;
    border: 1px solid #00b894;
    box-shadow: none;
    cursor: default;
}

/* Removed Action Grid Styles */

/* Referral Milestones */
.milestones-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.milestone-card {
    background: rgba(30, 30, 40, 0.6);
    /* Slightly darker/solid */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Premium Gold Card for high tiers */
.milestone-card.premium {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.1), rgba(0, 0, 0, 0.4));
    border-color: rgba(253, 203, 110, 0.3);
    box-shadow: 0 5px 15px rgba(253, 203, 110, 0.1);
}

.milestone-header {
    opacity: 1;
    /* Reset opacity inheritance */
}

.spin-buy-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(253, 203, 110, 0.3);
    border-radius: 12px;
    color: #fdcb6e;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.2s ease;
}

.spin-buy-btn:hover {
    background: rgba(253, 203, 110, 0.1);
    border-color: rgba(253, 203, 110, 0.6);
}

.spin-buy-btn:active {
    transform: scale(0.95);
}

.milestone-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.milestone-reward {
    font-size: 14px;
    font-weight: 800;
    color: #fdcb6e;
    padding: 4px 10px;
    background: rgba(253, 203, 110, 0.1);
    border-radius: 12px;
}

.milestone-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.milestone-progress-fill {
    height: 100%;
    background: #fdcb6e;
    border-radius: 6px;
    width: 0%;
    transition: width 1s ease;
    box-shadow: 0 0 10px rgba(253, 203, 110, 0.4);
}

.milestone-status {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.claim-btn {
    margin-top: 8px;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    color: #2d3436;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
    animation: pulseBtn 2s infinite;
}

/* Spin Controls 3D Refined */
.spin-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    align-items: stretch;
    margin-top: 24px;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.spin-main-btn {
    flex: 2;
    background: linear-gradient(to bottom, #f1c40f, #f39c12);
    border: none;
    border-radius: 16px;
    padding: 0;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 0 #d35400, 0 10px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.1s;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    height: 60px;
    /* Fixed height for alignment */
    display: flex;
    align-items: center;
    justify-content: center;
}

.spin-main-btn:active {
    box-shadow: 0 0 0 #d35400, 0 0 0 rgba(0, 0, 0, 0.3);
    transform: translateY(6px);
}

.spin-main-btn:disabled {
    background: #95a5a6;
    box-shadow: 0 6px 0 #7f8c8d;
    cursor: not-allowed;
    color: #ecf0f1;
}

.spin-buy-btn {
    flex: 1;
    background: linear-gradient(to bottom, #3498db, #2980b9);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 0 #2c3e50, 0 10px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.1s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 60px;
}

.spin-buy-btn:active {
    box-shadow: 0 0 0 #2c3e50;
    transform: translateY(6px);
}

.spin-buy-btn span:first-child {
    font-size: 16px;
}

.spin-buy-btn span:last-child {
    font-size: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
}

/* --- New Referral Section Styles --- */

.referral-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.invite-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.invite-text {
    color: #dfe6e9;
    margin-bottom: 16px;
    font-size: 14px;
}

.invite-text .highlight {
    color: #fdcb6e;
    font-weight: bold;
}

.invite-actions {
    display: flex;
    gap: 12px;
}

.invite-btn {
    flex: 1;
    background: #6c5ce7;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy-btn {
    width: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.section-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.section-divider span {
    padding: 0 10px;
}

.milestone-card.claimed-anim {
    animation: fadeOutUp 0.5s forwards;
}

@keyframes fadeOutUp {
    to {
        opacity: 0;
        transform: translateY(-20px);
        height: 0;
        margin: 0;
        padding: 0;
    }
}

/* --- New Account & Home Enhancements --- */

/* Profile Hero (Home) */
.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    padding-top: 20px;
}

.hero-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
}

.profile-hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
    position: relative;
    z-index: 2;
    border: 3px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

img.profile-hero-avatar {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

.avatar-fallback {
    width: 100%;
    height: 100%;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
    animation: pulseGlow 3s infinite ease-in-out;
}

.hero-greeting {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Account Wallet Card */
.account-wallet-card {
    background: linear-gradient(135deg, #6c5ce7, #d63031);
    /* Purple to Red gradient */
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(214, 48, 49, 0.3);
    color: white;
    text-align: center;
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.wallet-balance {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.withdraw-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.withdraw-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.withdraw-btn:active {
    transform: scale(0.95);
}

.wallet-decor-1 {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.wallet-decor-2 {
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* Detailed Info List */
.detailed-info {
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.info-row .value {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Streak Fire Animation */
.streak-icon-anim {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    filter: drop-shadow(0 0 10px rgba(253, 203, 110, 0.6));
    animation: burn 1.5s infinite alternate ease-in-out;
}

@keyframes burn {
    from {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 120, 0, 0.5));
    }

    to {
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px rgba(255, 200, 0, 0.8));
    }
}