/**
 * Profile Page Styles
 */

/* ============================================
   PROFILE HEADER CARD
============================================ */

.profile-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 2rem;
}

.profile-cover {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
}

.edit-cover-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-cover-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.profile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 2rem 1.5rem;
    margin-top: -60px;
}

.profile-avatar-section {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
}

.profile-avatar {
    position: relative;
}

.profile-avatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 3px solid var(--bg-card);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-avatar-btn:hover {
    transform: scale(1.1);
}

.profile-info {
    padding-bottom: 0.5rem;
}

.profile-name-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.profile-name-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(14, 203, 129, 0.1);
    border: 1px solid rgba(14, 203, 129, 0.3);
    border-radius: var(--radius-full);
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 500;
}

.profile-username {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-actions {
    display: flex;
    gap: 1rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-color);
    border-top: 1px solid var(--border-color);
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
}

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

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   PROFILE CONTENT GRID
============================================ */

.profile-content-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
}

.profile-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.profile-section:last-child {
    margin-bottom: 0;
}

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

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* ============================================
   PERSONAL INFORMATION
============================================ */

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.info-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.15), rgba(240, 185, 11, 0.05));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.info-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.info-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   ACCOUNT STATUS
============================================ */

.status-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.status-item.verified {
    background: rgba(14, 203, 129, 0.05);
    border-color: rgba(14, 203, 129, 0.3);
}

.status-item.pending {
    background: rgba(252, 213, 53, 0.05);
    border-color: rgba(252, 213, 53, 0.3);
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.status-item.verified .status-icon {
    background: rgba(14, 203, 129, 0.15);
    color: var(--success);
}

.status-item.pending .status-icon {
    background: rgba(252, 213, 53, 0.15);
    color: var(--warning);
}

.status-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-label {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.status-value {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-item.verified .status-value {
    color: var(--success);
}

.status-item.pending .status-value {
    color: var(--warning);
}

/* ============================================
   SECURITY SETTINGS
============================================ */

.security-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.security-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.security-info i {
    font-size: 1.2rem;
    color: var(--primary);
}

/* ============================================
   ACCOUNT LEVEL
============================================ */

.account-level-card {
    text-align: center;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.level-progress {
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.level-benefits {
    text-align: right;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.level-benefits h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.level-benefits ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.level-benefits li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.level-benefits i {
    color: var(--success);
}

/* ============================================
   ACTIVITY TIMELINE
============================================ */

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    background: var(--bg-tertiary);
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-icon.deposit {
    background: rgba(14, 203, 129, 0.15);
    color: var(--success);
}

.timeline-icon.withdraw {
    background: rgba(246, 70, 93, 0.15);
    color: var(--danger);
}

.timeline-icon.profit {
    background: rgba(240, 185, 11, 0.15);
    color: var(--primary);
}

.timeline-icon.task {
    background: rgba(55, 114, 255, 0.15);
    color: var(--secondary);
}

.timeline-icon.referral {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-purple);
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   ACHIEVEMENTS
============================================ */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.achievement-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.achievement-card.earned {
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.1), rgba(240, 185, 11, 0.05));
    border-color: rgba(240, 185, 11, 0.3);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
}

.achievement-icon.locked {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.achievement-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.achievement-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.achievement-progress {
    width: 100%;
    margin-top: 0.5rem;
}

.achievement-progress .progress-bar {
    height: 6px;
    margin-bottom: 0.5rem;
}

.achievement-progress span {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ============================================
   EDIT PROFILE MODAL
============================================ */

.profile-modal {
    max-width: 600px;
}

.input-prefix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-actions .btn {
    flex: 1;
}

/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 1200px) {
    .profile-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .profile-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .profile-avatar-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-actions {
        width: 100%;
    }
    
    .profile-actions .btn {
        flex: 1;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
