:root {
    --color-primary: #4B69FD;
    --color-secondary: #FFF9EB;
    --color-tertiary: #C4C4C4;
    --color-tertiary-hover: #c4c4c480;
    --color-button: #fe652b;
    --color-button-hover: #e55720;
    --color-text: #444444;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-sorteado: #05DF05;
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    background-color: var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(14px, 2vw, 18px);
}

.main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* Banner */
.header-banner {
    flex: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0 0;
    gap: 40px; /*espacio en la imagen con el titulo*/
}

/* Sección de entrada */
.input-section {
    flex: 60%;
    background-color: var(--color-secondary);
    border: 1px solid var(--color-black);
    border-radius: 64px 64px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    width: 100%;
}

/* Títulos */
.main-title {
    font-size: clamp(24px, 5vw, 48px);
    font-family: "Merriweather", serif;
    font-weight: 900;
    font-style: italic;
    color: var(--color-white);
    text-align: center;
}

.section-title {
    font-family: "Inter", serif;
    font-size: clamp(18px, 4vw, 36px);
    font-weight: 700;
    color: var(--color-primary);
    margin: 10px 0;
    text-align: center;
}

/* Contenedores de entrada y botón */
.input-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    margin-top: 20px;
}

.input-name {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--color-black);
    border-radius: 25px 0 0 25px;
    font-size: clamp(14px, 2vw, 16px);
}

.button-container {
    width: 300px;
    justify-content: center;
}

/*agrega boton de nuevo juego*/
.button-container2 {
    justify-content: center;
    display: flex;
    margin-top: 16px;
}

/*boton nuevo juego*/
#botonReiniciar {
    background-color: var(--color-tertiary-hover);
    color: var(--color-text);
    border: 2px solid var(--color-black);
    margin-top: 16px;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 4px 8px var(--color-black);
}

#botonReiniciar:hover {
    background-color: var(--color-tertiary);
}

/* Estilos de entrada de texto */
.input-title {
    flex: 1;
    padding: 10px 15px;
    font-size: clamp(14px, 2vw, 16px);
    border: 2px solid var(--color-text);
    border-right: none;
    border-radius: 25px 0 0 25px;
    font-family: "Merriweather", serif;
    box-shadow: 0 4px 8px var(--color-black);
}

/* Estilos de botón */
button {
    padding: 15px 30px;
    font-family: "Inter", sans-serif;
    font-size: clamp(14px, 2vw, 16px);
    border: 2px solid var(--color-black);
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.button-add {
    background-color: var(--color-tertiary);
    color: var(--color-text);
    border-radius: 0 25px 25px 0;
}

.button-add:hover {
    background-color: var(--color-tertiary);
}

/* Listas */
ul {
    list-style-type: none;
    color: var(--color-text);
    font-family: "Inter", sans-serif;
    font-size: clamp(16px, 2vw, 18px);
    margin: 20px 0;
}

.result-list {
    margin-top: 15px;
    color: var(--color-sorteado);
    font-size: clamp(16px, 3vw, 22px);
    font-weight: bold;
    text-align: center;
}

/* Botón de sortear título */
.button-draw {
    display: flex;
    align-items: center;
    width: auto;
    padding: 10px 40px;
    color: var(--color-white);
    background-color: var(--color-button);
    font-size: clamp(14px, 2vw, 16px);
}

.button-draw img {
    margin-right: 40px;
}

.button-draw:hover {
    background-color: var(--color-button-hover);
}

.name-list {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

/*contenedor de caja amigo*/
.amigo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 250px;
    margin: 6px auto;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 6px;
}

/*NOMBRE*/
.amigo-nombre {
    flex: 1;
    text-align: left;
    word-break: break-word;
}

/*boton eliminar*/
.button-delete {
    background-color: var(--color-button);
    border: none;
    font-size: 0.7rem;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; /*se mantiene alineado el boton, aunque el nombre sea largo*/
}

.button-delete:hover {
    background-color: var(--color-button-hover);
}


/* RESPONSIVIDAD */

/* Tablets */
@media (max-width: 1024px) {
    .input-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .input-title {
        border-radius: 25px;
        border-right: 2px solid #333;
        margin-bottom: 10px;
        width: 100%;
    }
    .button-add {
        border-radius: 25px;
        width: 100%;
    }
    .button-container {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

/* Celulares */
@media (max-width: 600px) {
    body {
        padding: 10px;
        height: auto;
    }
    .header-banner {
        flex-direction: column;
        gap: 20px;
        padding: 20px 0;
        text-align: center;
    }
    .input-section {
        border-radius: 30px 30px 0 0;
        padding: 15px;
    }
    .input-wrapper {
        flex-direction: column;
        width: 100%;
    }
    .input-title,
    .button-add {
        width: 100%;
        border-radius: 25px;
    }
    .button-draw {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 15px;
    }
    .button-draw img {
        margin: 0 0 10px 0;
        justify-content: center;
        text-align: center;
   
    }
    ul {
        text-align: center;
    }
}
