/* Token Balance Display - Fixed Top Left */

.token-balance-widget {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.token-balance-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    border-color: #ffd700;
}

.token-icon {
    font-size: 1.5rem;
}

.token-amount {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
    min-width: 40px;
    text-align: center;
}

.token-label {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.unlimited-badge {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1rem;
    color: #4caf50;
    font-weight: bold;
}

/* Purchase Modal */
.token-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.token-modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.token-modal {
    background: #121330;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.token-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.token-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffd700;
    color: #ffd700;
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 10px;
}

.modal-subtitle {
    font-family: 'Cinzel', serif;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.modal-current-balance {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    margin-bottom: 30px;
}

.modal-current-balance h3 {
    font-family: 'Cinzel Decorative', serif;
    color: #ffd700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.modal-balance-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
}

.modal-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.modal-package-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.modal-package-card:hover {
    transform: translateY(-5px);
    border-color: #ffd700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.modal-package-card h4 {
    font-family: 'Cinzel Decorative', serif;
    color: #ffd700;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.modal-package-tokens {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.modal-package-price {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.modal-btn-purchase {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #ffd700;
    border-radius: 20px;
    padding: 10px 25px;
    color: #fff;
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.modal-btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.modal-btn-purchase:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-subscription-section {
    background: rgba(138, 43, 226, 0.2);
    border: 2px solid rgba(138, 43, 226, 0.4);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.modal-subscription-section h3 {
    font-family: 'Cinzel Decorative', serif;
    color: #ba9ffb;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.modal-subscription-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.modal-subscription-price {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 15px;
}

/* Guest User Benefits Section */
.modal-guest-benefits {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
}

.modal-guest-benefits h3 {
    font-family: 'Cinzel Decorative', serif;
}

.modal-guest-benefits ul li {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    margin-bottom: 8px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .token-balance-widget {
        top: 10px;
        left: 10px;
        padding: 10px 15px;
    }

    .token-amount {
        font-size: 1rem;
        min-width: 30px;
    }

    .token-label {
        display: none;
    }

    .token-modal {
        padding: 25px;
        width: 95%;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-packages-grid {
        grid-template-columns: 1fr;
    }
}
