/* css/profile-card.css - Complete Profile Card Styles */

/* ─── Profile Actions ──────────────────────────────────────────────────── */
.profile-actions {
    display: flex;
    gap: 10px;
    margin: 14px 0 18px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-profile-btn {
    padding: 10px 22px;
    border-radius: 25px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.share-profile-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--violet), #EC4899);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 25px;
    z-index: 0;
}

.share-profile-btn:hover::after {
    opacity: 0.08;
}

.share-profile-btn:hover {
    transform: translateY(-2px);
    border-color: var(--violet);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

.share-profile-btn:active {
    transform: scale(0.96);
}

.share-profile-btn i {
    color: var(--violet);
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.share-profile-btn span {
    position: relative;
    z-index: 1;
}

.share-profile-btn:active i {
    animation: icon-pop 0.3s ease;
}

@keyframes icon-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.dark-mode .share-profile-btn {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .share-profile-btn:hover {
    border-color: var(--violet);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* ─── Profile Card ──────────────────────────────────────────────────────── */
.profile-card {
    max-width: 380px;
    margin: 0 auto;
    background: linear-gradient(145deg, #ffffff, #f8f7ff);
    border-radius: 24px;
    padding: 28px 24px 20px;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.12), 0 8px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(139, 92, 246, 0.08);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 72px rgba(139, 92, 246, 0.18), 0 8px 24px rgba(0, 0, 0, 0.04);
}

.dark-mode .profile-card {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-color: rgba(139, 92, 246, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.2);
}

.dark-mode .profile-card:hover {
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ─── Card Header ──────────────────────────────────────────────────────── */
.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.06);
}

.dark-mode .profile-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

.profile-card-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.profile-card-brand i {
    color: #8B5CF6;
    font-size: 20px;
    background: rgba(139, 92, 246, 0.1);
    padding: 6px;
    border-radius: 8px;
}

.profile-card-badge {
    font-size: 11px;
    color: #8B5CF6;
    background: rgba(139, 92, 246, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.profile-card-badge i {
    font-size: 12px;
}

/* ─── Card Body ────────────────────────────────────────────────────────── */
.profile-card-body {
    text-align: center;
    padding: 4px 0;
}

.profile-card-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    color: white;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    position: relative;
    transition: transform 0.3s ease;
}

.profile-card-avatar:hover {
    transform: scale(1.02);
}

.profile-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-avatar::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6, #EC4899, #8B5CF6);
    background-size: 200% 200%;
    z-index: -1;
    animation: avatar-glow 3s ease-in-out infinite;
}

@keyframes avatar-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.profile-card-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.profile-card-username {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 400;
}

.profile-card-bio {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 280px;
    margin: 0 auto 16px;
    line-height: 1.5;
    padding: 0 4px;
}

/* ─── QR Code ───────────────────────────────────────────────────────────── */
.profile-card-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.qr-container {
    background: white;
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-container:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

.dark-mode .qr-container {
    background: #1a1a2e;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .qr-container:hover {
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.qr-container canvas {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 4px;
}

.qr-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    opacity: 0.8;
}

.qr-label i {
    font-size: 14px;
    color: var(--violet);
}

/* ─── Card Footer ──────────────────────────────────────────────────────── */
.profile-card-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(139, 92, 246, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dark-mode .profile-card-footer {
    border-top-color: rgba(255, 255, 255, 0.04);
}

.profile-card-footer span {
    font-family: 'SF Mono', 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    background: var(--bg-hover);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.dark-mode .profile-card-footer span {
    background: rgba(255, 255, 255, 0.04);
}

.profile-card-footer span:hover {
    border-color: var(--border);
}

.copy-profile-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.copy-profile-link:hover {
    background: var(--bg-hover);
    color: var(--violet);
    transform: scale(1.05);
}

.copy-profile-link:active {
    transform: scale(0.9);
}

.copy-profile-link .fa-check {
    color: #22c55e;
}

/* ─── Card Modal ────────────────────────────────────────────────────────── */
.card-modal {
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0 !important;
    border-radius: 24px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.card-modal .modal-header {
    background: var(--bg-card);
    border-radius: 24px 24px 0 0;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.card-modal .modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.card-modal .modal-body {
    padding: 20px 24px 16px;
    background: var(--bg-card);
}

.card-modal .modal-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 14px 24px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 0 0 24px 24px;
}

.card-modal .modal-footer .btn {
    flex: 1;
    max-width: 160px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
}

.card-modal .modal-footer .btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.card-modal .modal-footer .btn-secondary:hover {
    background: var(--border);
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .profile-card {
        padding: 20px 16px 16px;
        border-radius: 20px;
    }
    
    .profile-card-avatar {
        width: 70px;
        height: 70px;
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .profile-card-name {
        font-size: 19px;
    }
    
    .profile-card-username {
        font-size: 13px;
    }
    
    .profile-card-bio {
        font-size: 13px;
        max-width: 240px;
    }
    
    .qr-container canvas {
        width: 100px;
        height: 100px;
    }
    
    .profile-card-footer span {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .profile-card-footer {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .profile-card-brand {
        font-size: 15px;
    }
    
    .profile-card-badge {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .card-modal {
        max-width: 95vw;
    }
    
    .card-modal .modal-body {
        padding: 16px;
    }
    
    .card-modal .modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .card-modal .modal-footer .btn {
        max-width: 100%;
    }
    
    .share-profile-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .share-profile-btn i {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .profile-card {
        padding: 16px 12px 12px;
    }
    
    .profile-card-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .profile-card-name {
        font-size: 17px;
    }
    
    .qr-container canvas {
        width: 80px;
        height: 80px;
    }
    
    .profile-card-footer span {
        font-size: 10px;
    }
    
    .profile-actions {
        gap: 6px;
    }
    
    .share-profile-btn {
        padding: 6px 12px;
        font-size: 11px;
        gap: 4px;
    }
}

/* ─── Error State ──────────────────────────────────────────────────────── */
.error-msg {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
}

.error-msg i {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 12px;
    display: block;
}

.error-msg p {
    font-size: 15px;
    margin-bottom: 16px;
}

.error-msg .btn {
    padding: 8px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}