* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #0f172a;
    color: #f8fafc;
    display: flex;
    justify-content: center;
    padding: 12px;
}

.app-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    padding: 10px 14px;
    border-radius: 12px;
}

.usuario-semana-box {
    display: flex;
    gap: 8px;
}

.usuario-semana-box select {
    background: #334155;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.botones-header {
    display: flex;
    gap: 6px;
}

.btn-icon {
    background: #334155;
    border: none;
    font-size: 1.1rem;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

/* CARDS GENERALES */
.card-config, .card-inicio, .card-ejercicio, .card-inputs, .card-resumen {
    background: #1e293b;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-config input, .card-config select {
    background: #0f172a;
    color: #fff;
    border: 1px solid #334155;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.card-inicio {
    text-align: center;
    color: #94a3b8;
    padding: 30px 14px;
}

/* PANTALLA EJERCICIO */
.paso-badge {
    align-self: flex-start;
    background: #0284c7;
    color: #fff;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: bold;
}

.meta-info {
    font-size: 0.85rem;
    color: #38bdf8;
}

.contenedor-imagen img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

.btn-esquema {
    background: #334155;
    color: #cbd5e1;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

.box-esquema {
    background: #0f172a;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: pre-line;
    color: #cbd5e1;
}

/* INPUTS CARGA */
.inputs-row {
    display: flex;
    gap: 8px;
}

.inputs-row input {
    width: 50%;
    background: #0f172a;
    border: 1px solid #334155;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

.btn-principal {
    background: #22c55e;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

.timer-display {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #38bdf8;
    background: #0f172a;
    padding: 8px;
    border-radius: 8px;
}

.series-guardadas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip-serie {
    background: #334155;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #38bdf8;
}

/* NAVEGACIÓN */
.navegacion-ejercicios {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn-nav {
    flex: 1;
    background: #334155;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

/* RESUMEN */
.card-resumen ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
}

.card-resumen li {
    padding: 6px;
    border-radius: 6px;
    color: #94a3b8;
}

.card-resumen li.ejercicio-activo {
    background: #0284c7;
    color: #fff;
    font-weight: bold;
}

/* MODALES Y CONTROL DE VISIBILIDAD */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    z-index: 100;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background: #1e293b;
    padding: 20px;
    border-radius: 14px;
    width: 100%;
    max-width: 400px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-large {
    max-width: 460px;
    max-height: 85vh;
    overflow-y: auto;
}

.cerrar-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group input, .form-group select {
    background: #0f172a;
    border: 1px solid #334155;
    color: #fff;
    padding: 8px;
    border-radius: 6px;
}

.historial-lista {
    background: #0f172a;
    padding: 10px;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-historial-peso, .item-historial-carga {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 6px;
    font-size: 0.85rem;
}

.modal-zoom-content {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
}