/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    background-clip: border-box;
}

/* Fundo preto com opacidade sobre o fundo principal */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

/* Seção do perfil */
.profile-section {
    text-align: center;
    margin-bottom: 40px;
}

/* Conteúdo principal */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.avatar i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.7);
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.profile-bio {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Seção de links */
.links-section {
    margin-bottom: 40px;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.link-button i {
    margin-right: 12px;
    font-size: 18px;
}

.link-button span {
    flex: 1;
    text-align: center;
}

/* Seção de redes sociais */
.social-section {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 20px;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    position: relative;
    z-index: 1;
}

.footer p {
    background: transparent !important;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

/* Responsividade */
@media (max-width: 768px) {
    html, body {
        height: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto;
    }
    
    body {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        width: 100% !important;
        position: relative;
        background-clip: border-box !important;
        background-origin: border-box !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
    
    .container {
        padding: 20px 15px;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
        z-index: 1;
        background: transparent;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
    
    .profile-name {
        font-size: 24px;
    }
    
    .profile-bio {
        font-size: 15px;
    }
    
    .link-button {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .avatar i {
        font-size: 40px;
    }
    
    .footer {
        background: transparent !important;
        margin-top: 15px;
        padding-bottom: 10px;
    }
    
    .footer p {
        background: transparent !important;
        color: rgba(255, 255, 255, 0.7) !important;
        font-size: 13px;
    }
    
    /* Garantir que não haja espaços vazios */
    * {
        box-sizing: border-box;
    }
    
    html, body {
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
    }
    
    /* Forçar altura completa no mobile */
    body {
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
    }
}

/* iPhone e dispositivos com notch */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        body {
            min-height: 100vh !important;
            min-height: -webkit-fill-available !important;
            height: 100vh !important;
            height: -webkit-fill-available !important;
            background-size: cover !important;
            background-position: center center !important;
            background-repeat: no-repeat !important;
        }
        
        .container {
            min-height: 100vh !important;
            min-height: -webkit-fill-available !important;
        }
    }
}

/* iPhone específico */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
    body {
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
    
    .container {
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
}

/* Desktop - fundo fixo apenas quando não há scroll */
@media (min-width: 769px) {
    body {
        background-attachment: fixed;
    }
    
    /* Quando há scroll, remover o fundo fixo */
    body.scrolled {
        background-attachment: scroll;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px 0;
    }
    
    .profile-name {
        font-size: 22px;
    }
    
    .link-button {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-section,
.links-section,
.social-section {
    animation: fadeInUp 0.6s ease-out;
}

.links-section {
    animation-delay: 0.2s;
}

.social-section {
    animation-delay: 0.4s;
}

/* Estilos personalizados baseados nas configurações do perfil */
.profile-section,
.links-section,
.social-section,
.footer {
    color: var(--text-color, #333);
}

/* Removido background padrão do body para permitir configuração personalizada */

/* Estilos de botão personalizados */
.link-button.rounded {
    border-radius: 12px;
}

.link-button.square {
    border-radius: 4px;
}

.link-button.pill {
    border-radius: 50px;
}

/* Estilo padrão se nenhum for especificado */
.link-button:not(.rounded):not(.square):not(.pill) {
    border-radius: 12px;
}

/* Garantir que o fundo cubra 100% da tela */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    min-height: 100vh !important;
    width: 100% !important;
    position: relative;
    background-clip: border-box !important;
}

/* Fundo preto com opacidade */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
    pointer-events: none;
}

/* Mobile - overlay ajustado */
@media (max-width: 768px) {
    body::before {
        position: fixed;
        width: 100vw;
        height: 100vh;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.4);
        z-index: -1;
        pointer-events: none;
    }
}

/* iPhone - overlay ajustado */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        body::before {
            height: 100vh !important;
            height: -webkit-fill-available !important;
            min-height: 100vh !important;
            min-height: -webkit-fill-available !important;
        }
    }
}
