:root {
    --bg-main: #09090b;
    --bg-card: #18181b;
    --bg-card-strong: #111114;
    --text-main: #fafafa;
    --text-muted: #a1a1aa;
    --primary: #f97316;
    --primary-hover: #ea580c;
    --border: #27272a;
    --radius: 18px;
    --radius-lg: 30px;
    --radius-xl: 42px;
    --shadow-panel: 0 30px 80px rgba(0, 0, 0, 0.38);
    --shadow-orange-soft: 0 18px 45px rgba(249, 115, 22, 0.18);
    --shadow-orange-strong: 0 28px 80px rgba(249, 115, 22, 0.28);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background:
        radial-gradient(circle at top, rgba(249, 115, 22, 0.16), transparent 34%),
        radial-gradient(circle at 15% 20%, rgba(250, 204, 21, 0.08), transparent 22%),
        var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

a { text-decoration: none; color: inherit; }
.text-primary { color: var(--primary) !important; font-weight: 600; }
.text-gradient {
    background: linear-gradient(90deg, #fb923c, #facc15);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 14px 28px rgba(249, 115, 22, 0.18));
}

/* --- NAVIGATION --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    border-bottom: 1px solid rgba(249, 115, 22, 0.1);
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.5px; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text-main); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(249, 115, 22, 0.14);
    color: var(--text-muted);
    font-size: 0.84rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), 0 0 30px rgba(249, 115, 22, 0.08);
}

.auth-chip.is-connected {
    color: #fdba74;
    border-color: rgba(249, 115, 22, 0.26);
    box-shadow: var(--shadow-orange-soft);
}

/* --- BUTTONS --- */
.btn-primary, .btn-secondary, .btn-outline {
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #fb923c, var(--primary));
    color: white;
    box-shadow: var(--shadow-orange-soft), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fdba74, var(--primary-hover));
    transform: translateY(-3px);
    box-shadow: var(--shadow-orange-strong), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: rgba(24, 24, 27, 0.96);
    color: var(--text-main);
    border: 1px solid rgba(249, 115, 22, 0.14);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28), 0 0 35px rgba(249, 115, 22, 0.08);
}

.btn-secondary:hover {
    background: #232329;
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32), 0 0 45px rgba(249, 115, 22, 0.14);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(249, 115, 22, 0.14);
    color: var(--text-main);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), 0 0 28px rgba(249, 115, 22, 0.08);
}

.btn-outline:hover {
    background: var(--bg-card);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32), 0 0 38px rgba(249, 115, 22, 0.14);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-outline:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.w-100 { width: 100%; padding: 1rem; font-size: 1.05rem; }
.hidden { display: none !important; }

.btn-loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-loading::after {
    content: "";
    width: 1rem;
    height: 1rem;
    margin-left: 0.7rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: #fff;
    display: inline-block;
    vertical-align: middle;
    animation: spin 0.7s linear infinite;
}

/* --- HERO SECTION --- */
.section { padding: 6rem 5%; max-width: 1200px; margin: 0 auto; }

.hero {
    position: relative;
    isolation: isolate;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -1;
}

.hero::before {
    width: 340px;
    height: 340px;
    top: 2rem;
    left: 6%;
    background: rgba(249, 115, 22, 0.18);
}

.hero::after {
    width: 280px;
    height: 280px;
    top: 1rem;
    right: 8%;
    background: rgba(250, 204, 21, 0.12);
}

.badge {
    background: rgba(249, 115, 22, 0.14);
    color: var(--primary);
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1px solid rgba(249, 115, 22, 0.24);
    box-shadow: var(--shadow-orange-soft), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero h1 {
    font-size: clamp(5rem, 10vw, 7.2rem);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -3px;
    text-shadow: 0 18px 40px rgba(249, 115, 22, 0.14);
}

.hero .subtitle {
    color: var(--text-muted);
    max-width: 680px;
    font-size: 1.14rem;
}

.hero-buttons { display: flex; gap: 1rem; margin-top: 1rem; }

.stats-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    width: 100%;
    max-width: 920px;
    margin-top: 3.5rem;
}

.stat-item {
    min-width: 190px;
    padding: 1.4rem 2rem;
    border-radius: 999px;
    background: rgba(24, 24, 27, 0.9);
    border: 1px solid rgba(249, 115, 22, 0.12);
    box-shadow: var(--shadow-panel), 0 0 55px rgba(249, 115, 22, 0.12);
    backdrop-filter: blur(10px);
}

