/* Credit Dashboard Styles */

/* Auth Required */
.auth-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-card h2 {
    color: #4ade80;
    margin-bottom: 1rem;
}

.auth-card p {
    color: #94a3b8;
    margin-bottom: 2rem;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-google {
    background: #4285f4;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-google:hover {
    background: #3367d6;
}

/* Balance Section */
.balance-section {
    margin-bottom: 3rem;
}

.balance-card {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-radius: 20px;
    padding: 2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(74, 222, 128, 0.3);
}

.balance-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.balance-amount {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.balance-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.balance-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.balance-actions .btn {
    min-width: 200px;
    white-space: nowrap;
}

.btn-special {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
}

.btn-special:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.btn-special:disabled {
    background: #6b7280;
    cursor: not-allowed;
}

/* Earning Section */
.earning-section {
    margin-bottom: 3rem;
}

.earning-section h2 {
    color: #4ade80;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.earning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.earning-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.earning-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.earning-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.earning-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 222, 128, 0.2);
    border-radius: 12px;
}

.earning-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.earning-reward {
    color: #4ade80;
    font-weight: 600;
    font-size: 1.1rem;
}

.earning-progress {
    margin-bottom: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

.progress-credits {
    color: #4ade80;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    transition: width 0.3s;
}

.btn-earning {
    width: 100%;
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-earning:hover:not(:disabled) {
    background: #4ade80;
    color: white;
}

.btn-earning:disabled {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
    border-color: #6b7280;
    cursor: not-allowed;
}

/* Summary Section */
.summary-section {
    margin-bottom: 3rem;
}

.summary-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-card h3 {
    color: #4ade80;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.summary-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4ade80;
}

/* Transactions Section */
.transactions-section h2 {
    color: #4ade80;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.transactions-list {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    flex: 1;
}

.transaction-desc {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.transaction-time {
    font-size: 0.875rem;
    color: #94a3b8;
}

.transaction-amount {
    font-size: 1.125rem;
    font-weight: 600;
}

.transaction-amount.positive {
    color: #4ade80;
}

.transaction-amount.negative {
    color: #ef4444;
}

.no-transactions {
    padding: 3rem;
    text-align: center;
    color: #94a3b8;
}

.loading {
    padding: 3rem;
    text-align: center;
    color: #94a3b8;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(74, 222, 128, 0.3);
    border-top: 4px solid #4ade80;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1.125rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .balance-card {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .balance-stats {
        justify-content: center;
    }
    
    .balance-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .earning-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .auth-buttons {
        flex-direction: column;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .transaction-amount {
        align-self: flex-end;
    }
}

/* Credits display in navigation */
.credits-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.credits-display i {
    font-size: 1rem;
}
