﻿
:root {
    --bg: #060608;
    --s1: #0e0e14;
    --s2: #161620;
    --s3: #1e1e2c;
    --border: #ffffff0f;
    --border2: #ffffff18;
    --gold: #f0c040;
    --gold2: #ffdb70;
    --red: #ff4040;
    --blue: #4090ff;
    --green: #30e08a;
    --text: #eeeeff;
    --muted: #666688;
    --muted2: #9999bb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Tajawal', sans-serif;
    min-height: 100vh;
}

    /* ── NOISE OVERLAY ── */
    body::after {
        content: '';
        position: fixed;
        inset: 0;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
        pointer-events: none;
        z-index: 9999;
    }

.wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1rem 5rem;
}

/* ── HERO ── */
.hero {
    padding: 3.5rem 0 2rem;
    text-align: center;
    animation: rise 0.9s ease both;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0c04018;
    border: 1px solid #f0c04033;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 0.35rem 1.1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
}

    .hero h1 em {
        font-style: normal;
        background: linear-gradient(135deg, var(--gold), var(--gold2), #ff9a40);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.hero-sub {
    color: var(--muted2);
    font-size: 0.95rem;
    max-width: 460px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* ── PHILOSOPHY STRIP ── */
.philo {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 0.6rem;
    margin-bottom: 2.5rem;
    animation: rise 0.9s 0.1s ease both;
}

.philo-item {
    background: var(--s2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem 0.8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .philo-item::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at top, var(--c) 0%, transparent 70%);
        opacity: 0.07;
    }

    .philo-item:nth-child(1) {
        --c: var(--red);
    }

    .philo-item:nth-child(2) {
        --c: var(--gold);
    }

    .philo-item:nth-child(3) {
        --c: var(--blue);
    }

.philo-icon {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.philo-name {
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.philo-desc {
    font-size: 0.72rem;
    color: var(--muted2);
    line-height: 1.5;
}

/* ── SECTION HEADER ── */
.sec-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 2.8rem 0 1.2rem;
    animation: rise 0.6s ease both;
}

.sec-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.si-strength {
    background: #ff404018;
    border: 1px solid #ff404033;
}

.si-food {
    background: #30e08a18;
    border: 1px solid #30e08a33;
}

.si-supp {
    background: #f0c04018;
    border: 1px solid #f0c04033;
}

.si-prog {
    background: #4090ff18;
    border: 1px solid #4090ff33;
}

.sec-head h2 {
    font-size: 1.35rem;
    font-weight: 800;
}

.sec-head p {
    font-size: 0.78rem;
    color: var(--muted2);
    margin-top: 0.1rem;
}

/* ── TABS ── */
.tabs {
    display: flex;
    gap: 0.4rem;
    background: var(--s1);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.35rem;
    overflow-x: auto;
    margin-bottom: 1.8rem;
    animation: rise 0.6s 0.05s ease both;
}

.tab {
    flex: 1;
    min-width: 72px;
    padding: 0.55rem 0.6rem;
    border: none;
    background: none;
    color: var(--muted);
    font-family: 'Tajawal',sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
}

    .tab.on {
        background: linear-gradient(135deg,#f0c040,#ff9a40);
        color: #000;
    }

.pane {
    display: none;
}

    .pane.on {
        display: block;
        animation: rise 0.4s ease both;
    }

/* ── WEEK TABS ── */
.week-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.wtab {
    padding: 0.45rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--border2);
    background: var(--s2);
    color: var(--muted2);
    font-family: 'Tajawal',sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

    .wtab.on {
        background: var(--gold);
        color: #000;
        border-color: var(--gold);
    }

.wblock {
    display: none;
}

    .wblock.on {
        display: block;
        animation: rise 0.3s ease both;
    }

/* ── DAY CARD ── */
.day {
    background: var(--s2);
    border: 1px solid var(--border);
    border-radius: 18px;
    margin-bottom: 0.9rem;
    overflow: hidden;
    transition: border-color 0.25s;
}

    .day:hover {
        border-color: var(--border2);
    }

.day-hd {
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.day-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.dnum {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.d-active {
    background: linear-gradient(135deg,#f0c040,#ff9a40);
    color: #000;
}

.d-rest {
    background: var(--s3);
    color: var(--muted);
}

.dname {
    font-weight: 800;
    font-size: 0.95rem;
}

.dfocus {
    font-size: 0.72rem;
    color: var(--muted2);
    margin-top: 0.1rem;
}

.dbadge {
    font-size: 0.68rem;
    padding: 0.2rem 0.65rem;
    border-radius: 100px;
    font-weight: 700;
    background: #f0c04018;
    color: var(--gold);
    border: 1px solid #f0c04030;
    white-space: nowrap;
}

    .dbadge.rest {
        background: var(--s3);
        color: var(--muted);
        border-color: var(--border);
    }

.day-bd {
    display: none;
    padding: 0 1.2rem 1.2rem;
}

    .day-bd.open {
        display: block;
    }

/* ── PHASE LABEL ── */
.phase-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.8rem;
    border-radius: 100px;
    margin-bottom: 0.7rem;
    text-transform: uppercase;
}

.phase-str {
    background: #ff404018;
    color: var(--red);
    border: 1px solid #ff404030;
}

.phase-hyp {
    background: #f0c04018;
    color: var(--gold);
    border: 1px solid #f0c04030;
}

.phase-def {
    background: #4090ff18;
    color: var(--blue);
    border: 1px solid #4090ff30;
}

/* ── EXERCISE TABLE ── */
.ex-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}

    .ex-table th {
        text-align: left;
        color: var(--muted);
        font-weight: 700;
        padding: 0.5rem 0.45rem 0.2rem;
        border-bottom: 1px solid var(--border2);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .ex-table td {
        padding: 0.2rem 0.45rem 0.5rem;
        border-bottom: 1px solid #ffffff06;
        vertical-align: top;
    }

    .ex-table tr:last-child td {
        border-bottom: none;
    }

.ex-name {
    font-weight: 700;
}

.ex-note {
    font-size: 0.68rem;
    color: var(--muted2);
    margin-top: 0.1rem;
}

.badge-str {
    background: #ff404018;
    color: var(--red);
    border: 1px solid #ff404028;
    border-radius: 8px;
    padding: 0.18rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.badge-hyp {
    background: #f0c04018;
    color: var(--gold);
    border: 1px solid #f0c04028;
    border-radius: 8px;
    padding: 0.18rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.badge-def {
    background: #4090ff18;
    color: var(--blue);
    border: 1px solid #4090ff28;
    border-radius: 8px;
    padding: 0.18rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.rest-tip {
    color: var(--muted2);
    font-size: 0.82rem;
    line-height: 1.9;
    padding: 0.4rem 0;
}

    .rest-tip span {
        color: var(--gold);
        font-weight: 700;
    }

/* ── MACROS ── */
.macro-row {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 0.7rem;
    margin-bottom: 1.4rem;
}

.mc {
    background: var(--s2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 0.8rem;
    text-align: center;
}

.mc-val {
    font-size: 1.75rem;
    font-weight: 900;
}

.mc-lbl {
    font-size: 0.7rem;
    color: var(--muted2);
    margin-top: 0.15rem;
}

.mc.kcal {
    border-top: 3px solid var(--gold);
}

    .mc.kcal .mc-val {
        color: var(--gold);
    }

.mc.prot {
    border-top: 3px solid var(--green);
}

    .mc.prot .mc-val {
        color: var(--green);
    }

.mc.carb {
    border-top: 3px solid var(--blue);
}

    .mc.carb .mc-val {
        color: var(--blue);
    }

.mc.fat {
    border-top: 3px solid var(--red);
}

    .mc.fat .mc-val {
        color: var(--red);
    }

/* ── MEAL ── */
.meal {
    background: var(--s2);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 0.9rem;
    overflow: hidden;
}

.meal-hd {
    padding: 0.85rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff03;
    border-bottom: 1px solid var(--border);
}

.meal-name {
    font-weight: 800;
    font-size: 0.92rem;
}

.meal-kcal {
    font-size: 0.75rem;
    color: var(--muted2);
}

.meal-time {
    font-size: 0.72rem;
    color: var(--gold);
    font-weight: 700;
    background: #f0c04015;
    border: 1px solid #f0c04030;
    padding: 0.18rem 0.6rem;
    border-radius: 100px;
}

.meal-bd {
    padding: 0.9rem 1.2rem;
}

.fi {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.35rem 0;
    font-size: 0.83rem;
    border-bottom: 1px solid #ffffff05;
    line-height: 1.5;
}

    .fi:last-child {
        border-bottom: none;
    }

.fi-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.callout {
    margin-top: 0.8rem;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    font-size: 0.76rem;
    line-height: 1.6;
}

.c-green {
    background: #30e08a12;
    border: 1px solid #30e08a28;
    color: #30e08a;
}

.c-gold {
    background: #f0c04012;
    border: 1px solid #f0c04028;
    color: var(--gold);
}

.c-blue {
    background: #4090ff12;
    border: 1px solid #4090ff28;
    color: var(--blue);
}

.c-red {
    background: #ff404012;
    border: 1px solid #ff404028;
    color: var(--red);
}

/* ── PROGRESSION ── */
.prog-card {
    background: var(--s2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 0.9rem;
}

.prog-title {
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.prog-sub {
    font-size: 0.78rem;
    color: var(--muted2);
    line-height: 1.7;
}

    .prog-sub strong {
        color: var(--text);
    }

.prog-steps {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.9rem;
    flex-wrap: wrap;
}

.ps {
    flex: 1;
    min-width: 120px;
    background: var(--s3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem;
    text-align: center;
}

.ps-num {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--gold);
}

.ps-lbl {
    font-size: 0.7rem;
    color: var(--muted2);
    margin-top: 0.2rem;
}

.ps-desc {
    font-size: 0.72rem;
    color: var(--muted2);
    margin-top: 0.4rem;
    line-height: 1.5;
}

/* ── SUPP ── */
.supp-card {
    background: var(--s2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.supp-ico {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    background: var(--s3);
    border: 1px solid var(--border);
}

.supp-name {
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.supp-dose {
    font-size: 0.72rem;
    color: var(--gold);
    font-weight: 700;
    background: #f0c04015;
    border: 1px solid #f0c04030;
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 100px;
    margin-bottom: 0.4rem;
}

.supp-desc {
    font-size: 0.8rem;
    color: var(--muted2);
    line-height: 1.65;
}

/* ── DELOAD ── */
.deload {
    background: var(--s2);
    border: 1px solid #4090ff28;
    border-radius: 16px;
    padding: 1.2rem;
    margin-top: 1.5rem;
}

.deload-title {
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.deload-body {
    font-size: 0.82rem;
    color: var(--muted2);
    line-height: 1.8;
}

    .deload-body strong {
        color: var(--text);
    }

/* ── ANIMATIONS ── */
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── RESPONSIVE ── */
@media(max-width:520px) {
    .macro-row {
        grid-template-columns: repeat(2,1fr);
    }

    .philo {
        grid-template-columns: 1fr;
    }
}
/* BOTTOM NAV */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0e0e14ee;
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border2);
    z-index: 1000;
    padding: 0.6rem 0.5rem;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0.4rem 0;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    transition: all 0.2s;
}

    .nav-btn .nav-icon {
        font-size: 1.3rem;
        transition: transform 0.2s;
    }

    .nav-btn.active {
        color: var(--gold);
    }

        .nav-btn.active .nav-icon {
            transform: translateY(-2px);
        }

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
    gap: 1rem;
    color: var(--muted2);
}

/* MOBILE */
@media(max-width: 768px) {
    .tabs {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

    .wrap {
        padding-bottom: 6rem;
    }
}

/*Progress*/
/*
.container {
    max-width: 500px;
    margin: auto;
    padding: 20px;
}

.title {
    text-align: center;
    margin-bottom: 20px;
}

.card {
    background: #1e1e2c;
    padding: 20px;
    border-radius: 12px;
    color: white;
}

.row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.label {
    color: #aaa;
}

.value {
    font-weight: bold;
}

.badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: bold;
}

.green {
    background: #30e08a33;
    color: #30e08a;
}

.red {
    background: #ff404033;
    color: #ff4040;
}

.gold {
    background: #f0c04033;
    color: #f0c040;
}

.blue {
    background: #4090ff33;
    color: #4090ff;
}

.recommendation {
    margin-top: 15px;
    padding: 10px;
    background: #ffffff10;
    border-radius: 8px;
}
    */

/*Model*/
.modal-overlay {
    position: fixed;
    inset: 0;
    background: #000000aa;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    width: min(420px, 92%);
    background: var(--s2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.2rem;
    animation: rise 0.3s ease both;
}

    .modal-card input {
        width: 100%;
        margin-top: 0.6rem;
        padding: 0.65rem 0.8rem;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: var(--s3);
        color: var(--text);
        font-family: 'Tajawal', sans-serif;
        outline: none;
    }

        .modal-card input:focus {
            border-color: var(--gold);
        }

        .modal-card input[type=checkbox] {
            width: 20%;
            margin-top: 0 ;
            padding: 0.65rem 0.8rem;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--s3);
            color: var(--text);
            font-family: 'Tajawal', sans-serif;
            outline: none;
        }

            .modal-card input[type=checkbox]:focus {
                border-color: var(--gold);
            }

.modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
}

    .modal-actions .tab {
        flex: 1;
        text-align: center;
        border-radius: 12px;
        transition: all 0.2s;
    }

        /* Save button (gold primary action) */
        .modal-actions .tab.on {
            background: linear-gradient(135deg, var(--gold), var(--gold2));
            color: #000;
            border: none;
        }

        /* Cancel button override */
        .modal-actions .tab:not(.on) {
            background: var(--s3);
            color: var(--muted2);
            border: 1px solid var(--border);
        }

        .modal-actions .tab:hover {
            transform: translateY(-1px);
        }
