body {
    color: #fff;
    background-color: #101010;
    font-family: Arial, sans-serif;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

section.form-container {
    margin: 125px calc(100% - 70%);
    width: 100%;
    max-width: 400px;
    background: linear-gradient(to right, #101010, #3E3E3E);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
}

.form-box h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.form-box p {
    font-size: 1rem;
    color: #ccc;
}

.success-message, .error-message {
    font-size: 0.9rem;
    font-weight: bold;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.success-message {
    background-color: #28a745;
    color: #fff;
}

.error-message {
    background-color: #dc3545;
    color: #fff;
}

.input-group {
    margin-bottom: 15px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff; /* Blanco en lugar de dorado */
    margin-bottom: 5px;
}

.input-group input,
.input-group textarea {
    width: calc(100% - 20px); /* Ahora no sobrepasa el contenedor */
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #666;
    border-radius: 5px;
    background-color: #fff;
    color: #2a2a2a;
    display: block;
    margin: 0 auto;
}

.input-group textarea {
    resize: none;
}

button {
    width: calc(100% - 20px);
    padding: 10px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: linear-gradient(to right, #956534, #d2bc8a, #956534);
    color: white;
    transition: transform 0.3s, background-color 0.3s;
    display: block;
    margin: 10px auto 0;
}

button:hover {
    transform: scale(1.05);
    background: linear-gradient(to right, #7d5228, #bfa374, #7d5228);
}

@media screen and (max-width: 440px) {
    section.form-container {
        max-width: 100%;
        padding: 15px;
        margin: 10px;
    }

    .form-box h2 {
        font-size: 1.2rem;
    }

    .input-group label {
        font-size: 0.85rem;
    }

    button {
        font-size: 0.9rem;
    }

    /* Contenedor de tabla */
    .messages-container {
        width: 100%;
        overflow-x: auto;
    }

    /* Tabla responsive estilo lista */
    table {
        display: block;
        width: 100%;
        max-width: 100%;
        font-size: 0.75rem;
        border-collapse: collapse;
    }

    thead {
        display: none;
    }

    tbody, tr, td {
        display: block;
        width: 100%;
    }

    tbody tr {
        margin-bottom: 15px;
        border-bottom: 1px solid #ccc;
        padding: 10px 0;
    }

    tbody td {
        /*: 5px 10px;*/
        text-align: left;
        white-space: normal;
        word-break: break-word;
        position: relative;
    }

    tbody td::before {
        content: attr(data-label);
        display: block;
        font-weight: bold;
        margin-bottom: 4px;
        color: #444;
    }

    .mark-read-icon {
        transform: scale(0.9);
    }

    .mark-read-icon svg {
        width: 24px;
        height: 24px;
    }

    /* 👇 Ejercicios responsivos */
    .exercise-entry {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 10px;
    }

    .exercise-entry input,
    .exercise-entry select {
        width: 100% !important;
        margin: 4px 0 !important;
        font-size: 0.9rem !important;
    }

    .exercise-name {
        font-size: 1rem !important;
        margin-bottom: 6px;
    }

    .mode-select {
        margin-right: 0 !important;
    }

    .exercise-entry button#delete-exercise {
        align-self: flex-end;
        margin-top: 4px;
    }

    .exercise-list {
        padding: 8px;
    }

    .exercise-list input::placeholder {
        font-size: 0.85rem;
    }
}


main.messages-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

table {
    border-collapse: separate; /* importante para que border-radius funcione */
    border-spacing: 0; /* elimina el espacio entre celdas */
    color: #fff;
    border-radius: 10px;
    overflow: hidden; /* para que el borde redondeado afecte el contenido */
    width: 90%;
    max-width: 900px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

thead {
    background: #956534;
    color: #fff;
}

thead th {
    padding: 12px 15px;
    font-weight: 700;
    text-align: left;
}

tbody {
    background: #1f1f1f;
}

tbody tr {
    border-bottom: 1px solid #444;
    transition: 0.5s ease;
}

tbody tr:hover {
    background-color: #333;
}

tbody td {
   /* padding: 12px 15px;*/
    vertical-align: top;
    word-wrap: break-word;
}

.mark-read-icon {
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    transition: transform 0.2s;
}

.mark-read-icon:hover svg {
    fill: #d2bc8a; /* color dorado claro al pasar el mouse */
    transform: scale(1.1);
}
