:root {
    --color-primary: #4B69FD;
    --color-secondary: #FFF9EB;
    --color-tertiary: #C4C4C4;
    --color-button: #fe652b;
    --color-button-hover: #e55720;
    --color-text: #444444;
    --color-white: #FFFFFF;
}

/* Estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:not(input) {
    -webkit-user-select: none;
    /* Chrome all / Safari all */
    -moz-user-select: none;
    /* Firefox all */
    -ms-user-select: none;
    /* IE 10+ */
    user-select: none;
}

body {
    height: 120vh;
    width: 100vw;
    background-color: var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: hidden;
    /* Ensure vertical scrolling is available */
    scrollbar-width: none;
    /* For Firefox */
}

body::-webkit-scrollbar {
    display: none;
    /* For Chrome, Safari, and Edge */
}

.main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* Banner */
.header-banner {
    /* position: relative; */
    /* padding-top: 70px; */
    min-height: 300px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    font-size: 20px;
}

#containerHeaderContent {
    /* background-color: red; */
    height: 100px;
    width: 80%;
    min-width: 320px;
    max-width: 600px;
    position: relative;
}

#headerImage {
    position: absolute;
    right: 0;
    bottom: 0;
    transform: translate(30%, 10%);
}

/* Backdrop do Modal */
.backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 998;
}

/* Container do Modal */
#containerModal {
    display: none;
    font-family: "Inter", sans-serif;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 999;
}

/* Conteúdo do Modal */
#containerWarningMessage {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    font-size: 22px;
    font-weight: 400;
    min-height: 200px;
    width: 500px;
    background: linear-gradient(180deg, rgba(238, 238, 238, 1) 0%, rgba(204, 204, 204, 1) 100%);
    border-radius: 16px;
    outline: 2px solid #444;
}

/* Título da mensagem */
#warningTitle {
    text-align: center;
    font-weight: 700;
}

/* Mensagem do Erro */
#missingField {
    max-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 3px;
    font-size: 18px;
    font-weight: 400;
}

/* Separador para modal com dois subtítulos */
#decorativeSeparator {
    margin: 10px auto;
    width: 90%;
    border: 1px solid black;
}

/* Container do exibidor de nome do amigo */
#containerFriendName {
    display: none;
    flex-direction: column;
    place-content: center;
}

/* Botão para exibir o nome do amigo */
#displayFriendNameButton {
    display: block;
    margin: 0 auto;
    margin-top: 20px
}

/* Botão para fechar o modal */
#warningExitButton {
    display: none;
    width: 130px;
    border-radius: 16px;
}

/* Container dos botões de confirmação */
#containerConfirmButtons {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

#warningExitButton {
    height: 46px;
    padding: 0px;
}

#warningExitButton:hover {
    cursor: pointer;
    opacity: 0.9;
    background: linear-gradient(360deg, rgba(238, 238, 238, 1) 0%, rgba(204, 204, 204, 1) 100%);
}

#confirmButton:hover {
    cursor: pointer;
    opacity: 0.9;
    background: linear-gradient(360deg, rgba(238, 238, 238, 1) 0%, rgba(204, 204, 204, 1) 100%);
}

#cancelButton:hover {
    cursor: pointer;
    opacity: 0.9;
    background: linear-gradient(360deg, rgba(238, 238, 238, 1) 0%, rgba(204, 204, 204, 1) 100%);
}

/* Seção de entrada */
.containerDrawInterface {
    flex: 60%;
    background-color: var(--color-secondary);
    border: 1px solid #000;
    border-radius: 64px 64px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    width: 100%;
}

/* Títulos */
.main-title {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-30%, -20%);
    font-family: "Merriweather", serif;
    font-weight: 900;
    font-style: italic;
    color: var(--color-white);
}

.section-title {
    font-family: "Inter", serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 20px 0 6px;
    text-align: center;
}

/* Contêineres de entrada e botão */
.input-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
}

.input-name {
    width: 80%;
    padding: 10px;
    border: 2px solid #000;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
}

.button-container {
    display: none;
    padding: 0;
    gap: 30px;
    width: fit-content;
    justify-content: center;
}

/* Estilos de entrada de texto */
.input-title {
    flex: 1;
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #333;
    border-right: none;
    border-radius: 25px 0 0 25px;
    font-family: "Merriweather", serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Estilos de botão */
button {
    padding: 15px 30px;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    border: 2px solid #000;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.button-add {
    width: 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-tertiary);
    color: #000;
    border-radius: 0 25px 25px 0;
}

.button-add:hover {
    background-color: #a1a1a1;
}

/* Listas */
ul {
    list-style-type: none;
    color: var(--color-text);
    font-family: "Inter", sans-serif;
    font-size: 18px;
    margin: 25px 0 20px;
}

.result-list {
    margin-top: 15px;
    color: #05DF05;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}

/* Botão de sortear título */
.button-draw {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-width: 230px;
    width: 100%;
    padding: 10px;
    color: var(--color-white);
    background-color: var(--color-button);
    font-size: 16px;
}

.button-cancel-draw {
    display: none;
}

.button-draw img {
    width: 30px;
}

.button-draw:hover {
    background-color: var(--color-button-hover);
}

#listaAmigos {
    display: grid;
    grid-template-rows: repeat(auto-fill, minmax(25px, 1fr));
    grid-auto-flow: column;
    gap: 10px 20px;
    max-width: 100%;
    max-height: 170px;
    overflow-y: visible;
    padding-bottom: 10px;
}

