/*
  CSS BÁSICO (sin cambios)
*/
body {
    background-color: #2e2e2e;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    margin: 0;
    padding: 0;
}

.header-top {
    width: 80%;
    height: auto;
    border: 3px solid #ffffff;
    background-color: #000000;
    border-radius: 40px;
    margin: 40px auto;
    padding: 20px;
    text-align: center;
}

.main-info {
    width: 80%;
    margin: 40px auto;
    padding: 20px;
    text-align: center;
}

.principal {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    margin-top: 20px;
}

.card {
    display: flex;
    margin: auto;
    align-items: center;
    width: 80%;
    border-radius: 40px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 3%;
    cursor: pointer;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.icon {
    width: 60px;
    height: 60px;
    margin-right: 20px;
}

.gym {
    background-color: #e63946;
}

.piscina {
    background-color: #457b9d;
}

.running {
    background-color: #2a9d8f;
}

a {
  text-decoration: none;
  color: inherit;
  /* display: block;  Quitamos esto para que el JS del index funcione bien */
}

a.card-link {
    display: flex; /* Hacemos que el <a> dentro de la card ocupe espacio */
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
}


.section {
    width: 80%;
    margin: 30px auto;
    padding: 20px;
    border-radius: 20px;
    color: #fff;
    text-align: center;
}

.add-training {
    margin: 20px 0;
    text-align: right;
}

.btn-add {
    display: inline-block;
    font-size: 2rem;
    font-weight: bold;
    background: #000;
    color: #fff;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    text-decoration: none;
}

.btn-add:hover {
    background: #444;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.training-list {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.training-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.training-item a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    display: block;
}

.training-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.back-button {
    width: 8%;
    min-width: 100px;
    height: auto;
    background-color: #444;
    padding: 15px 20px;
    text-align: center;
    border-radius: 20px;
    margin: auto;
    margin-top: -20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.back-button a {
    display: block;
}

.back-button:hover{
    background: #444;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/*
  FORMULARIOS (con estilos nuevos)
*/
.training-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 20px;
    width: 80%;
    margin: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.form-group label {
    font-weight: bold;
    font-size: 0.9rem;
    color: #ccc;
    margin-left: 5px;
}

.form-group input {
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background-color: #444;
    color: #fff;
}

.form-group input::placeholder {
    color: #999;
}

.form-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

.subtitle {
    margin-top: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: left;
}

/*
  ¡ESTILOS NUEVOS PARA GYM!
*/
.ejercicio-item-box {
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #555;
}

.series-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
    padding-left: 20px;
    border-left: 2px solid #e63946; /* Color de gym */
}

.serie-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.serie-label {
    font-weight: bold;
    color: #ccc;
    min-width: 60px;
}
/* Estilos para los inputs pequeños de series */
.serie-item input[type="number"] {
    padding: 10px;
    font-size: 0.9rem;
}
.input-repes {
    background: #444;
    width: 80px;
    border-radius: 10px;
}
.input-peso {
    width: 80px;
    background: #444;
    border-radius: 10px;
}
.input-label {
    color: #aaa;
    margin-left: -5px;
}

.btn-add-serie {
    background: #555;
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    width: fit-content;
    margin-top: 10px;
}

.btn-add-serie:hover {
    background: #777;
}
/* Fin de estilos nuevos */


.btn-add-ejercicio {
    background: #444;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    width: fit-content;
    margin: 10px auto;
}

.btn-add-ejercicio:hover {
    transform: scale(1.05);
    background: #444;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn-submit {
    background: #457b9d;
    color: #fff;
    font-weight: bold;
    border: none;
    padding: 12px 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-cancelar {
    background: #000;
    color: #fff;
    font-weight: bold;
    padding: 12px 25px;
    border-radius: 15px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn-cancelar:hover {
    transform: scale(1.05);
    background: #444;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}