:root {
    --cor-fundo-pagina: #f4f4f8;
    --cor-botao: #0055A4;
    --cor-texto-botao: #ffffff;
    --cor-texto-perfil: #121212;
    --fonte-principal: 'Montserrat', sans-serif;
    --sombra-padrao: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--fonte-principal);
    background-color: var(--cor-fundo-pagina);
    color: var(--cor-texto-perfil);
    line-height: 1.6;
    transition: background-color 0.3s;
}

.page-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.profile-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.profile-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: var(--sombra-padrao);
    border: 3px solid var(--cor-botao);
}

#profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cor-texto-perfil);
}

#bio-description {
    font-size: 1rem;
    color: var(--cor-texto-perfil);
    opacity: 0.9;
}

main { flex-grow: 1; }

.links-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.link-button-wrapper {
    position: relative;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 8px;
    background-color: var(--cor-botao);
    color: var(--cor-texto-botao);
    border: 2px solid var(--cor-botao);
    box-shadow: var(--sombra-padrao);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
}

.link-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.link-button.link-oculto {
    opacity: 0.5;
    background-color: #ccc;
    border-color: #ccc;
}

/* Estilos para arrastar e soltar */
.drag-handle {
    cursor: grab;
    color: white;
    opacity: 0.7;
}
.drag-handle:active {
    cursor: grabbing;
}
.sortable-ghost {
    opacity: 0.4;
    background-color: #c8ebfb;
    border-style: dashed;
}

footer {
    text-align: center;
    padding: 2rem 0 1rem 0;
    font-size: 0.9rem;
    color: var(--cor-texto-perfil);
    opacity: 0.7;
}

/* --- PAINÉIS LATERAIS E ADMIN --- */
.fab-container { position: fixed; bottom: 25px; right: 25px; display: flex; flex-direction: column-reverse; gap: 15px; z-index: 1000; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 1001; opacity: 0; visibility: hidden; transition: opacity 0.3s; }
.side-panel { position: fixed; top: 0; right: -100%; width: 100%; max-width: 400px; height: 100vh; background-color: white; color: #333; z-index: 1002; padding: 2rem; box-shadow: -5px 0 15px rgba(0,0,0,0.1); transition: right 0.4s; overflow-y: auto; }
.fab-btn { width: 60px; height: 60px; color: white; border: none; border-radius: 50%; box-shadow: var(--sombra-padrao); font-size: 1.5rem; cursor: pointer; display: flex; justify-content: center; align-items: center; }
.settings-fab { background-color: #6c757d; display: none; }
.admin-fab, .add-btn { background-color: #0055A4; }
.save-edit-btn { background-color: #28a745; }
.overlay.active { opacity: 1; visibility: visible; }
.side-panel.active { right: 0; }
.close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 2rem; color: #333; cursor: pointer; }
.side-panel h3 { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px; }
form label { font-weight: 500; margin-bottom: 0.5rem; font-size: 0.9rem; display: block; text-align: left; }
form input, form textarea, form select { padding: 0.8rem; border: 1px solid #ddd; border-radius: 5px; margin-bottom: 1.5rem; width: 100%; }
form textarea { resize: vertical; }
.side-panel input[type="color"] { padding: 0; height: 40px; background: none; border: none; }
form button { padding: 0.8rem 1.5rem; border: none; border-radius: 50px; cursor: pointer; font-weight: 500; color: white; background-color: #0055A4; width: 100%; }
.btn-resetar { background-color: #6c757d; margin-top: 10px; }
.side-panel hr { border: none; border-top: 1px solid #eee; margin: 2rem 0; }

#loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.9); display: flex; justify-content: center; align-items: center; z-index: 2000; }
.spinner { border: 8px solid #f3f3f3; border-top: 8px solid var(--cor-botao); border-radius: 50%; width: 60px; height: 60px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.link-edit-controls { 
    position: absolute; 
    top: 50%; 
    right: -50px; 
    transform: translateY(-50%); 
    z-index: 5; 
    display: none; 
    gap: 8px;
    background-color: rgba(0,0,0,0.4);
    padding: 5px 8px;
    border-radius: 20px;
}
.link-button-wrapper.edit-mode .link-edit-controls { display: flex; align-items: center; }
.link-edit-btn { background: none; color: white; border: none; width: 25px; height: 25px; font-size: 0.9rem; cursor: pointer; display: flex; justify-content: center; align-items: center; }

#password-prompt-side { text-align: left; }
#password-prompt-side h3, #password-prompt-side p { text-align: center; }
#password-prompt-side input { width: 100%; padding: 0.8rem; border: 1px solid #ccc; border-radius: 5px; margin-bottom: 1rem; font-size: 1rem; }
#btn-confirmar-senha-side { width: 100%; padding: 0.9rem; font-size: 1rem; font-weight: bold; }
#mensagem-erro-side { text-align: center; margin-top: 1rem; color: #dc3545; }