@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Fresh Light UI Palette */
    --bg-main: #f3f4f6; /* Very light gray */
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.05);
    
    /* Sunset Gradients */
    --gradient-1: #ff7e5f; /* Warm coral/orange */
    --gradient-2: #feb47b; /* Soft peach/yellow */
    --gradient-action: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    
    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    
    /* Layout */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --max-width: 420px;
    
    /* Motion */
    --transition-fast: 0.15s ease-out;
    --transition-smooth: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
 
}


/* --- Background Shapes --- */
.background-shape {
    position:fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--gradient-1);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--gradient-2);
    bottom: -50px;
    right: -50px;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* --- Main Card Container --- */
.card-container {
    width: 100%;
    max-width: var(--max-width);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* For banner clipping */
    transition: transform 0.3s ease;
}

/* Remove 3D tilt for this design, make it a natural lift */
.card-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.12);
}

/* --- Banner & Header --- */
.card-banner {
    width: 100%;
    height: 140px;
    background-color: #eee;
    overflow: hidden;
    position: relative;
}

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

.card-content {
    padding: 0 30px 0;
    display: flex;
    flex-direction: column;
}

.card-header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: -45px; /* Overlap banner */
    position: relative;
    z-index: 20;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.icon-btn:hover {
    color: var(--gradient-1);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* --- Profile Section --- */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: -60px; /* Overlap banner */
    position: relative;
    z-index: 15;
}

.profile-image-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 4px; /* Space for gradient border */
    background: var(--gradient-action);
    margin-bottom: 16px;
    box-shadow: 0 10px 25px rgba(255, 126, 95, 0.3);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ffffff;
}

.name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.role {
    color: var(--gradient-1);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.company {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 15px;
}

.bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Thumbnail View Override */
.profile-section.thumbnail-view {
    flex-direction: row;
    text-align: left;
    align-items: center;
    margin-top: -20px;
    margin-bottom: 20px;
}

.profile-section.thumbnail-view .profile-image-wrapper {
    width: 70px;
    height: 70px;
    margin-bottom: 0;
    margin-right: 15px;
    flex-shrink: 0;
}

.profile-section.thumbnail-view .bio {
    display: none;
}

.profile-section.thumbnail-view .name {
    font-size: 1.3rem;
}

/* --- Buttons --- */
.primary-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 100px; /* Pill shape */
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    border: none;
}

.btn-primary {
    background: var(--gradient-action);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 126, 95, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 126, 95, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--text-primary);
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f3f4f6;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}

/* --- Links Section --- */
.links-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.link-item {
    background: #fdfdfd;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 15px 12px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.link-item:hover {
    border-color: rgba(255, 126, 95, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
}

.link-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f3f4f6;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: var(--transition-fast);
}

.link-item:hover .link-icon {
    background: var(--gradient-action);
    color: white;
}

.link-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.link-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.link-value {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.arrow-icon {
    display: none;
}

/* List View Override */
.links-section.list-view {
    display: flex;
    flex-direction: column;
}

.links-section.list-view .link-item {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 16px;
    border: 1px solid var(--card-border);
}

.links-section.list-view .link-icon {
    margin-bottom: 0;
    margin-right: 15px;
    flex-shrink: 0;
}

.links-section.list-view .link-info {
    align-items: flex-start;
}

.links-section.list-view .arrow-icon {
    display: block;
    margin-left: auto;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}

.links-section.list-view .link-item:hover .arrow-icon {
    transform: translateX(3px);
    color: var(--gradient-1);
}

/* --- Quick Action Footer --- */
.card-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 30px;
    padding: 15px 10px;
    background: var(--gradient-action);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-left: -30px;
    margin-right: -30px;
    margin-bottom: 0;
}

.footer-action {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
}

.footer-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.footer-action span {
    font-size: 0.75rem;
    font-weight: 500;
}

.footer-action:hover {
    color: white;
    transform: translateY(-2px);
}

.footer-action:hover .footer-icon {
    background: white;
    color: var(--gradient-1);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
}

/* --- Modals & Toasts (Retained formatting, adjusted colors) --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 320px;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--card-border);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-primary);
}

.qr-code-placeholder {
    width: 180px;
    height: 180px;
    background: #f8f9fa;
    margin: 20px auto;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed #d1d5db;
    color: var(--text-tertiary);
}

.qr-code-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #e5e7eb;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: white;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive constraints */
@media (max-width: 400px) {
    .links-section {
        grid-template-columns: 1fr;
    }
}
