/* Update loading spinner styles */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    display: inline-block;
    box-sizing: border-box;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* New file: Split out rewards-specific styles from styles.css */
#rewards-button {
    composes: game-mode-button;
    background: linear-gradient(135deg, #e67e22, #d35400);
    font-size: 16px;
    padding: 12px 24px;
    width: auto;
    min-width: 120px;
    margin: 15px auto;
    display: inline-block;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    position: relative;
}

#rewards-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #d35400, #c0392b);
}

#rewards-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--menu-bg);
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Make rewards page fixed size and scrollable */
.rewards-container {
    max-width: 800px;
    width: 90%;
    max-height: 80vh; /* Set maximum height */
    height: auto;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Enable vertical scrolling */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.2);
}

/* Style scrollbar for Webkit browsers */
.rewards-container::-webkit-scrollbar {
    width: 8px;
}

.rewards-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.rewards-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.rewards-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.rewards-container h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reward-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 30px;
    margin: 20px 0;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.reward-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.reward-item:hover::before {
    opacity: 1;
}

.reward-title {
    font-size: 1.8rem;
    color: #1e90ff; 
    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(30, 144, 255, 0.3);
}

.reward-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.reward-features {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.feature-item:before {
    content: '✨';
    color: #1e90ff;
}

.reward-preview {
    width: 300px;
    height: 150px;
    margin: 30px auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(30, 144, 255, 0.2);
}

.reward-preview::before,
.reward-preview::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(30, 144, 255, 0.1) 0%, transparent 50%);
    animation: sparkle 3s infinite alternate;
}

@keyframes sparkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

.blue-blade-preview {
    width: 80%;
    height: 5px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #1e90ff 50%,
        transparent 100%
    );
    box-shadow: 
        0 0 15px rgba(30, 144, 255, 0.7),
        0 0 30px rgba(30, 144, 255, 0.4);
    animation: slashPreview 2s infinite;
}

.reward-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.follow-button,
.check-follow-button {
    position: relative;
    z-index: 10;
    padding: 15px 35px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.follow-button {
    background: linear-gradient(135deg, #1da1f2, #1a91da);
    color: white;
    text-decoration: none;
}

.check-follow-button {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.follow-button:hover,
.check-follow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.follow-button:hover {
    background: #1991db;
}

.check-follow-button:hover {
    background: #27ae60;
}

/* Keep back button always visible */
#rewards-back {
    position: fixed; /* Change from absolute to fixed */
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #333, #444);
    color: white;
    padding: 15px 35px;
    font-size: 18px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 1010; /* Ensure it's above scrollable content */
}

#rewards-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.reward-login-message {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-size: 1.1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Add notification badge styles */
#rewards-notification-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ff3b30;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

#rewards-notification-badge.hidden {
    display: none;
}

/* Add unlock animation */
@keyframes unlockReward {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.reward-unlocked {
    animation: unlockReward 0.5s ease-out forwards;
}