* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    min-height: 100vh;
    padding: 0;
    transition: background 0.3s;
}

/* Dynamic full-screen backgrounds for each tab */
body.push-active {
    background: #FFF5F7 !important;
}
body.pull-active {
    background: #F0FBFC !important;
}
body.legs-active {
    background: #FAF3FC !important;
}
body.cardio-active {
    background: #F5FCF5 !important;
}
body.core-active {
    background: #FFFBF0 !important;
}

.container {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 60px clamp(20px, 5vw, 120px) 80px;
    background: transparent;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 8px;
    padding-bottom: 20px;
    font-family: 'Playfair Display', serif;
    font-size: 3.5em;
    font-weight: 800;
    letter-spacing: -0.5px;
    border-bottom: 2px solid #999;
}

.subheading {
    text-align: center;
    color: #555;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    font-weight: 500;
    margin-bottom: 35px;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.subheading-name {
    display: block;
    font-size: 1.25em;
    font-weight: 700;
    color: #1f2a37;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

.subheading-credentials {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6b737c;
    margin-top: 4px;
}

.subheading-name {
    display: block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #1f2a37;
    margin-top: 6px;
}

.subheading-credentials {
    display: block;
    font-size: 0.95em;
    letter-spacing: 0.6px;
    color: #6b7280;
    margin-top: 2px;
}

/* Tabs */
.tabs {
    display: flex;
    width: 100%;
    margin: 28px auto 36px;
    padding: 0;
    border-radius: 2.5em;
    min-height: 44px;
    max-width: 700px;
    overflow: hidden;
    background: linear-gradient(90deg,
        #FFB3BA 0%, #FFB3BA 20%,
        #81D4D8 20%, #81D4D8 40%,
        #CE93D8 40%, #CE93D8 60%,
        #81C784 60%, #81C784 80%,
        #FFB74D 80%, #FFB74D 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}


.tab-button {
    flex: 1;
    padding: 10px 6px;
    border: none;
    border-radius: 0;
    font-size: 0.93em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(.4,0,.2,1);
    background: transparent;
    background-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    color: rgba(255, 255, 255, 0.92);
    opacity: 1;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.tab-button[data-tab="push"] {
    background-color: #ef9a9a;
}

.tab-button[data-tab="pull"] {
    background-color: #80deea;
}

.tab-button[data-tab="legs"] {
    background-color: #ce93d8;
}

.tab-button[data-tab="cardio"] {
    background-color: #81c784;
}

.tab-button[data-tab="core"] {
    background-color: #ffcc80;
}

/* Neutral off-white backgrounds for each tab */
.tab-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.tab-button.active {
    color: #fff;
    opacity: 1;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12);
}
.tab-button.active[data-tab="push"] {
    background: #b71c1c !important;
    background-color: #b71c1c !important;
}
.tab-button.active[data-tab="pull"] {
    background: #0277bd !important;
    background-color: #0277bd !important;
}
.tab-button.active[data-tab="legs"] {
    background: #6a1b9a !important;
    background-color: #6a1b9a !important;
}
.tab-button.active[data-tab="cardio"] {
    background: #1b5e20 !important;
    background-color: #1b5e20 !important;
}
.tab-button.active[data-tab="core"] {
    background: #e65100 !important;
    background-color: #e65100 !important;
}

.tab-button:focus,
.tab-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: -2px;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 2rem;
    border-radius: 12px;
    min-height: 300px;
    transition: background 0.3s;
}



@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Workout Cards */
.workout-card {
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 5px solid;
    cursor: pointer;
}

.workout-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.workout-card h2 {
    font-size: 1.4em;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.workout-card:focus,
.workout-card:focus-visible {
    outline: 2px solid rgba(33, 33, 33, 0.35);
    outline-offset: 2px;
}

.muscle-groups {
    font-size: 0.95em;
    line-height: 1.6;
    opacity: 0.85;
    font-weight: 500;
}

/* Push Section - Pastel Pink */
.push-section .workout-card {
    background: linear-gradient(135deg, #FFE0E6 0%, #FFF0F3 100%);
    border-left-color: #FFB3BA;
    color: #8B4A52;
}

.push-section .workout-card h2 {
    color: #D64550;
}

/* Pull Section - Pastel Blue */
.pull-section .workout-card {
    background: linear-gradient(135deg, #B3E5FC 0%, #E1F5FE 100%);
    border-left-color: #81D4D8;
    color: #356B82;
}

.pull-section .workout-card h2 {
    color: #0288D1;
}

/* Legs Section - Pastel Purple */
.legs-section .workout-card {
    background: linear-gradient(135deg, #E1BEE7 0%, #F3E5F5 100%);
    border-left-color: #CE93D8;
    color: #6A3E6B;
}

.legs-section .workout-card h2 {
    color: #8E24AA;
}

/* Cardio Section - Pastel Green */
.cardio-section .workout-card {
    background: linear-gradient(135deg, #C8E6C9 0%, #E8F5E9 100%);
    border-left-color: #81C784;
    color: #2E6D31;
}

.cardio-section .workout-card h2 {
    color: #388E3C;
}

/* Core Section - Pastel Yellow/Orange */
.core-section .workout-card {
    background: linear-gradient(135deg, #FFE0B2 0%, #FFF8E1 100%);
    border-left-color: #FFB74D;
    color: #8B6914;
}

.core-section .workout-card h2 {
    color: #F57C00;
}

.exercise-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    padding: 20px;
    z-index: 1200;
}

.exercise-modal.open {
    display: flex;
}

.exercise-modal-card {
    width: min(640px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    padding: 24px;
    position: relative;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.exercise-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    color: #1f2937;
    font-size: 1.8em;
    line-height: 1;
    cursor: pointer;
}

.exercise-modal-card h2 {
    color: #111827;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    font-size: 1.7em;
}

.exercise-modal-card h3 {
    margin-top: 18px;
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 1.08em;
}

.exercise-line {
    margin: 5px 0;
    color: #374151;
    line-height: 1.45;
}

#exercise-howto {
    color: #374151;
    line-height: 1.6;
}

.exercise-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.exercise-image,
.exercise-image-placeholder {
    width: 100%;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    min-height: 120px;
    object-fit: cover;
    background: #f8fafc;
}

.exercise-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.9em;
    color: #6b7280;
    padding: 12px;
}

.advice-button-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

body.advice-modal-open .advice-button-stack {
    display: none;
}

.general-advice-button,
.lifestyle-advice-button {
    box-sizing: border-box;
    border: none;
    border-radius: 999px;
    background: #c8b7a3;
    color: #3f352c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 12px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.94em;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    text-align: center;
    width: 280px;
    white-space: nowrap;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.general-advice-button:hover,
.lifestyle-advice-button:hover {
    background: #bda893;
    transform: translateY(-1px);
    box-shadow: 0 13px 26px rgba(0, 0, 0, 0.2);
}

.general-advice-button:focus,
.general-advice-button:focus-visible,
.lifestyle-advice-button:focus,
.lifestyle-advice-button:focus-visible {
    outline: 2px solid rgba(108, 91, 72, 0.4);
    outline-offset: 2px;
}

.general-advice-card,
.lifestyle-advice-card {
    background: #f2ece5;
    border: 1px solid #ddd2c6;
}

.general-advice-card h2,
.lifestyle-advice-card h2 {
    color: #4a4036;
    border-bottom-color: #d5c8ba;
}

.general-advice-card p {
    margin-bottom: 12px;
    color: #4e4338;
    line-height: 1.6;
}

.general-advice-card p:last-of-type {
    margin-bottom: 0;
}

.advice-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-right: 24px;
}

.advice-tab-button {
    border: 1px solid #d2c3b2;
    border-radius: 999px;
    background: #e9dfd4;
    color: #51453a;
    padding: 8px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.advice-tab-button:hover {
    background: #ddd0c2;
}

.advice-tab-button.active {
    background: #c2af99;
    color: #3e3328;
    border-color: #ac9881;
}

.advice-tab-content {
    display: none;
    background: rgba(244, 237, 229, 0.85);
    border: 1px solid #ddd1c4;
    border-radius: 10px;
    padding: 14px 16px;
}

.advice-tab-content.active {
    display: block;
}

.lifestyle-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-right: 24px;
}

.lifestyle-tab-button {
    border: 1px solid #d2c3b2;
    border-radius: 999px;
    background: #e9dfd4;
    color: #51453a;
    padding: 8px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.lifestyle-tab-button:hover {
    background: #ddd0c2;
}

.lifestyle-tab-button.active {
    background: #c2af99;
    color: #3e3328;
    border-color: #ac9881;
}

.lifestyle-tab-content {
    display: none;
    background: rgba(244, 237, 229, 0.85);
    border: 1px solid #ddd1c4;
    border-radius: 10px;
    padding: 14px 16px;
}

.lifestyle-tab-content.active {
    display: block;
}

.general-advice-card h3,
.lifestyle-advice-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #4a4036;
    font-size: 1.02em;
}

.general-advice-card ul,
.lifestyle-advice-card ul {
    margin: 0 0 12px 18px;
    padding: 0;
}

.general-advice-card li,
.lifestyle-advice-card li {
    color: #4e4338;
    line-height: 1.6;
    margin-bottom: 6px;
}

.general-advice-card li:last-child,
.lifestyle-advice-card li:last-child {
    margin-bottom: 0;
}

.diet-target-positive {
    display: inline-block;
    background: #dff3e2;
    border: 1px solid #b6dfbf;
    color: #2e5c36;
    padding: 2px 6px;
    border-radius: 6px;
}

.diet-target-negative {
    display: inline-block;
    background: #f6dfdf;
    border: 1px solid #e7bbbb;
    color: #6b3030;
    padding: 2px 6px;
    border-radius: 6px;
}

/* Tab Button Active States */


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 40px 24px 70px;
    }

    h1 {
        font-size: 2em;
        margin-bottom: 10px;
    }

    .subheading {
        font-size: 0.9em;
    }

    .tabs {
        margin: 25px auto 35px;
        border-radius: 40px;
    }

    .tab-button {
        padding: 14px 8px;
        font-size: 0.8em;
        letter-spacing: 0.5px;
    }

    .tab-content.active {
        grid-template-columns: 1fr;
    }

    .workout-card {
        padding: 20px;
    }

    .workout-card h2 {
        font-size: 1.2em;
    }

    .muscle-groups {
        font-size: 0.9em;
    }

    .exercise-modal-card {
        padding: 18px;
    }

    .exercise-modal-card h2 {
        font-size: 1.35em;
        padding-right: 24px;
    }

    .advice-button-stack {
        position: static;
        margin: 40px 14px calc(10px + env(safe-area-inset-bottom));
        width: auto;
        z-index: auto;
        align-items: stretch;
    }

    .lifestyle-advice-button,
    .general-advice-button {
        min-width: 0;
        width: 100%;
        height: auto;
        min-height: 50px;
        white-space: normal;
        line-height: 1.2;
        padding: 10px 14px;
        font-size: 0.9em;
    }
}