.stat-item h3 { font-size: 2.3rem; font-weight: 800; }
.stat-item p { color: var(--text-muted); }

/* --- SECTION HEADERS --- */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: clamp(2.8rem, 5vw, 3.5rem); margin-bottom: 0.75rem; letter-spacing: -1.5px; }
.section-header p { color: var(--text-muted); max-width: 640px; margin: 0 auto; }

/* --- FEATURES GRID --- */
.features {
    position: relative;
    isolation: isolate;
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.96), rgba(14, 14, 16, 0.98));
    border: 1px solid rgba(249, 115, 22, 0.16);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-panel), 0 0 110px rgba(249, 115, 22, 0.14);
    overflow: hidden;
}

.features::before,
.features::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    filter: blur(80px);
}

.features::before {
    width: 220px;
    height: 220px;
    top: -2rem;
    right: 5%;
    background: rgba(249, 115, 22, 0.18);
}

.features::after {
    width: 180px;
    height: 180px;
    bottom: 2rem;
    left: 2%;
    background: rgba(250, 204, 21, 0.1);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.7rem;
}

.feature-card {
    background: linear-gradient(180deg, rgba(31, 31, 35, 0.98), rgba(17, 17, 20, 0.96));
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(249, 115, 22, 0.08);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.28), 0 0 55px rgba(249, 115, 22, 0.08);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.32);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32), 0 0 75px rgba(249, 115, 22, 0.18);
}

.feature-card .icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 1.25rem;
    border-radius: 24px;
    font-size: 2rem;
    background: radial-gradient(circle at 30% 30%, rgba(253, 186, 116, 0.34), rgba(249, 115, 22, 0.12));
    border: 1px solid rgba(249, 115, 22, 0.2);
    box-shadow: var(--shadow-orange-soft), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.feature-card h3 { margin-bottom: 0.65rem; font-size: 1.2rem; }
.feature-card p { color: var(--text-muted); font-size: 0.97rem; }

/* --- CONTENT PANELS --- */
.eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 0.42rem 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.18);
    color: #fdba74;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.panel-top h3 {
    font-size: 1.45rem;
    letter-spacing: -0.8px;
}

.panel-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.18);
    color: #fdba74;
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: var(--shadow-orange-soft);
    white-space: nowrap;
}