#listaAmigos::-webkit-scrollbar {
    height: 12px;
}

#listaAmigos::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

#listaAmigos::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

#listaAmigos::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.listItem {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 70px;
    max-width: 135px;
    overflow-wrap: break-word;
    overflow: visible;
}

.buttonDestructive {
    height: 16px;
    width: 14px;
    padding: 1px;
    cursor: pointer;
}

.buttonDestructive:hover {
    opacity: 0.8;
}

.iconRightArrow {
    display: none;
    width: 16px;
    padding: 1px;
}

#containerListaAmigos {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 25px 0px 10px;
    width: 90%;
    max-width: 1500px;
}

#containerLimparLista {
    position: absolute;
    left: 10%;
    top: -5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #000;
    font-family: "Inter", sans-serif;
    text-align: center;
    font-weight: 700;
}

#limparLista {
    height: 22px;
    width: 19px;
    cursor: pointer;
}

#limparLista:hover {
    opacity: 0.8;
}

#tituloListaAmigos {
    display: block;
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 700;
}

#containerInput {
    width: 90%;
    min-width: 320px;
    max-width: 600px;
}

#containerTitle {
    display: block;
    justify-items: center;
    align-items: flex-end;
    grid-template-columns: 75% 25%;
}

#containerContadorDeAmigos {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90px;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    font-family: "Inter", sans-serif;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

#contadorDeAmigos {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 32px;
    min-width: 45px;
    border: 2px solid #000;
    background-color: #FFFDFB;
    border-radius: 12px;
}

#maxCharCountStatement {
    color: transparent;
    padding: 4px 0 0 16px;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 10px;
}

#friendName {
    font-family: "Inter", sans-serif;
    /* font-weight: 700; */
    text-align: center;
}

.minorButton {
    padding: 0px;
    border: none;
    width: 130px;
    height: 30px;
    border-radius: 6px;
    font-size: 12px;
}

.darkButton {
    /* background: rgba(140, 140, 140, 1); */
    background: linear-gradient(180deg, rgba(185, 185, 185, 1) 0%, rgba(140, 140, 140, 1) 100%);
}

.darkButton:hover {
    background: linear-gradient(180deg, rgba(140, 140, 140, 0.7) 100%, rgba(185, 185, 185, 1) 0%);
}

@media (max-width: 768px) {
    .main-title {
        font-size: 18px;
        transform: translate(15%, 100%);
    }

    #headerImage {
        transform: translate(0, 10%);
        width: 200px;
    }

    .headerTitle {
        font-size: 20px;
    }

    .section-title {
        font-size: 16px;
    }

    #containerLimparLista {
        left: -5%;
        font-size: 8px;
    }

    #limparLista {
        height: 16px;
        width: 14px;
    }

    #tituloListaAmigos {
        padding-top: 18px;
        font-size: 14px;
    }

    ul {
        margin: 15px 0 5px;
    }

    #listaAmigos {
        font-size: 14px;
        height: fit-content;
        gap: 5px 10px;
    }

    #listaAmigos::-webkit-scrollbar {
        height: 10px;
    }

    .buttonDestructive {
        height: 14px;
        width: 12px;
    }

    #containerContadorDeAmigos {
        width: 50px;
        padding: 3px;
        font-size: 10px;
    }

    #contadorDeAmigos {
        min-height: 25px;
        min-width: 33px;
        border: 1px solid #000;
        background-color: #FFFDFB;
        border-radius: 10px;
    }

    .input-name {
        font-size: 12px;
    }

    .button-add {
        font-size: 10px;
    }

    .button-container {
        gap: 15px;
    }

    .button-draw {
        min-width: 140px;
        gap: 6px;
        font-size: 11px;
        border-radius: 16px;
    }

    .button-draw img {
        width: 20px;
    }

    #containerWarningMessage {
        max-width: 300px;
        min-height: 100px;
    }

    #containerWarningMessage {
        width: 250px;
        min-height: 160px;
        font-size: 18px;
    }

    #warningTitle {
        font-size: 18px;
    }

    #missingField {
        font-size: 16px;
    }

    #warningExitButton {
        height: 40px;
        width: 115px;
    }

    .majorButton {
        width: 180px;
        height: 40px;
        border-radius: 10px;
        font-size: 12px;
    }

    .minorButton {
        width: 95px;
        height: 30px;
        border-radius: 6px;
        font-size: 12px;
    }
}

@media(min-width: 500px) and (max-width: 768px) {
    .main-title {
        transform: translate(-10%, -30%);
        font-size: 26px;
    }

    #headerImage {
        width: 320px;
        transform: translate(10%, 10%);
    }

    #containerLimparLista {
        left: 0;
    }

    .button-container {
        gap: 20px;
    }

    .button-draw {
        min-width: 180px;
        gap: 8px;
        font-size: 13px;
        border-radius: 16px;
    }

    .button-draw img {
        width: 20px;
    }
}

@media(min-width: 768px) and (max-width: 870px) {
    .main-title {
        font-size: 36px;
        transform: translate(0%, -20%);
    }

    #headerImage {
        width: 350px;
        transform: translate(20%, 10%);
    }
}

@media(min-width: 1300px) {
    #containerLimparLista {
        left: 15%;
        top: -30%;
    }
}