/* BioLink System - Public Profile Styles */

/* ========================================
   Profile Page Base
   ======================================== */
.profile-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg);
    padding-top: 130px;
    /* Desktop: content lower to avoid overlap */
    transition: background var(--transition-slow);
}

@media (max-width: 768px) {
    .profile-page {
        padding-top: 130px;
        /* Mobile: content significantly lower */
    }
}

/* Background Types */
.profile-page.bg-solid {
    background: var(--profile-bg, #1a1a2e);
}

.profile-page.bg-gradient {
    background: var(--profile-bg, linear-gradient(135deg, #667eea, #764ba2));
}

.profile-page.bg-image {
    background: var(--profile-bg) center/cover no-repeat fixed;
}

/* Overlay removed per user request for 100% pure image */
.profile-page.bg-image::before {
    display: none !important;
}

/* ========================================
   Profile Container
   ======================================== */
.profile-container {
    width: 100%;
    max-width: 680px;
    position: relative;
    z-index: 1;
}

/* ========================================
   Profile Header
   ======================================== */
.profile-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    margin-bottom: var(--space-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-normal);
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--profile-text, #ffffff);
}

.profile-bio {
    font-size: 1rem;
    color: var(--profile-text, #ffffff);
    opacity: 0.85;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ========================================
   Social Icons
   ======================================== */
.social-icons {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.social-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--profile-text, #ffffff);
    font-size: 1.125rem;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ========================================
   Links List
   ======================================== */
.profile-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.profile-link {
    display: block;
    padding: var(--space-md) var(--space-lg);
    text-align: var(--btn-text-align, center);
    font-weight: 500;
    font-size: 1rem;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

/* Button Styles - VALORES FIXOS para garantir funcionamento */
.profile-link.style-rounded {
    border-radius: 12px !important;
}

.profile-link.style-square {
    border-radius: 0 !important;
}

.profile-link.style-pill {
    border-radius: 50px !important;
}

.profile-link.style-outline {
    background: transparent !important;
    border: 2px solid var(--profile-btn-color, #6366f1);
}

/* Filled styles */
.profile-link:not(.style-outline) {
    background: var(--profile-btn-color, #6366f1);
    color: var(--profile-btn-text, #ffffff);
}

.profile-link.style-outline {
    color: var(--profile-btn-color, #6366f1);
}

/* Hover effects */
.profile-link:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.profile-link:not(.style-outline):hover {
    filter: brightness(1.1);
}

.profile-link.style-outline:hover {
    background: var(--profile-btn-color, #6366f1) !important;
    color: var(--profile-btn-text, #ffffff);
}

/* Link icon */
.profile-link i {
    margin-right: var(--space-sm);
}

/* Highlighted Button Animation */
@keyframes highlight-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }

    50% {
        box-shadow: 0 0 20px 10px rgba(99, 102, 241, 0.3);
    }
}

/* ========================================
   Highlight Animations (Modular)
   ======================================== */

/* 1. Base Highlight Class */
.profile-link.highlighted {
    position: relative;
    z-index: 5;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    filter: brightness(1.1);
}

/* 2. Wiggle (Balanço - Default) */
@keyframes highlight-wiggle {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(-1deg) scale(1.02);
    }

    75% {
        transform: rotate(1deg) scale(1.02);
    }
}

.profile-link.highlight-wiggle {
    animation: highlight-wiggle 2s ease-in-out infinite;
}

/* 3. Glow (Iluminação Elevada) */
@keyframes highlight-glow-pulse {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 10px rgba(255, 255, 255, 0.4) inset;
    }

    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }
}

.profile-link.highlight-glow {
    animation: highlight-glow-pulse 1.5s infinite alternate;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

/* 4. Ripple (Onda - Usando Box Shadow para evitar corte) */
@keyframes highlight-ripple-shadow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    100% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
}

.profile-link.highlight-ripple {
    animation: highlight-ripple-shadow 1.5s infinite ease-out;
}

/* 5. Shimmer (Brilho) */
@keyframes highlight-shimmer-slide {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.profile-link.highlight-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    background-size: 200% 100%;
    animation: highlight-shimmer-slide 2s infinite;
    pointer-events: none;
    border-radius: inherit;
}

/* 6. Pulse Ring (Anel Pulsante) */
@keyframes highlight-pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.profile-link.highlight-pulse-ring {
    animation: highlight-pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* 7. Bounce (Pulo) */
@keyframes highlight-bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }

    60% {
        transform: translateY(-3px);
    }
}

.profile-link.highlight-bounce {
    animation: highlight-bounce 2s infinite;
}

/* 8. Neon Flicker (Neon) */
@keyframes highlight-neon-flicker {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.3);
        filter: brightness(1.2);
    }

    20%,
    24%,
    55% {
        box-shadow: none;
        filter: brightness(1);
    }
}

.profile-link.highlight-neon-flicker {
    animation: highlight-neon-flicker 2.5s infinite alternate;
}

/* Ripple effect */
.profile-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.profile-link:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   Profile Footer - Elegant & Transparent
   ======================================== */
.profile-footer {
    text-align: center;
    margin-top: var(--space-2xl);
    padding: var(--space-lg) var(--space-md);
}

.profile-footer a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--profile-text, #ffffff);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    opacity: 0.7;
}

.profile-footer a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.profile-footer .developed-by {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
    font-weight: 400;
}

.profile-footer .brand-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.profile-footer .brand-icon {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ========================================
   Share Modal
   ======================================== */
.share-modal-content {
    text-align: center;
}

.share-qr {
    display: inline-block;
    padding: var(--space-md);
    background: white;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.share-qr img {
    width: 180px;
    height: 180px;
}

.share-url {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.share-url input {
    flex: 1;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
}

/* ========================================
   Animations
   ======================================== */
.profile-header {
    animation: fadeInDown 0.6s ease;
}

.social-icons {
    animation: fadeInDown 0.6s ease 0.1s backwards;
}

.profile-link {
    animation: fadeInUp 0.5s ease backwards;
}

.profile-link:nth-child(1) {
    animation-delay: 0.1s;
}

.profile-link:nth-child(2) {
    animation-delay: 0.15s;
}

.profile-link:nth-child(3) {
    animation-delay: 0.2s;
}

.profile-link:nth-child(4) {
    animation-delay: 0.25s;
}

.profile-link:nth-child(5) {
    animation-delay: 0.3s;
}

.profile-link:nth-child(6) {
    animation-delay: 0.35s;
}

.profile-link:nth-child(7) {
    animation-delay: 0.4s;
}

.profile-link:nth-child(8) {
    animation-delay: 0.45s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 480px) {
    .profile-page {
        padding: var(--space-md);
        padding-top: var(--space-lg);
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-name {
        font-size: 1.25rem;
    }

    .profile-bio {
        font-size: 0.9375rem;
    }

    .profile-link {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9375rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ========================================
   Font Imports for Profile
   ======================================== */
.font-inter {
    font-family: 'Inter', sans-serif;
}

.font-roboto {
    font-family: 'Roboto', sans-serif;
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

.font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

.font-opensans {
    font-family: 'Open Sans', sans-serif;
}

.font-lato {
    font-family: 'Lato', sans-serif;
}

.font-oswald {
    font-family: 'Oswald', sans-serif;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

/* ========================================
   Button Styles & Shadows - DEFINIÇÃO PRINCIPAL
   ======================================== */
.profile-link.style-rounded {
    border-radius: var(--button-radius, 12px) !important;
}

.profile-link.style-square {
    border-radius: 0 !important;
}

.profile-link.style-pill {
    border-radius: 50px !important;
}

.profile-link.style-outline {
    background: transparent !important;
    border: 2px solid var(--profile-btn-color) !important;
    color: var(--profile-btn-color) !important;
    box-shadow: none;
    border-radius: var(--button-radius, 12px) !important;
}

.profile-link.style-outline:hover {
    background: var(--profile-btn-color);
    color: var(--profile-btn-text);
    transform: translateY(-2px);
    border-color: var(--profile-btn-color);
}

/* Shadow styles - corresponde aos valores do dashboard */
/* Shadow styles - corresponde aos valores do dashboard */
.profile-link.shadow-none {
    box-shadow: none;
}

.profile-link.shadow-subtle,
.profile-link.shadow-soft {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-link.shadow-strong {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.profile-link.shadow-hard {
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

/* Ensure outline + shadow combinations work correctly */
.profile-link.style-outline.shadow-hard {
    box-shadow: 4px 4px 0 var(--profile-btn-color);
}

/* ========================================
   Bento Grid & Rich Media
   ======================================== */
.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    width: 100%;
}

.profile-link {
    width: 100%;
    /* Default to full width */
    margin-bottom: 0;
    /* Override previous margin */
}

/* Width Modifiers */
.profile-link.w-half {
    width: calc(50% - (var(--space-md) / 2));
    flex-grow: 1;
}

.profile-link.w-full {
    width: 100%;
}

/* Video Block */
.video-block {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    aspect-ratio: 16/9;
    margin-bottom: 0;
}

.video-block iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1 !important;
}

/* Banner/Image Block - Same proportions as video (16:9) */
.banner-block {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.banner-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.banner-block img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Banner half-width */
.banner-block.w-half {
    width: calc(50% - (var(--space-md) / 2));
    flex-grow: 1;
}

/* Video half-width */
.video-block.w-half {
    width: calc(50% - (var(--space-md) / 2));
    flex-grow: 1;
}

/* 
   SAFETY OVERRIDE: 
   If a background image is active, FORCE disable any CSS animations/gradients 
   that might accidentally be present. This ensures the user's image is 100% visible.
*/
.profile-page.bg-image[class*="bg-anim-"] {
    background-image: var(--profile-bg) !important;
    animation: none !important;
}

.profile-page.bg-image[class*="bg-anim-"]::before,
.profile-page.bg-image[class*="bg-anim-"]::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    animation: none !important;
}