:root {
    --color-primary: #4B69FD;
    --color-secondary: #FFF9EB;
    --color-tertiary: #C4C4C4;
    --color-button: #fe652b;
    --color-button-hover: #e55720;
    --color-text: #444444;
    --color-white: #FFFFFF;
}

/* 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;
    padding: 10px; /* Añadido para móviles */
}

.main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 20px; /* Añadido para móviles */
}

/* Banner */
.header-banner {
    flex: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0 0;
    flex-direction: column; /* Añadido para móviles */
    text-align: center; /* Añadido para móviles */
}

.header-banner img {
    width: 100%; /* Añadido para móviles */
    max-width: 500px; /* Añadido para móviles */
    height: auto; /* Añadido para móviles */
    margin-top: 20px; /* Añadido para móviles */
}

/* Sección de entrada */
.input-section {
    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 {
    font-size: 48px;
    font-family: "Merriweather", serif;
    font-weight: 900;
    font-style: italic;
    color: var(--color-white);
}

.section-title {
    font-family: "Inter", serif;
    font-size: 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 #000;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 12px; /* Espaciado uniforme entre botones */
    flex-wrap: wrap; /* Permitir que los botones se envuelvan en móviles */
}

/* 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ón */
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 {
    background-color: var(--color-tertiary);
    color: var(--color-text);
    border-radius: 0 25px 25px 0;
}

.button-add:hover {
    background-color: #a1a1a1;
}

/* Listas */
ul {
    list-style-type: disc;
    color: var(--color-text);
    font-family: "Inter", sans-serif;
    font-size: 18px;
    margin: 20px 0;
}

.result-list {
    margin-top: 15px;
    color: #05DF05;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}

/* Estilos para los botones "Sortear" y "Reiniciar" */
.button-draw, .button-reset {
    width: 200px; /* Mismo ancho para ambos botones */
    padding: 15px 20px; /* Mismo padding para ambos botones */
    font-size: 16px; /* Mismo tamaño de fuente */
    font-family: "Inter", sans-serif;
    border: 2px solid #000;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espacio entre el ícono y el texto */
    transition: background-color 0.3s ease-in-out;
}

/* Estilo específico para el botón "Sortear" */
.button-draw {
    background-color: var(--color-button); /* Color naranja */
    color: var(--color-white); /* Texto blanco */
}

.button-draw:hover {
    background-color: var(--color-button-hover); /* Color naranja más oscuro al pasar el mouse */
}

/* Estilo específico para el botón "Reiniciar" */
.button-reset {
    background-color: #f5a623; /* Color naranja cuando está habilitado */
    color: white;
}

/* Estilo cuando el botón "Reiniciar" está deshabilitado */
.button-reset:disabled {
    background-color: #d9d9d9; /* Color gris cuando está deshabilitado */
    color: #8c8c8c; /* Texto más tenue */
    cursor: not-allowed; /* Cambia el cursor a "no permitido" */
    box-shadow: none; /* Sin sombra cuando está deshabilitado */
}

/* Hover cuando el botón "Reiniciar" está habilitado */
.button-reset:hover:not(:disabled) {
    background-color: #e5941a; /* Color naranja más oscuro al pasar el mouse */
}

/* Estilos del botón de eliminar (X) */
.boton-eliminar {
    background-color: transparent; /* Sin fondo */
    color: #888; /* Gris sutil */
    border: none; /* Sin bordes */
    font-size: 15px; /* Tamaño adecuado */
    cursor: pointer;
    padding: 0 10px; /* Aumentamos el padding horizontal para más espacio */
    display: inline-block;
    transition: color 0.3s ease-in-out;
    margin-left: 10px; /* Añadimos margen a la izquierda para separar del nombre */
}

/* Efecto hover para el botón de eliminar */
.boton-eliminar:hover {
    color: #444; /* Un gris más oscuro al pasar el mouse */
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-content {
        height: auto;
        padding: 20px;
    }

    .header-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }

    .header-banner img {
        width: 80%;
        max-width: 300px;
        margin-top: 20px;
    }

    .input-section {
        border-radius: 32px 32px 0 0;
        padding: 15px;
    }

    .main-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 24px;
    }

    .input-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .input-name {
        width: 90%;
        border-radius: 25px;
        margin-bottom: 10px;
    }

    .button-add {
        width: 90%;
        border-radius: 25px;
    }

    .button-container {
        flex-direction: column;
        align-items: center;
    }

    .button-draw, .button-reset {
        width: 100%; /* Ocupar todo el ancho en móviles */
        margin-bottom: 10px; /* Espacio entre botones en móviles */
    }

    ul {
        padding-left: 20px;
    }

    .result-list {
        font-size: 18px;
    }
}

/* Estilos para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        padding: 30px;
    }

    .header-banner img {
        width: 60%;
        max-width: 400px;
    }

    .input-section {
        border-radius: 48px 48px 0 0;
        padding: 20px;
    }

    .main-title {
        font-size: 42px;
    }

    .section-title {
        font-size: 30px;
    }

    .input-name {
        width: 80%;
    }

    .button-add {
        width: 80%;
    }

    .button-draw, .button-reset {
        width: 80%;
    }
}

/* Estilos para pantallas muy pequeñas */
@media (max-width: 480px) {
    .main-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 20px;
    }

    .input-name, .button-add, .button-draw, .button-reset {
        width: 100%;
    }
}

/* Estilos para la alerta personalizada */
.custom-alert {
    display: none; /* Ocultar por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Asegurar que esté por encima de otros elementos */
}

.custom-alert-content {
    background-color: var(--color-white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 300px;
}

.custom-alert-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--color-primary);
}

.custom-alert-content p {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--color-text);
}

.custom-alert-content button {
    padding: 10px 20px;
    background-color: var(--color-button);
    color: var(--color-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.custom-alert-content button:hover {
    background-color: var(--color-button-hover);
}