/* Account Page Styles */

.account-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: transparent;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0;
}

.account-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.account-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(209, 213, 219, 0.3);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.balance-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    color: white;
}

.balance-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.balance-amount {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Overview Cards */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.overview-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(0, 0, 0, 0.15);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    color: white;
    margin-right: 1rem;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 0.25rem 0;
}

.card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.stat-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-title {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin: 0;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.stat-chart {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.stat-number {
    font-weight: 600;
    color: #1f2937;
}

/* Transactions */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.transaction-item:hover {
    background: #f3f4f6;
}

.transaction-info {
    flex: 1;
}

.transaction-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.transaction-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.transaction-amount {
    font-weight: 600;
    color: #dc2626;
}

.transaction-amount.positive {
    color: #059669;
}

.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: #6b7280;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Recharge Modal */
.recharge-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.package-card {
    position: relative;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.package-card:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
}

.package-card.recommended {
    border-color: #6366f1;
    background: #f8faff;
}

.package-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #6366f1;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.package-header {
    margin-bottom: 1rem;
}

.package-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.package-price {
    font-size: 2rem;
    font-weight: 700;
    color: #6366f1;
}

.package-details {
    margin-bottom: 1.5rem;
}

.package-credits {
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.package-unit-price {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.package-btn {
    width: 100%;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .account-container {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .overview-cards {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .balance-badge {
        align-items: center;
    }
    
    .recharge-packages {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .page-title {
        color: #f9fafb;
    }
    
    .page-subtitle {
        color: #9ca3af;
    }
    
    .account-section {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .section-title {
        color: #f9fafb;
    }
    
    .overview-card, .stat-card {
        background: #374151;
        border-color: #4b5563;
    }
    
    .card-value, .stat-value {
        color: #f9fafb;
    }
    
    .transaction-item {
        background: #374151;
        border-color: #4b5563;
    }
    
    .transaction-title {
        color: #f9fafb;
    }
    
    .package-card {
        background: #374151;
        border-color: #4b5563;
    }
    
    .package-card.recommended {
        background: #1e293b;
    }
    
    .package-name {
        color: #f9fafb;
    }
}
/* Avatar Card Styles */
.avatar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #6366f1;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.avatar-hint {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin: 0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #6366f1;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #4f46e5;
}

.btn-outline {
    background: transparent;
    color: #6366f1;
    border: 1px solid #6366f1;
}

.btn-outline:hover {
    background: #f0f4ff;
}