/* --- DASHBOARD --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
    gap: 1.7rem;
}

.analysis-panel,
.nutrition-card {
    position: relative;
    isolation: isolate;
    padding: 2rem;
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.98), rgba(14, 14, 16, 0.98));
    border: 1px solid rgba(249, 115, 22, 0.14);
    box-shadow: var(--shadow-panel), 0 0 70px rgba(249, 115, 22, 0.1);
    overflow: hidden;
}

.analysis-panel::before,
.nutrition-card::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    top: -90px;
    right: -60px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.14);
    filter: blur(60px);
    z-index: 0;
    animation: driftGlow 10s ease-in-out infinite alternate;
}

.analysis-panel > *,
.nutrition-card > * {
    position: relative;
    z-index: 1;
}

.dashboard-grid > *,
.exercise-grid > *,
.nutrition-grid > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.dashboard.visible .dashboard-grid > *,
.exercise-library.visible .exercise-grid > *,
.nutrition.visible .nutrition-grid > * {
    opacity: 1;
    transform: translateY(0);
}

.dashboard-grid > *:nth-child(2),
.exercise-grid > *:nth-child(2),
.nutrition-grid > *:nth-child(2) {
    transition-delay: 0.12s;
}

.dashboard-grid > *:nth-child(3),
.exercise-grid > *:nth-child(3),
.nutrition-grid > *:nth-child(3) {
    transition-delay: 0.2s;
}

.dashboard-grid > *:nth-child(4),
.exercise-grid > *:nth-child(4) {
    transition-delay: 0.28s;
}

.dashboard-grid > *:nth-child(5),
.exercise-grid > *:nth-child(5) {
    transition-delay: 0.36s;
}

.dashboard-grid > *:nth-child(6),
.exercise-grid > *:nth-child(6) {
    transition-delay: 0.44s;
}

.split-analysis {
    grid-column: 1 / -1;
}

.line-chart {
    position: relative;
}

.chart-guides {
    position: absolute;
    inset: 0 0 2rem 0;
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    pointer-events: none;
}

.chart-guides span {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.line-chart-svg {
    display: block;
    width: 100%;
    height: auto;
}

.chart-area {
    fill: url(#dashboardAreaGradient);
    opacity: 0;
}

.line-shadow {
    fill: none;
    stroke: rgba(249, 115, 22, 0.18);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: blur(8px);
}

.line-path {
    fill: none;
    stroke: #fb923c;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
    filter: drop-shadow(0 0 18px rgba(249, 115, 22, 0.4));
}

.chart-points circle {
    fill: #fff7ed;
    stroke: #f97316;
    stroke-width: 2;
    opacity: 0;
    transform: scale(0.4);
    transform-box: fill-box;
    transform-origin: center;
}

.dashboard.visible .chart-area {
    animation: fadeArea 1s ease forwards 0.2s;
}

.dashboard.visible .line-path {
    animation: drawLine 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dashboard.visible .chart-points circle {
    animation: pointIn 0.35s ease forwards 0.65s;
}

.chart-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.45rem;
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.mini-metric,
.insight-item,
.meal-card,
.coach-tip {
    padding: 1rem 1.1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(249, 115, 22, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.mini-metric strong,
.insight-item strong,
.coach-tip strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.mini-metric span,
.insight-item span,
.coach-tip p,
.meal-card p {
    color: var(--text-muted);
}

.progress-rings {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
}

.progress-ring {
    position: relative;
    width: 132px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--accent) calc(var(--value) * 1%), rgba(255, 255, 255, 0.06) 0);
    box-shadow: var(--shadow-orange-soft), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    text-align: center;
}

.progress-ring::before {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: rgba(15, 15, 18, 0.98);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.progress-ring span,
.progress-ring small {
    position: relative;
    z-index: 1;
}

.progress-ring span {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.progress-ring small {
    display: block;
    color: var(--text-muted);
    margin-top: 0.2rem;
    max-width: 80px;
    line-height: 1.2;
}

.insight-stack,
.muscle-bars,
.macro-list,
.coach-tip-list {
    display: grid;
    gap: 0.95rem;
}

.muscle-row,
.macro-row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
}

.muscle-row strong,
.macro-row strong {
    color: var(--text-main);
}

.bar-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--fill);
    border-radius: inherit;
    background: linear-gradient(90deg, #fb923c, #facc15);
    box-shadow: 0 0 22px rgba(249, 115, 22, 0.28);
    transform: scaleX(0);
    transform-origin: left;
}

.dashboard.visible .bar-fill,
.nutrition.visible .bar-fill {
    animation: growBar 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- EXERCISES --- */
.exercise-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(249, 115, 22, 0.12);
    color: var(--text-muted);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.filter-pill.active {
    color: var(--text-main);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(249, 115, 22, 0.1));
    box-shadow: var(--shadow-orange-soft);
}

.exercise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.exercise-card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.98), rgba(14, 14, 16, 0.98));
    border: 1px solid rgba(249, 115, 22, 0.12);
    box-shadow: var(--shadow-panel), 0 0 65px rgba(249, 115, 22, 0.08);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.exercise-card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -50px;
    bottom: -70px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.12);
    filter: blur(60px);
    z-index: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.exercise-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(249, 115, 22, 0.26);
    box-shadow: var(--shadow-panel), 0 0 95px rgba(249, 115, 22, 0.18);
}

.exercise-card:hover::after {
    transform: scale(1.15);
    opacity: 1;
}

.exercise-card > * {
    position: relative;
    z-index: 1;
}

.exercise-visual {
    min-height: 160px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 1px solid rgba(249, 115, 22, 0.1);
}

.exercise-visual.orange {
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.34), transparent 55%),
        linear-gradient(180deg, rgba(42, 20, 8, 0.96), rgba(20, 12, 9, 0.96));
}

.exercise-visual.gold {
    background:
        radial-gradient(circle at top left, rgba(250, 204, 21, 0.24), transparent 55%),
        linear-gradient(180deg, rgba(34, 27, 8, 0.96), rgba(17, 14, 8, 0.96));
}

.exercise-label {
    display: inline-flex;
    width: fit-content;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.exercise-visual strong {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    text-shadow: 0 14px 34px rgba(249, 115, 22, 0.18);
}

.exercise-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.6rem;
    flex: 1;
}

.exercise-body h3 {
    font-size: 1.35rem;
    letter-spacing: -0.6px;
}

.exercise-body p {
    color: var(--text-muted);
}

.exercise-meta,
.exercise-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.exercise-meta span,
.exercise-stats span {
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(249, 115, 22, 0.08);
    color: var(--text-muted);
    font-size: 0.84rem;
}

.exercise-body .btn-secondary {
    align-self: flex-start;
    margin-top: auto;
}

