/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variáveis de cores */
:root {
    --primary-color: #000;
    --secondary-color: #1a1a1a;
    --accent-color: #e50914;
    --text-color: #fff;
    --text-muted: #808080;
}

/* Body */
body {
    background-color: var(--primary-color);
    color: var(--text-color);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.6s ease, color 0.6s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: background 0.6s ease, opacity 0.6s ease;
}

h1 {
    margin: 0;
    padding: 20px 0 10px;
    text-align: center;
}

/* Header */
header {
    position: relative;
    background: transparent;
    padding: 8px 40px 8px 80px;
    border-bottom: none;
}

.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1800px;
    margin: 10px auto;
    position: relative;
    gap: 20px;
}

.logo {
    width: 92px;
    height: auto;
    cursor: pointer;
}


#theme-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid #fff;
    background-color: rgba(255, 255, 255, 0.17);
    color: #fff;
    padding: 8px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.35);
}

/* Tema Claro */
.light-mode {
    --primary-color: #f9f7f7;
    --secondary-color: #e4e4e4;
    --accent-color: #e50914;
    --text-color: #111;
    --text-muted: #5a5a5a;
    background-color: #f9f7f7;
}

.light-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #f9f7f7, #ffbeb7);
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
    transition: background 0.6s ease, opacity 0.6s ease;
}

.dark-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #131313, #371612);
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
    transition: background 0.6s ease, opacity 0.6s ease;
}

.light-mode header {
    border-bottom: 1px solid #ccc;
}

.light-mode #theme-toggle {
    color: #111;
    border-color: #CCCCCC;
    background-color: rgba(255, 255, 255, 0.85);
}

.light-mode #theme-toggle:hover {
    background-color: rgba(255, 255, 255, 1);
}

/* Tema Escuro */
.dark-mode {
    --primary-color: #131313;
    --secondary-color: #1a1a1a;
    --accent-color: #e50914;
    --text-color: #fff;
    --text-muted: #808080;
    background-color: #131313;
}

.dark-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #131313, #371612);
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
}

.dark-mode header {
    border-bottom: 1px solid #120f0f;
}

.dark-mode #theme-toggle {
    color: #fff;
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

.dark-mode #theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: none;
    color: var(--text-color);
    text-align: center;
    margin: 0;
    padding-top: 18px;
    padding-bottom: 8px;
}

/* Main */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 20px 20px 20px;
}

.profile-selection {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 28px 20px 26px;
}

/* Profiles List */
.profiles {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

/* Profile Item */
.profile {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile:hover {
    transform: scale(1.05);
}

/* Profile Link */
.profile a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: inherit;
}

/* Profile Image */
.profile img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(229, 9, 20, 0);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.profile:hover img {
    border-color: rgba(229, 9, 20, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.15);
}

.profile-add .add-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #e50914;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 3rem;
    font-weight: 700;
    box-shadow: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.light-mode .profile-add .add-avatar {
    background-color: #dadada;
    color: #000;
}

.dark-mode .profile-add .add-avatar {
    background-color: #261d1d;
    color: #000;
}

.profile-add:hover .add-avatar {
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.15);
    transform: scale(1.05);
}

/* Profile Name */
.profile span {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.profile-add .add-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #e50914;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
}

.profile-add a {
    text-decoration: none;
    color: inherit;
}

.profile-add:hover .add-avatar {
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.15);
    transform: scale(1.05);
}
.profile:hover span {
    color: var(--accent-color);
}

/* Manage Profiles Button */
.manage-profiles-btn {
    display: block;
    margin: 28px auto 0;
    padding: 10px 20px;
    background-color: transparent;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.manage-profiles-btn:hover {
    background-color: var(--text-color);
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 12px 18px;
    }

    header h1 {
        font-size: 1.5rem;
        padding-top: 5px;
    }

    .logo {
        font-size: 1.3rem;
    }

    main {
        padding: 15px 20px;
    }

    .profiles {
        gap: 15px;
    }

    .profile img {
        width: 120px;
        height: 120px;
        border-radius: 50%;
    }

    .profile span {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 14px;
    }

    header h1 {
        font-size: 1.2rem;
        padding-top: 5px;
    }

    .logo {
        font-size: 1rem;
    }

    main {
        padding: 10px 10px;
    }

    .profiles {
        gap: 10px;
    }

    .profile img {
        width: 90px;
        height: 90px;
        border-radius: 50%;
    }

    .profile span {
        font-size: 0.85rem;
    }
}
