/* =============================================
   ESTILOS GENERALES Y RESET
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-weight: lighter;
}

:root {
    --primary-color: #010101;
    --secondary-color: #7f8c8d;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}


body {
    font-family: 'Montserrat', Roboto Condensed, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(#010101);
    min-height: 100vh;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* =============================================
   HEADER Y NAVEGACIÓN
   ============================================= */
header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    background-image: url("/static/5.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: transparent;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

header h1 {
    margin-bottom: 1rem;
    font-size: 5rem;
    text-align: center;
}

b {
    font-size: 2rem;
    color: #D8AC5B;
    opacity: 0.9;
    text-align: center;
}

nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

nav a {
    color: var(--light-color);
    text-decoration: none;
    padding: 0.1rem 0.5rem;
    transition: var(--transition);
    border: 1px solid;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* =============================================
   COMPONENTES GENERALES
   ============================================= */
.hero {
    text-align: center;
    padding: 3rem 2rem;
    /* background: linear-gradient(#7f8c8d); */
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 300;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-calculate {
    background: var(--secondary-color);
    font-size: 1.1rem;
    padding: 15px 30px;
    width: 100%;
    margin-top: 1rem;
}

.btn-calculate:hover {
    background: #219a52;
}

.btn-completar {
    background: var(--success-color);
}

.btn-desmarcar {
    background: var(--warning-color);
    color: #333;
}

.btn-eliminar {
    background: var(--danger-color);
}

/* =============================================
   PÁGINA DE INICIO
   ============================================= */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.info-section {
    background: var(--light-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.info-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.benefit {
    text-align: center;
    padding: 1rem;
}

.benefit h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* =============================================
   CALCULADORAS Y FORMULARIOS
   ============================================= */
.calculator-container {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.calculator-container h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 2rem;
}

.calculator-info,
.formula-info,
.dieta-info {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.calculator-info h3,
.formula-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.formula-info ul {
    list-style: none;
    padding-left: 0;
}

.formula-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.formula-info li:last-child {
    border-bottom: none;
}

.calculator-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

input[type="text"],
input[type="number"],
input[type="email"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.intensidad-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
}

#intensidad-value {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.objetivo-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.objetivo-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.objetivo-option:hover {
    border-color: var(--secondary-color);
}

.objetivo-option input[type="radio"] {
    margin-right: 1rem;
}

.objetivo-option input[type="radio"]:checked+span {
    font-weight: bold;
    color: var(--secondary-color);
}

/* =============================================
   RESULTADOS
   ============================================= */
.resultado {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 2rem;
    border-left: 4px solid var(--secondary-color);
}

.resultado h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-3px);
}

.result-card.highlight {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
}

.result-card.highlight .result-value {
    color: white;
    font-size: 2.5rem;
}

.result-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.result-card small {
    color: var(--text-light);
    font-size: 0.9rem;
}

.result-card.highlight small {
    color: rgba(255, 255, 255, 0.9);
}

/* =============================================
   ZONAS DE ENTRENAMIENTO
   ============================================= */
.training-zones {
    margin-top: 2rem;
}

.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.zone-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--shadow);
}

.zone-card[data-zone="1"] {
    border-left-color: #27ae60;
}

.zone-card[data-zone="2"] {
    border-left-color: #3498db;
}

.zone-card[data-zone="3"] {
    border-left-color: #f39c12;
}

.zone-card[data-zone="4"] {
    border-left-color: #e74c3c;
}

.zone-card h5 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.zone-range {
    font-weight: bold;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* =============================================
   MACRONUTRIENTES
   ============================================= */
.macronutrientes {
    margin-top: 2rem;
}

.macros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.macro-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--border-color);
}

.macro-card.proteinas {
    border-top-color: #e74c3c;
}

.macro-card.carbohidratos {
    border-top-color: #3498db;
}

.macro-card.grasas {
    border-top-color: #f39c12;
}

.macro-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0.5rem 0;
    color: var(--primary-color);
}

.macro-percentage {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* =============================================
   RECOMENDACIONES
   ============================================= */
.recomendaciones {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e8f4f8;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
}

.recomendaciones-texto ul {
    list-style: none;
    padding-left: 0;
}

.recomendaciones-texto li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.recomendaciones-texto li:last-child {
    border-bottom: none;
}

.recomendaciones-texto li::before {
    content: "✓ ";
    color: var(--success-color);
    font-weight: bold;
}

/* =============================================
   ESTILOS PARA PLAN DE COMIDAS ESTRUCTURADO
   ============================================= */

/* Tabla de plan de comidas */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.plan-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

.plan-table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.plan-table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    vertical-align: top;
    min-width: 150px;
}