/* --- NUTRITION --- */
.nutrition-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
    gap: 1.7rem;
}

.coaching-card {
    grid-column: 1 / -1;
}

.meal-grid,
.coach-tip-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.meal-time {
    display: inline-flex;
    width: fit-content;
    padding: 0.42rem 0.7rem;
    margin-bottom: 0.7rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.18);
    color: #fdba74;
    font-size: 0.76rem;
    font-weight: 700;
}

.meal-card h4 {
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.meal-card strong {
    display: inline-block;
    margin-top: 0.75rem;
}

/* --- PRICING --- */
.pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.membership-card {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr) auto;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 1.7rem;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.98), rgba(14, 14, 16, 0.98));
    border: 1px solid rgba(249, 115, 22, 0.14);
    box-shadow: var(--shadow-panel), 0 0 70px rgba(249, 115, 22, 0.12);
}

.membership-copy h3 {
    margin-bottom: 0.5rem;
    font-size: 1.55rem;
    letter-spacing: -1px;
}

.membership-copy p {
    color: var(--text-muted);
    max-width: 520px;
}

.membership-status {
    display: grid;
    gap: 0.75rem;
}

.member-row {
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(249, 115, 22, 0.08);
}

.member-row span {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
}

.member-row strong {
    font-size: 0.96rem;
}

.membership-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 210px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 980px;
}

.pricing-card {
    position: relative;
    isolation: isolate;
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.98), rgba(14, 14, 16, 0.98));
    border: 1px solid rgba(249, 115, 22, 0.14);
    padding: 2.8rem;
    border-radius: 34px;
    width: 100%;
    box-shadow: var(--shadow-panel), 0 0 65px rgba(249, 115, 22, 0.1);
    overflow: hidden;
    cursor: pointer;
    outline: none;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.pricing-card::before {
    content: "";
    position: absolute;
    top: -3rem;
    right: -1rem;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.12);
    filter: blur(55px);
    z-index: 0;
    animation: driftGlow 10s ease-in-out infinite alternate;
}

.pricing-card::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: -48px;
    height: 150px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.4), transparent 72%);
    filter: blur(42px);
    opacity: 0;
    transform: scale(0.72);
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 0;
}

.pricing-card > * {
    position: relative;
    z-index: 1;
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: rgba(249, 115, 22, 0.26);
    box-shadow: var(--shadow-panel), 0 0 90px rgba(249, 115, 22, 0.16);
}

.pricing-card:focus-visible {
    border-color: rgba(249, 115, 22, 0.42);
    box-shadow: var(--shadow-panel), 0 0 90px rgba(249, 115, 22, 0.22);
}

.featured-plan {
    border-color: rgba(249, 115, 22, 0.32);
    box-shadow: var(--shadow-panel), 0 0 95px rgba(249, 115, 22, 0.22);
}

.pricing-card.is-selected {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(249, 115, 22, 0.42);
    box-shadow: var(--shadow-panel), 0 0 120px rgba(249, 115, 22, 0.34);
}

.pricing-card.is-selected::after {
    opacity: 1;
    transform: scale(1.2);
}

.pricing-card.animate-select {
    animation: planPop 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.pricing-card.is-locked .btn-primary,
.pricing-card.is-locked .btn-secondary {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.pricing-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(249, 115, 22, 0.22);
    color: #fdba74;
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: var(--shadow-orange-soft);
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(249, 115, 22, 0.12);
    padding-bottom: 2rem;
}

.pricing-header h3 { font-size: 1.55rem; margin-bottom: 0.6rem; }
.pricing-header .price { font-size: clamp(3rem, 6vw, 3.7rem); font-weight: 800; letter-spacing: -2px; }
.pricing-header .price span { font-size: 1rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0; }
.pricing-header p { color: var(--text-muted); margin-top: 0.8rem; }

.features-list {
    list-style: none;
    margin-bottom: 2rem;
    display: grid;
    gap: 0.85rem;
}

.features-list li {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(249, 115, 22, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* --- FOOTER --- */
footer { border-top: 1px solid var(--border); padding: 2rem 5%; text-align: center; margin-top: 4rem; }
.footer-content p { color: var(--text-muted); font-size: 0.9rem; margin-top: 1rem; }

/* --- AUTH MODAL --- */
.auth-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 8, 0.74);
    backdrop-filter: blur(12px);
}

.auth-dialog {
    position: relative;
    width: min(100%, 520px);
    padding: 2rem;
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 35%),
        linear-gradient(180deg, rgba(24, 24, 27, 0.98), rgba(12, 12, 15, 0.98));
    border: 1px solid rgba(249, 115, 22, 0.16);
    box-shadow: var(--shadow-panel), 0 0 100px rgba(249, 115, 22, 0.18);
}

.auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.auth-copy {
    margin-bottom: 1.35rem;
}

.auth-copy h3 {
    margin-bottom: 0.45rem;
    font-size: 1.8rem;
    letter-spacing: -1px;
}

.auth-copy p {
    color: var(--text-muted);
}

.auth-status {
    margin-top: 0.8rem;
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(249, 115, 22, 0.12);
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.auth-status[data-state="loading"] {
    color: #fdba74;
    border-color: rgba(249, 115, 22, 0.2);
}

.auth-status[data-state="success"] {
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.28);
}

.auth-status[data-state="error"] {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.28);
}

.auth-actions {
    display: grid;
    gap: 0.95rem;
    margin-top: 1.2rem;
}

.google-button-slot {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.google-button-slot:empty {
    display: none;
}

/* --- TOASTS --- */
.toast-stack {
    position: fixed;
    top: 5.5rem;
    right: 1rem;
    display: grid;
    gap: 0.8rem;
    z-index: 400;
}

.toast {
    min-width: 280px;
    max-width: 360px;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(20, 20, 24, 0.96);
    border: 1px solid rgba(249, 115, 22, 0.14);
    color: var(--text-main);
    box-shadow: var(--shadow-panel), 0 0 55px rgba(249, 115, 22, 0.14);
    animation: toastIn 0.25s ease;
}

.toast.info { border-color: rgba(249, 115, 22, 0.2); }
.toast.success { border-color: rgba(34, 197, 94, 0.34); box-shadow: var(--shadow-panel), 0 0 55px rgba(34, 197, 94, 0.14); }
.toast.error { border-color: rgba(248, 113, 113, 0.34); box-shadow: var(--shadow-panel), 0 0 55px rgba(248, 113, 113, 0.14); }

/* --- ANIMATIONS (JS classes) --- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeArea {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pointIn {
    from {
        opacity: 0;
        transform: scale(0.4);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes growBar {
    to {
        transform: scaleX(1);
    }
}

@keyframes driftGlow {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(10px, -12px, 0) scale(1.08);
    }
}

@keyframes planPop {
    0% {
        transform: translateY(0) scale(1);
    }
    55% {
        transform: translateY(-12px) scale(1.04);
    }
    100% {
        transform: translateY(-10px) scale(1.02);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-8px) translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 1100px) {
    .dashboard-grid,
    .nutrition-grid {
        grid-template-columns: 1fr;
    }

    .split-analysis,
    .coaching-card {
        grid-column: auto;
    }

    .exercise-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .membership-card {
        grid-template-columns: 1fr;
    }

    .membership-actions {
        min-width: 0;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-actions { width: 100%; justify-content: flex-end; }
    .auth-chip { display: none; }
    .hero h1 { font-size: 4rem; letter-spacing: -2px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons a,
    .hero-buttons button { width: 100%; }
    .stats-container { flex-direction: column; align-items: stretch; }
    .stat-item { min-width: unset; }
    .features { border-radius: 30px; }
    .feature-card { border-radius: 24px; }
    .dashboard-grid,
    .exercise-grid,
    .nutrition-grid,
    .meal-grid,
    .coach-tip-list,
    .metric-strip { grid-template-columns: 1fr; }
    .muscle-row,
    .macro-row { grid-template-columns: 1fr; }
    .panel-top { flex-direction: column; align-items: flex-start; }
    .progress-rings { justify-content: flex-start; }
    .exercise-toolbar { justify-content: flex-start; overflow-x: auto; padding-bottom: 0.5rem; }
    .analysis-panel,
    .nutrition-card,
    .pricing-card { padding: 2rem; border-radius: 28px; }
    .exercise-card { border-radius: 28px; }
    .membership-actions {
        flex-direction: column;
    }
    .membership-actions .btn-primary,
    .membership-actions .btn-outline {
        width: 100%;
    }
    .auth-dialog {
        padding: 1.4rem;
        border-radius: 26px;
    }
    .toast-stack {
        left: 1rem;
        right: 1rem;
    }
    .toast {
        min-width: 0;
        max-width: none;
    }
    .chart-labels { font-size: 0.75rem; }
    .pricing-card.is-selected {
        transform: translateY(-6px) scale(1.01);
    }
}
