/* Estilo general */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: url('fondonetflix.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    color: white;
    padding: 20px;
    position: relative;
    /* Necesario para que el ::before se posicione sobre este elemento */
    z-index: 0;
    /* Asegura que el contenido esté por encima */
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    /* Negro con opacidad del 50% */
    z-index: -1;
    /* Para que no tape el contenido */
}

.container {
    background-color: rgb(0 0 0 / 0%);
    padding: 40px;
    border-radius: 10px;
    max-width: 700px;
    width: 100%;
    text-align: center;
    margin-top: 40px;
    /* Ajuste para centrar el contenedor */
}

h1 {
    font-size: 3rem;
    color: white;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: bold;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

form label {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

form input[type="email"] {
    padding: 10px;
    width: 100%;
    max-width: 400px;
    border-radius: 5px;
    border: none;
    font-size: 1rem;
}

form input[type="submit"] {
    padding: 10px 20px;
    font-size: 1.2rem;
    border-radius: 5px;
    border: none;
    background-color: #e50914;
    color: white;
    cursor: pointer;
}

/* Estilo para el mensaje de carga */
.loading {
    display: none;
    font-size: 16px;
    color: #007bff;
    text-align: center;
    margin: 20px 0;
}

.error {
    color: red;
    text-align: center;
}

/* Mejora de la tabla */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: rgba(0, 0, 0, 0.6);
}

th,
td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
    color: white;
}

th {
    background-color: #333;
}

td a {
    color: #e50914;
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}

/* Mejora la visibilidad de las filas alternadas */
tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Línea de tiempo para instrucciones centrada */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 40px auto;
    /* Centrado automático */
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #e50914;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.container-timeline {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.container-timeline.left {
    left: 0;
}

.container-timeline.right {
    left: 50%;
}

.container-timeline::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: white;
    border: 4px solid #e50914;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.right::after {
    left: -17px;
}

.content-timeline {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    position: relative;
    border-radius: 6px;
}

/* Estilo especial para resaltar la sección "Nota" */
.content-timeline.nota {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 5px solid #e50914;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    padding: 20px;
}

.content-timeline.nota h2 {
    display: inline-block;
    background-color: #e50914;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Para pantallas pequeñas */
@media (max-width: 768px) {
    .container-timeline {
        width: 100%;
        padding-left: 60px;
        padding-right: 25px;
    }

    .container-timeline.right {
        left: 0%;
    }

    .timeline::after {
        left: 31px;
    }

    .container-timeline::after {
        left: 15px;
    }
}

/* MODAL MEJORADO */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    /* Altura fija */
    overflow-y: auto;
    /* Scroll si el contenido es largo */
    color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    position: relative;
}

/* Scroll personalizado */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: #e50914;
    border-radius: 4px;
}

.close {
    color: white;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #e50914;
}

/* Loader animado */
.loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #e50914;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 30px auto 10px auto;
}

.loader-text {
    text-align: center;
    font-size: 16px;
    margin-top: 5px;
    color: #ccc;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.email-html-wrapper {
    all: initial;
    /* Reinicia todos los estilos heredados */
    display: block;
    width: 100%;
}

/* Permitir que algunos elementos se comporten normalmente */
.email-html-wrapper * {
    all: unset;
    display: revert;
    font-family: revert;
    color: revert;
}

.email-count {
    font-size: 16px;
    color: #00ffcc;
    text-align: center;
    margin: 10px 0;
}

.email-html-wrapper a {
    cursor: pointer !important;
}

.email-html-wrapper a:hover {
    text-decoration: underline;
    color: #00ffee;
}