/* Rewards Page Styles */

:root {
    --primary-color: #FFD700;
    --secondary-color: #FF9500;
    --accent-gradient: linear-gradient(135deg, #FFD700 0%, #FF9500 100%);
    --bg-dark: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: rgba(255, 215, 0, 0.2);
    --success-color: #4CAF50;
    --error-color: #f44336;
}

.rewards-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* Points Header */
.points-header {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 149, 0, 0.10) 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.1);
    animation: fadeInDown 0.6s ease-out;
}

.points-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.points-icon svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.points-info {
    flex: 1;
}

.points-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #d4af37;
    margin-bottom: 0.25rem;
}

.points-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Rewards Section */
.rewards-section {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s;
    animation: fadeIn 0.6s ease-out;
}

.rewards-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title-wrapper svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.section-title-wrapper h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0.25rem 0 0 0;
}

/* Daily Check-in Card */
.checkin-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.checkin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.stat-item:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.checkin-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 16px;
    flex-wrap: wrap;
}

.next-reward-info {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.reward-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.reward-points {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.checkin-btn, .spin-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--accent-gradient);
    color: #1a0f00;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

.checkin-btn:hover:not(:disabled), .spin-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.6);
}

.checkin-btn:active:not(:disabled), .spin-btn:active:not(:disabled) {
    transform: translateY(-2px);
}

.checkin-btn:disabled, .spin-btn:disabled,
.checkin-btn.disabled, .spin-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Streak Calendar */
.streak-calendar {
    background: rgba(255, 215, 0, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.calendar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

.calendar-day {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: all 0.3s;
    position: relative;
}

.calendar-day.completed {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--primary-color);
}

.calendar-day.completed::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.calendar-day.current {
    background: var(--accent-gradient);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.calendar-day.current .day-number,
.calendar-day.current .day-reward {
    color: #1a0f00;
}

.calendar-day.milestone {
    border-color: var(--secondary-color);
}

.day-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.day-reward {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.milestone-note {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 149, 0, 0.1);
    border-radius: 8px;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Spin Wheel Card */
.spin-wheel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
}

.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 3rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: visible; /* Allow pointer to extend outside */
}

.wheel-pointer {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.wheel-pointer svg {
    display: block;
    width: 50px;
    height: 60px;
}

#wheelCanvas {
    border-radius: 50%;
    box-shadow: 0 0 0 8px #FFD700,
                0 0 0 12px rgba(255, 215, 0, 0.3),
                0 10px 40px rgba(0, 0, 0, 0.4);
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a0f00;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 0 4px #ffffff,
                0 0 0 6px #FFD700,
                0 4px 15px rgba(0, 0, 0, 0.3),
                inset 0 2px 4px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.wheel-center:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 0 4px #ffffff,
                0 0 0 6px #FFD700,
                0 6px 20px rgba(255, 215, 0, 0.5),
                inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.wheel-center:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.spin-cost-info {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50px;
}

.spin-cost-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.spin-cost-value {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Points History */
.history-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(8px);
}

.history-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 12px;
}

.history-details {
    flex: 1;
}

.history-action {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.history-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.history-points {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.history-points.positive {
    color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
}

.history-points.negative {
    color: var(--error-color);
    background: rgba(244, 67, 54, 0.1);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-state svg {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-color: var(--success-color);
}

.toast.error {
    border-color: var(--error-color);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Prize Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    border-radius: 24px;
    padding: 3rem 2rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: scaleIn 0.4s ease-out;
}

.prize-modal-content {
    text-align: center;
}

.prize-animation {
    position: relative;
    margin-bottom: 2rem;
}

.confetti {
    display: none;
}

.prize-icon {
    font-size: 5rem;
    animation: bounce 1s ease-in-out infinite;
}

.prize-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.prize-message {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.modal-close-btn {
    padding: 1rem 3rem;
    background: var(--accent-gradient);
    color: #1a0f00;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(100px) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .rewards-container {
        padding: 1rem;
    }

    .points-header {
        padding: 2rem 1.5rem;
    }

    .points-display {
        flex-direction: column;
        text-align: center;
    }

    .points-value {
        font-size: 3rem;
    }

    .rewards-section {
        padding: 1.5rem;
    }

    .section-title-wrapper h2 {
        font-size: 1.5rem;
    }

    .checkin-stats {
        grid-template-columns: 1fr;
    }

    .checkin-action {
        flex-direction: column;
        align-items: stretch;
    }

    .checkin-btn, .spin-btn {
        width: 100%;
        justify-content: center;
    }

    .calendar-days {
        gap: 0.5rem;
    }

    .day-number {
        font-size: 1rem;
    }

    .day-reward {
        font-size: 0.75rem;
    }

    .wheel-container {
        width: 300px;
        height: 300px;
    }

    #wheelCanvas {
        width: 300px;
        height: 300px;
    }

    .wheel-center {
        width: 80px;
        height: 80px;
        font-size: 1rem;
    }

    .history-item {
        flex-wrap: wrap;
    }

    .history-points {
        flex-basis: 100%;
        text-align: center;
    }

    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .prize-title {
        font-size: 2rem;
    }

    .prize-message {
        font-size: 1.2rem;
    }
}

/* ========================================
   LOGIN REQUIRED OVERLAY (View-Only Mode)
   ======================================== */

.login-required-overlay {
    position: fixed;
    top: 70px; /* Below navbar */
    left: 0;
    width: 100%;
    height: calc(100% - 70px);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-prompt {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 2px solid var(--primary-color);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(255, 215, 0, 0.1);
    animation: scaleIn 0.4s ease-out;
}

.login-prompt .login-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.login-prompt h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.login-prompt p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.login-prompt .login-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--accent-gradient);
    color: #1a0f00;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.login-prompt .login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.login-prompt .register-link {
    display: block;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.login-prompt .register-link:hover {
    color: var(--primary-color);
}

/* Blurred content behind overlay */
.blurred-content {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}