.plan-table tr:nth-child(even) {
    background: #f8f9fa;
}

.plan-table tr:hover {
    background: #e9ecef;
}

/* Estilos para alimentos dentro de la tabla */
.alimento-plan {
    background: white;
    padding: 0.5rem;
    margin: 0.25rem 0;
    border-radius: 4px;
    border-left: 3px solid var(--secondary-color);
}

.alimento-plan strong {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.alimento-plan small {
    color: var(--text-light);
    font-size: 0.75rem;
}

.calorias-alimento {
    color: var(--success-color);
    font-weight: 600;
}

.total-calorias {
    background: var(--light-color);
    font-weight: bold;
    text-align: center;
    color: var(--primary-color);
}

/* Detalles de alimentos en las tarjetas */
.alimento-details {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.porcion {
    background: #e8f4f8;
    color: var(--secondary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Filtro select */
.filtro-select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: white;
}

.filtro-select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.alimentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.alimento-card {
    position: relative;
}

.alimento-card input[type="checkbox"] {
    display: none;
}

.alimento-card label {
    display: block;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.alimento-card input[type="checkbox"]:checked+label {
    border-color: var(--success-color);
    background: #f0f9f0;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.alimento-card.selected label {
    border-color: var(--success-color);
    background: #f0f9f0;
}

.alimento-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.categoria {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.categoria.proteina {
    background: #ffeaea;
    color: #e74c3c;
}

.categoria.carbohidrato {
    background: #eaf2f8;
    color: #3498db;
}

.categoria.grasa {
    background: #fef9e7;
    color: #f39c12;
}

.categoria.vegetal {
    background: #eaf7ea;
    color: #27ae60;
}


/* =============================================
   RESULTADOS DE DIETA
   ============================================= */
.resumen-dieta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.resumen-card {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.resumen-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.sobre-objetivo {
    color: var(--danger-color);
    font-weight: bold;
}

.bajo-objetivo {
    color: var(--warning-color);
    font-weight: bold;
}

.objetivo-exacto {
    color: var(--success-color);
    font-weight: bold;
}


/* Mejoras en responsive para tabla */
@media (max-width: 1200px) {
    .plan-table {
        font-size: 0.8rem;
    }

    .plan-table th,
    .plan-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .table-container {
        font-size: 0.7rem;
    }

    .plan-table {
        min-width: 800px;
        /* Permite scroll horizontal en móviles */
    }

    .alimento-plan {
        padding: 0.25rem;
    }

    .alimento-plan strong {
        font-size: 0.7rem;
    }

    .alimento-plan small {
        font-size: 0.65rem;
    }
}

/* Estilos para categorías en lista de compras */
.categoria-titulo {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.lista-alimentos-compras li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.lista-alimentos-compras li:hover {
    background: var(--light-color);
}

.lista-alimentos-compras li:last-child {
    border-bottom: none;
}

.nombre-alimento {
    font-weight: 600;
    flex: 2;
}

.cantidad-alimento {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

/* Mejoras en las tarjetas de alimentos */
.alimento-card {
    transition: var(--transition);
    border: 2px solid transparent;
}

.alimento-card:hover {
    transform: translateY(-2px);
    border-color: var(--secondary-color);
}

.alimento-card input[type="checkbox"]:checked+label {
    border-color: var(--success-color);
    background: #f0f9f0;
    transform: scale(1.02);
}

.alimento-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    margin: 0.5rem 0;
    font-size: 0.8rem;
}

.categoria {
    background: var(--light-color);
    color: var(--text-color);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Versión minimalista para separación */
.fila-dia {
    border-bottom: 2px solid #e9ecef;
}

.fila-dia:last-child {
    border-bottom: none;
}

.fila-separador td {
    padding: 10px 0 !important;
    border: none !important;
    background: transparent !important;
}

.separador-dias {
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
}

/* =============================================
   LISTA DE TAREAS
   ============================================= */
.tareas-container {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-agregar {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
}

.form-agregar input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.lista-tareas {
    margin-top: 1.5rem;
}

.tarea {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    transition: var(--transition);
    background: white;
}

.tarea:hover {
    box-shadow: var(--shadow);
}

.tarea.completada {
    background-color: #f0f9f0;
    border-color: #d4edda;
    text-decoration: line-through;
    opacity: 0.8;
}

.acciones {
    display: flex;
    gap: 0.5rem;
}

.sin-tareas {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 2rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

/* =============================================
   MENSAJES FLASH
   ============================================= */
.mensajes {
    margin-bottom: 1rem;
}

.mensaje {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.mensaje.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mensaje.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* =============================================
   ESTILOS PARA ANÁLISIS ANTROPOMÉTRICO
   ============================================= */

.measurements-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--secondary-color);
}

.measurements-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.clasificacion {
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    display: inline-block;
}

.diferencia {
    margin-top: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.diferencia.sobre {
    color: var(--danger-color);
}

.diferencia.bajo {
    color: var(--warning-color);
}

.diferencia.ideal {
    color: var(--success-color);
}

/* Composición Corporal */
.composicion-corporal {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.composicion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.composicion-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.composicion-titulo {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.composicion-valor {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.composicion-bar {
    background: #e9ecef;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.bar-muscular {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    height: 100%;
    transition: width 1s ease-in-out;
}

.bar-grasa {
    background: linear-gradient(90deg, #e74c3c, #e67e22);
    height: 100%;
    transition: width 1s ease-in-out;
}

/* Distribución Visual */
.distribucion-visual {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.visual-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cuerpo-visual {
    width: 120px;
    height: 200px;
    background: #f8f9fa;
    border: 2px solid var(--border-color);
    border-radius: 60px;
    position: relative;
    overflow: hidden;
}

.musculo-visual {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #27ae60, #2ecc71);
    transition: height 1s ease-in-out;
}

.grasa-visual {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #e74c3c, #e67e22);
    transition: height 1s ease-in-out;
}

.leyenda-visual {
    flex: 1;
    min-width: 200px;
}

.leyenda-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.color-musculo {
    width: 20px;
    height: 20px;
    background: #27ae60;
    border-radius: 50%;
    margin-right: 1rem;
}

.color-grasa {
    width: 20px;
    height: 20px;
    background: #e74c3c;
    border-radius: 50%;
    margin-right: 1rem;
}

/* Recomendaciones Antropométricas */
.recomendaciones-antropo {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #e8f4f8;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
}

.lista-recomendaciones {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.recomendacion-item {
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--success-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Plan de Acción */
.plan-accion {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff3cd;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--warning-color);
}

.acciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.accion-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.accion-card h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.accion-card p {
    color: var(--text-light);
    line-height: 1.5;
}

/* =============================================
   ESTADOS DE LOADING Y MEJORAS
   ============================================= */

/* Estados de loading */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mejoras en las barras de progreso */
.composicion-bar {
    position: relative;
}

.composicion-bar::after {
    content: attr(data-value);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: #333;
}

/* Mejoras en la visualización del cuerpo */
.cuerpo-visual {
    position: relative;
}

.musculo-visual,
.grasa-visual {
    transition: height 1.5s ease-in-out;
}

/* Estilos para mensajes de error */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    border-left: 4px solid #e74c3c;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    nav {
        flex-direction: column;
        align-items: center;
    }

    nav a {
        width: 100%;
        text-align: center;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .calculator-container,
    .tareas-container {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .result-grid,
    .macros-grid,
    .zones-grid {
        grid-template-columns: 1fr;
    }

    .alimentos-grid {
        grid-template-columns: 1fr;
    }

    .form-agregar {
        flex-direction: column;
    }

    .tarea {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .acciones {
        width: 100%;
        justify-content: flex-end;
    }

    .visual-container {
        flex-direction: column;
        text-align: center;
    }

    .leyenda-visual {
        width: 100%;
    }

    .composicion-grid {
        grid-template-columns: 1fr;
    }

    .acciones-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.5rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .benefits {
        grid-template-columns: 1fr;
    }

    .calculator-form {
        padding: 1rem;
    }

    .resultado {
        padding: 1rem;
    }

    .visual-container {
        flex-direction: column;
        align-items: center;
    }

    .cuerpo-visual {
        margin-bottom: 1rem;
    }
}

/* =============================================
   ANIMACIONES Y ESTADOS ESPECIALES
   ============================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resultado,
.feature-card,
.calculator-container {
    animation: fadeIn 0.5s ease-out;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============================================
   ESTILOS PARA SCROLLBAR
   ============================================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* =============================================
   UTILIDADES ADICIONALES
   ============================================= */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

/* =============================================
   ESTADOS DE ÉXITO, ADVERTENCIA Y PELIGRO
   ============================================= */
.estado-exito {
    color: var(--success-color);
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.estado-advertencia {
    color: var(--warning-color);
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

.estado-peligro {
    color: var(--danger-color);
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* =============================================
   ESTILOS PARA FORMULARIOS ESPECIALIZADOS
   ============================================= */
.form-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-style: italic;
}

.form-help {
    background: #e8f4f8;
    border-left: 4px solid var(--secondary-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.required::after {
    content: " *";
    color: var(--danger-color);
}

/* =============================================
   ESTILOS PARA TARJETAS ESPECIALES
   ============================================= */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* =============================================
   ESTILOS PARA BADGES Y ETIQUETAS
   ============================================= */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-primary {
    color: #fff;
    background-color: var(--primary-color);
}

.badge-success {
    color: #fff;
    background-color: var(--success-color);
}

.badge-warning {
    color: #212529;
    background-color: var(--warning-color);
}

.badge-danger {
    color: #fff;
    background-color: var(--danger-color);
}

.badge-info {
    color: #fff;
    background-color: var(--secondary-color);
}

/* Estilos para la galería */
.galeria-info {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.filtros-galeria {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filtro-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.filtro-btn.active,
.filtro-btn:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.articulo-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.articulo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.articulo-imagen {
    height: 120px;
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.articulo-content {
    padding: 1.5rem;
}

.articulo-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.articulo-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.articulo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categoria-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.categoria-badge.nutricion {
    background: #e8f6f3;
    color: #1abc9c;
}

.categoria-badge.ejercicio {
    background: #e8f4f8;
    color: #3498db;
}

.categoria-badge.mental {
    background: #f4ecf7;
    color: #9b59b6;
}

.categoria-badge.sueño {
    background: #fef9e7;
    color: #f39c12;
}

.categoria-badge.indumentaria {
    background: #eaf2f8;
    color: #2980b9;
}

.fecha {
    font-size: 0.8rem;
    color: var(--text-light);
}

.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 1rem auto 0;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--border-radius);
}

.newsletter-form button {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: #219a52;
}

/* Estilos para el seguimiento */
.seguimiento-info {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.nueva-medida-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.estadisticas-progreso {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.estadistica-progreso {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.estadistica-valor {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.estadistica-valor.positivo {
    color: var(--success-color);
}

.estadistica-valor.negativo {
    color: var(--danger-color);
}

.graficos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.grafico-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.grafico {
    height: 250px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 1rem;
    margin-top: 1rem;
}

.barra-grafico {
    background: var(--secondary-color);
    width: 30px;
    border-radius: 5px 5px 0 0;
    position: relative;
    transition: var(--transition);
}

.barra-grafico:hover {
    opacity: 0.8;
}

.barra-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-light);
}

.acciones-exportar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.historial-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.historial-table th,
.historial-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.historial-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.sin-datos {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 2rem;
}

/* Estilos para suscripción */
.suscripcion-info {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.planes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.plan-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.plan-card.premium {
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-header {
    margin-bottom: 1.5rem;
}

.plan-precio {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.plan-precio span {
    font-size: 1rem;
    color: var(--text-light);
}

.plan-features {
    margin: 2rem 0;
    text-align: left;
}

.feature-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.feature-item:last-child {
    border-bottom: none;
}

.btn-premium {
    background: var(--secondary-color);
    color: white;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.comparativa-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparativa-table th,
.comparativa-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.comparativa-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.comparativa-table tr:hover {
    background: #f8f9fa;
}

.pasarela-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 1rem;
}

.resumen-compra {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    height: fit-content;
}

.detalles-plan {
    margin-top: 1rem;
}

.metodos-pago {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metodo-pago {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.metodo-pago.active {
    border-color: var(--secondary-color);
    background: #e8f4f8;
}

.form-pago {
    margin-bottom: 1.5rem;
}

.proteccion-datos {
    display: flex;
    justify-content: space-around;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.proteccion-item {
    font-size: 0.9rem;
    color: var(--text-light);
}

.garantia {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e8f6f3;
    border-radius: var(--border-radius);
    text-align: center;
}

.faq-section {
    margin-top: 3rem;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-pregunta {
    padding: 1rem;
    background: var(--light-color);
    font-weight: 600;
    cursor: pointer;
}

.faq-respuesta {
    padding: 1rem;
    background: white;
    display: none;
}

.faq-item.active .faq-respuesta {
    display: block;
}

.btn-paypal {
    background: #003087;
    color: white;
    width: 100%;
    padding: 1rem;
}

.btn-paypal:hover {
    background: #002266;
}

/* Estilos para objetivos mejorados */
.resumen-objetivos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.estadistica-objetivo {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.estadistica-objetivo .numero {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.estadistica-objetivo .label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.filtros-objetivos {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.buscador {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
}

.form-agregar-mejorado {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.form-agregar-mejorado textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.lista-tareas-mejorada {
    margin-bottom: 2rem;
}

.tarea-mejorada {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.tarea-mejorada:hover {
    box-shadow: var(--shadow);
}

.tarea-mejorada.completada {
    background: #f0f9f0;
    border-color: #d4edda;
    opacity: 0.8;
}

.tarea-checkbox .check-btn {
    font-size: 1.5rem;
    text-decoration: none;
}

.tarea-contenido {
    flex: 1;
}

.tarea-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.tarea-header .texto {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    flex: 1;
}

.tarea-mejorada.completada .texto {
    text-decoration: line-through;
}

.categoria-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.categoria-badge.salud {
    background: #e8f6f3;
    color: #1abc9c;
}

.categoria-badge.nutricion {
    background: #e8f4f8;
    color: #3498db;
}

.categoria-badge.ejercicio {
    background: #fef9e7;
    color: #f39c12;
}

.categoria-badge.mental {
    background: #f4ecf7;
    color: #9b59b6;
}

.categoria-badge.otros {
    background: #eaeaea;
    color: #7f8c8d;
}

.tarea-descripcion {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.tarea-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.fecha-limite.vencida {
    color: var(--danger-color);
    font-weight: bold;
}

.tarea-acciones {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.sin-tareas-mejorado {
    text-align: center;
    padding: 3rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.sin-tareas-mejorado h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.sin-tareas-mejorado ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.sin-tareas-mejorado li {
    padding: 0.5rem;
    background: white;
    margin: 0.5rem 0;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.sin-tareas-mejorado li:hover {
    background: var(--secondary-color);
    color: white;
}

.estadisticas-avanzadas {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-card {
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.stat-titulo {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-valor {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.stat-categorias {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.categoria-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
}

/* =============================================
   PREMIUM IMPROVEMENTS (New)
   ============================================= */

/* Icon Wrappers */
.icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--light-color), #fff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.feature-card:hover .icon-wrapper {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    transform: rotateY(180deg);
}

/* Stat Badges */
.stat-badge {
    display: inline-block;
    background: #f8f9fa;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.stat-badge .highlight {
    font-weight: bold;
    color: var(--accent-color);
}

.stat-badge.premium-badge {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: white;
    border: none;
    font-weight: 600;
}

/* Premium Card Special Styling */
.feature-card.premium-card {
    border: 2px solid #f1c40f;
    background: linear-gradient(to bottom right, #fff, #fffbf0);
}

.btn-premium-glow {
    background: linear-gradient(45deg, #f1c40f, #d35400);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.btn-premium-glow:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* Benefit Icons */
.benefit-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: block;
}

/* Button Icons */
.btn i {
    margin-left: 5px;
    font-size: 0.9em;
}

/* Hero Gradient Animation */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero {
    background: linear-gradient(-45deg, #010101, #2c3e50, #34495e, #000000);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

/* =============================================
   SECCIÓN MIS OBJETIVOS (GOALS)
   ============================================= */

/* Contenedor principal y resumen */
.goals-header {
    text-align: center;
    margin-bottom: 2rem;
}

.goals-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.summary-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.summary-label {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Formulario de agregar */
.add-goal-form {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    border-left: 5px solid var(--secondary-color);
}

.add-goal-form h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Lista de Objetivos */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.goal-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.goal-item:hover {
    transform: translateX(5px);
    border-color: var(--secondary-color);
}

.goal-item.completed {
    background: #f8f9fa;
    opacity: 0.8;
}

.goal-item.completed .goal-title {
    text-decoration: line-through;
    color: var(--text-light);
}

.goal-content {
    flex: 1;
    margin-right: 1.5rem;
}

.goal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.goal-category {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: bold;
    color: white;
}

/* Colores de categoría */
.cat-nutricion {
    background-color: #27ae60;
}

.cat-ejercicio {
    background-color: #e67e22;
}

.cat-salud {
    background-color: #3498db;
}

.cat-mental {
    background-color: #9b59b6;
}

.cat-otros {
    background-color: #95a5a6;
}

.goal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.goal-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.goal-actions {
    display: flex;
    gap: 0.5rem;
}

/* Premium Features Lock */
.premium-lock-container {
    position: relative;
    margin-top: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
    text-align: center;
}

.blur-content {
    filter: blur(5px);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}

.lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 80%;
    max-width: 400px;
}

.lock-icon {
    font-size: 3rem;
    color: #f1c40f;
    /* Gold for premium */
    margin-bottom: 1rem;
}

.premium-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.premium-desc {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.btn-premium-cta {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: white;
    border: none;
    font-weight: bold;
    padding: 12px 25px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-premium-cta:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(243, 156, 18, 0.5);
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

/* Quick Actions / Link Sidebar */
.related-tools {
    margin-top: 3rem;
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.related-tools h3 {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1rem;
    display: inline-block;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tool-link {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: white;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tool-link:hover {
    background: white;
    color: var(--primary-color);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* --- Diet Plan & Print Styles --- */

.diet-plan-header {
    display: none;
    /* Only show in print */
}

.meal-time-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.meal-time-badge.desayuno {
    border-left: 3px solid #FFD700;
    color: #D4AF37;
}

.meal-time-badge.colacion {
    border-left: 3px solid #FFA500;
    color: #FF8C00;
}

.meal-time-badge.almuerzo {
    border-left: 3px solid #FF4500;
    color: #FF4500;
}

.meal-time-badge.cena {
    border-left: 3px solid #4B0082;
    color: #4B0082;
}

@media print {
    body {
        background: white;
        color: black;
        font-family: 'Inter', sans-serif;
    }

    nav,
    .hero,
    .calculator-form,
    .actions-bar,
    .related-tools,
    .premium-lock-container,
    .btn,
    footer {
        display: none !important;
    }

    .calculator-container {
        box-shadow: none;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    .resultado,
    .tab-content.active {
        display: block !important;
        box-shadow: none;
        padding: 0;
    }

    .diet-plan-header {
        display: block;
        text-align: center;
        margin-bottom: 2rem;
        border-bottom: 2px solid #eee;
        padding-bottom: 1rem;
    }

    .diet-plan-header h1 {
        font-size: 24px;
        margin: 0 0 0.5rem 0;
    }

    .diet-plan-header p {
        color: #666;
        margin: 0;
    }

    .plan-table {
        border: 1px solid #ddd;
        font-size: 10pt;
        width: 100%;
        border-collapse: collapse;
    }

    .plan-table th,
    .plan-table td {
        border: 1px solid #ddd;
        padding: 8px;
    }

    .plan-table th {
        background-color: #f8f9fa !important;
        color: #000;
    }

    .alimento-plan {
        page-break-inside: avoid;
    }

    /* Shopping List Print Layout */
    .shopping-list-print {
        columns: 2;
        column-gap: 2rem;
    }

    .categoria-compras {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

/* Food Selection Styles */
.food-list-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.alimentos-grid-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 1rem;
    padding-right: 0.5rem;
}

@keyframes highlight {
    0% {
        background-color: rgba(67, 97, 238, 0.2);
    }

    100% {
        background-color: transparent;
    }
}

.highlight-autofill {
    animation: highlight 2s ease-out;
}


.alimento-checkbox-card {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 0.9rem;
}

.alimento-checkbox-card label {
    margin-left: 0.5rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    width: 100%;
}

.food-cal {
    font-size: 0.75rem;
    color: #888;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.btn-tiny {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
}

.selection-summary {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}


/* Formula Guide Styles */
.formula-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.formula-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.formula-card:hover {
    transform: translateY(-5px);
}

.formula-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.formula-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.formula-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: #ecf0f1;
    border-radius: 10px;
    font-weight: bold;
}