/* 1. Reset e Variáveis */
:root {
    --bg-dark: #0a0a0a;
    --accent-red: #e50914;
    --text-gray: #a0a0a0;
    --text-light: #ffffff;
    --font-main: 'Open Sans', sans-serif;
    --font-title: 'Cinzel', serif; /* Fonte com toque místico */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    /* Efeito de fumaça/névoa mística no fundo */
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(40, 0, 0, 0.3), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 0, 40, 0.2), transparent 40%);
    color: var(--text-light);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* 2. Header e Logo */
.site-header {
    width: 100%;
    padding: 2rem 4%;
    text-align: left;
}

.site-logo {
    font-family: var(--font-title);
    color: var(--accent-red);
    font-size: 2rem;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(229, 9, 20, 0.6);
}

/* 3. Container Principal */
.profile-picker-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 2rem;
}

.profile-title {
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    margin-bottom: 2.5rem;
    text-align: center;
    letter-spacing: 2px; /* Um leve espaçamento entre letras para o toque místico */
    font-weight: 400;
}

/* 4. Lista de Perfis (Onde resolvemos o alinhamento) */
.profiles-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centraliza horizontalmente sem recuos fantasmas */
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
}

.profile-item {
    flex: 0 1 200px; /* Base de 200px, mas pode encolher */
    max-width: 200px;
}

.profile-link {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
}

.profile-figure {
    position: relative;
    transition: var(--transition);
}

.profile-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    border: 3px solid transparent;
    transition: var(--transition);
}

.profile-name {
    margin-top: 1rem;
    color: var(--text-gray);
    font-size: 1.2rem;
    transition: var(--transition);
}

/* 5. Efeitos de Hover (Místicos) */
.profile-link:hover .profile-avatar {
    border-color: var(--text-light);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

.profile-link:hover .profile-name {
    color: var(--text-light);
}

/* Efeito de foco nos outros itens (Netflix Style) */
.profiles-list:hover .profile-item:not(:hover) {
    opacity: 0.5;
    filter: grayscale(0.5);
}

/* 6. Botão de Gerenciar */
.profile-footer {
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.manage-profiles-button {
    background: transparent;
    color: var(--text-gray);
    border: 1px solid var(--text-gray);
    padding: 0.6rem 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
}

.manage-profiles-button:hover {
    color: var(--text-light);
    border-color: var(--text-light);
    background: rgba(255, 255, 255, 0.1);
}

/* 7. Responsividade Extra */

/* Celulares pequenos (perfil um abaixo do outro se necessário) */
@media (max-width: 480px) {
    .profiles-list {
        gap: 1.5rem;
    }
    .profile-item {
        flex: 0 1 140px; /* Diminui os cards para caberem 2 por linha */
    }
    .profile-title {
        font-size: 1.6rem;
    }
}

/* Tablets */
@media (min-width: 481px) and (max-width: 1024px) {
    .profile-item {
        flex: 0 1 160px;
    }
}