/* 
    FitDesi Premium Design System v3
    $10M Startup Aesthetic — Ultra Premium
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

:root {
    /* Page Backgrounds (Organic Light Theme) */
    --bg-1: #f8f7f2;
    --bg-2: #ffffff;
    --bg-3: #f3f2eb;
    --bg-4: #e9e8de;
    --bg-dark: var(--bg-1);
    --bg-card: var(--bg-2);
    --bg-elevated: var(--bg-2);
    --bg-input: var(--bg-2);

    /* Primary Theme - Olive Green */
    --primary: #596446;
    --primary-grad: linear-gradient(135deg, #596446 0%, #6b7756 100%);
    --primary-glow: rgba(89, 100, 70, 0.15);
    --primary-dark: #454d36;

    /* Theme Special Palette (Olive Dark) */
    --gemini-surface: #596446;
    --gemini-card: #f8f7f2;
    --gemini-border: rgba(255, 255, 255, 0.15);
    --gemini-blue: #c4a56d;
    --gemini-grad: linear-gradient(135deg, #596446 0%, #454d36 100%);

    /* Accent - Golden / Earthy */
    --accent: #c4a56d;
    --accent-grad: linear-gradient(135deg, #c4a56d 0%, #d4bf8d 100%);
    --accent-glow: rgba(196, 165, 109, 0.25);

    --success: #6b8e23;
    --protein: #596446;
    --carbs: #c4a56d;
    --fat: #8b4513;

    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #5c6352;
    --text-muted: #8a9180;

    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);
    --border: var(--glass-border);
    --border-bright: rgba(0, 0, 0, 0.08);
    --bg-glass: var(--glass);

    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 32px rgba(89, 100, 70, 0.08);
    --shadow-lg: 0 24px 48px rgba(89, 100, 70, 0.12);

    --ease-spring: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease: var(--ease-out);
    --transition: all 0.4s var(--ease-out);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-xl: 40px;
}

/* ═══════════ KEYFRAMES ═══════════ */
.spinner-sm {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(calc(100% + 24px)); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); max-height: 120px; margin-bottom: 10px; padding: 14px 18px; }
    to   { opacity: 0; transform: translateX(calc(100% + 24px)); max-height: 0; margin-bottom: 0; padding: 0 18px; }
}
@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ═══════════ FLASH / TOAST NOTIFICATIONS ═══════════ */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100vw - 40px);
    pointer-events: none;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.45;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.1);
    animation: toastSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    overflow: hidden;
    pointer-events: all;
}

.flash.dismissing {
    animation: toastSlideOut 0.3s ease forwards;
}

/* Progress bar at bottom */
.flash-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 14px 14px;
    animation: toastProgress linear forwards;
}

.flash-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.flash-body {
    flex: 1;
    min-width: 0;
}

.flash-title {
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 2px;
    opacity: 0.75;
}

.flash-text {
    color: inherit;
}

.flash-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    color: inherit;
    transition: opacity 0.15s;
    margin-top: 1px;
}
.flash-close:hover { opacity: 1; }

/* ── success ── */
.flash-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #16a34a;
}
.flash-success .flash-progress { background: #22c55e; }

/* ── error ── */
.flash-error {
    background: rgba(239, 68, 68, 0.13);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #dc2626;
}
.flash-error .flash-progress { background: #ef4444; }

/* ── info ── */
.flash-info {
    background: rgba(59, 130, 246, 0.13);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #2563eb;
}
.flash-info .flash-progress { background: #3b82f6; }

/* ── warning ── */
.flash-warning {
    background: rgba(245, 158, 11, 0.13);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #d97706;
}
.flash-warning .flash-progress { background: #f59e0b; }

/* ═══════════ GOOGLE SIGN-IN BUTTON ═══════════ */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
    padding: 14px 20px;
    background: var(--bg-2);
    border: 1.5px solid var(--glass-border);
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.google-btn:hover {
    background: var(--bg-3);
    border-color: rgba(66, 133, 244, 0.4);
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.15);
    transform: translateY(-1px);
    color: var(--text-primary);
}
.google-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 480px) {
    .flash-messages {
        top: 70px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: 100%;
    }
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(240, 160, 48, 0.08);
    }

    50% {
        box-shadow: 0 0 50px rgba(240, 160, 48, 0.2);
    }
}

@keyframes meshDrift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(3%, 3%) scale(1.05);
    }
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-16px);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes swapFlash {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
        background: var(--primary-glow);
    }

    100% {
        opacity: 1;
    }
}

@keyframes orbFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 40px) scale(0.95);
    }
}

@keyframes orbFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-40px, 30px) scale(1.05);
    }

    66% {
        transform: translate(30px, -50px) scale(0.9);
    }
}

@keyframes orbFloat3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, 20px) scale(1.08);
    }
}

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

@keyframes badgePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes heroImageIn {
    from {
        opacity: 0;
        transform: scale(0.9) rotate(-2deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

/* ═══════════ BASE ═══════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-1);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
.nav-title {
    font-family: 'Lora', serif;
    letter-spacing: -0.01em;
}

.metric-value,
.timer-display,
.step-number,
.proof-value,
.stat-value {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.03em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══════════ AMBIENT BG ═══════════ */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(89, 100, 70, 0.08), transparent 70%);
    top: -15%;
    left: -10%;
    animation: orbFloat1 25s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(196, 165, 109, 0.06), transparent 70%);
    bottom: -10%;
    right: -10%;
    animation: orbFloat2 30s ease-in-out infinite;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(89, 100, 70, 0.05), transparent 70%);
    top: 35%;
    left: 45%;
    animation: orbFloat3 20s ease-in-out infinite;
}

/* ═══════════ NAVIGATION ═══════════ */
.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(248, 247, 242, 0.82);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--glass-border);
    padding: 14px 0;
    /* Push nav content below Android status bar / iPhone notch */
    padding-top: calc(14px + env(safe-area-inset-top));
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
}

.nav-logo-wrap {
    position: relative;
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 4px 15px rgba(89, 100, 70, 0.15);
    border: 2px solid var(--primary);
    padding: 2px;
    transition: var(--transition);
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.nav-brand:hover .nav-logo-wrap {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 8px 25px rgba(89, 100, 70, 0.25);
}

.nav-logo-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Logo Ring removed - replaced by solid background */

.nav-title {
    font-family: 'Lora', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.nav-title-accent {
    background: var(--primary-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 50px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0.8;
    transition: var(--transition);
}

.nav-link:hover .nav-link-icon,
.nav-link.active .nav-link-icon {
    opacity: 1;
    transform: scale(1.05);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(89, 100, 70, 0.05);
}

.nav-link.active {
    color: #fff;
    background: var(--primary);
}

.nav-new-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    border-radius: 20px;
    padding: 2px 7px;
    margin-left: 2px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.4;
    box-shadow: 0 1px 4px rgba(230, 126, 34, 0.35);
}

.nav-link-ai:hover .nav-new-badge {
    background: linear-gradient(135deg, #cf6d17, #e67e22);
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links.open {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 2px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--glass-border);
}

.nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ═══════════ HERO ═══════════ */
.hero {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160%;
    height: 160%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(89, 100, 70, 0.04) 0%, transparent 60%);
    animation: meshDrift 25s infinite alternate linear;
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    animation: cardEnter 0.8s var(--ease-out) both;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(89, 100, 70, 0.06);
    border: 1px solid rgba(89, 100, 70, 0.12);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: badgePulse 2s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(40px, 5.5vw, 76px);
    line-height: 1.05;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.gradient-text {
    background: var(--primary-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 520px;
    line-height: 1.7;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.feature-pill {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition);
}

.feature-pill:hover {
    background: rgba(89, 100, 70, 0.05);
    border-color: rgba(89, 100, 70, 0.2);
    transform: translateY(-3px);
}

.pill-icon {
    font-size: 15px;
}

.hero-cta-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-cta-note {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    padding-left: 4px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: cardEnter 1s var(--ease-out) 0.2s both;
}

.hero-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hero-food-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    animation: heroImageIn 0.8s var(--ease-out) both;
    border: 1px solid var(--glass-border);
    transition: transform 0.4s var(--ease-out), opacity 0.5s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    opacity: 1;
}

.hero-food-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(240, 160, 48, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hfc-1 {
    grid-column: 1/3;
    animation-delay: 0.3s;
}

.hfc-2 {
    animation-delay: 0.5s;
}

.hfc-3 {
    animation-delay: 0.7s;
}

.hero-food-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.hero-food-card:hover .hero-food-img {
    transform: scale(1.08);
}

.hero-food-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 20px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    z-index: 2;
    color: #ffffff;
}

.hero-food-overlay h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-food-macros {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    gap: 6px;
    align-items: center;
}

.macro-dot-sep {
    opacity: 0.5;
}

/* Hero Floating Stats */
.hero-stat-float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(13, 13, 24, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.stat-1 {
    top: 15%;
    right: -10px;
    animation-delay: -1s;
}

.stat-2 {
    bottom: 20%;
    left: -10px;
    animation-delay: -3s;
}

.stat-icon {
    font-size: 24px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 15px;
    font-weight: 800;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ═══════════ BUTTONS ═══════════ */
.btn {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary-grad);
    background-size: 200% auto;
    color: #fff;
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(89, 100, 70, 0.25);
}

.btn-glow {
    box-shadow: 0 6px 24px var(--primary-glow), 0 0 40px rgba(89, 100, 70, 0.08);
}

.btn-glow:hover {
    box-shadow: 0 10px 36px rgba(89, 100, 70, 0.3), 0 0 60px rgba(89, 100, 70, 0.12);
}

.btn-secondary {
    background: var(--bg-3);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--bg-4);
    border-color: var(--primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 15px;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

.btn-arrow {
    transition: transform 0.3s var(--ease-out);
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ═══════════ SECTIONS ═══════════ */
.section {
    display: none;
    padding: 60px 0 80px;
    animation: sectionFadeIn 0.5s var(--ease);
}

.section.active {
    display: block;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
    position: sticky;
    top: 68px;
    z-index: 20;
    background: rgba(248, 247, 242, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 0 14px;
    margin-left: -2px;
    margin-right: -2px;
    border-bottom: 1px solid var(--bg-4);
}

.section-header-centered {
    text-align: center;
    margin-bottom: 48px;
}

.section-desc-centered {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    background: rgba(240, 160, 48, 0.08);
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 14px;
}

/* ═══════════ STEPS GRID ═══════════ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.step-card {
    background: var(--bg-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    display: flex;
    gap: 20px;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-6px);
    border-color: rgba(66, 133, 244, 0.25);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.step-number-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 44px;
    height: 44px;
    background: var(--gemini-grad);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.step-line {
    width: 2px;
    flex: 1;
    min-height: 20px;
    background: linear-gradient(to bottom, var(--gemini-blue), transparent);
    border-radius: 2px;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ═══════════ SOCIAL PROOF ═══════════ */
.social-proof-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 32px 40px;
    background: var(--bg-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.proof-item {
    text-align: center;
}

.proof-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    background: var(--gemini-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.proof-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.proof-divider {
    width: 1px;
    height: 40px;
    background: var(--glass-border);
}

/* ═══════════ PROFILE FORM ═══════════ */
.profile-form {
    background: var(--bg-2);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 44px;
    border-radius: var(--radius-xl);
    max-width: 860px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

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

.form-group.full-width {
    grid-column: 1/-1;
}

.form-group label,
.form-sublabel {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label-icon {
    font-size: 14px;
}

.form-section-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: var(--text-primary) !important;
    margin-bottom: 12px !important;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-bright);
    border-radius: 14px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    /* Improve interactivity */
    cursor: pointer;
}

/* Custom Select Arrow - ensuring it doesn't block clicks */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23596446' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 48px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(89, 100, 70, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* Height Unit Toggle */
.height-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.unit-toggle {
    display: flex;
    background: var(--bg-3);
    padding: 3px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.unit-btn {
    padding: 4px 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.unit-btn.active {
    background: var(--primary-grad);
    color: #fff;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.height-ft-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(89, 100, 70, 0.1), 0 0 20px rgba(89, 100, 70, 0.05);
}

.radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-card {
    flex: 1;
    min-width: 110px;
    cursor: pointer;
}

.radio-card input {
    display: none;
}

.radio-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
}

.radio-emoji {
    font-size: 22px;
}

.radio-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.radio-card input:checked+.radio-label {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(89, 100, 70, 0.15);
}

.radio-card input:checked+.radio-label .radio-text {
    color: rgba(255, 255, 255, 0.9);
}

.cuisine-pref {
    margin-top: 16px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.toggle-row input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    width: 48px;
    height: 26px;
    background: var(--bg-4);
    border-radius: 50px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: var(--transition);
}

input:checked+.toggle-switch {
    background: var(--primary);
}

input:checked+.toggle-switch::before {
    transform: translateX(22px);
    background: #000;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-label small {
    color: var(--text-muted);
    font-weight: 400;
}

/* ═══════════ METRICS PANEL ═══════════ */
.metrics-panel {
    background: var(--bg-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 44px;
    margin-top: 48px;
    box-shadow: var(--shadow-lg);
    animation: cardEnter 0.6s var(--ease-out);
}

.metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.metrics-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}

.metrics-note {
    color: var(--text-muted);
    font-size: 12px;
}

.metrics-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(240, 160, 48, 0.08);
    border: 1px solid rgba(240, 160, 48, 0.15);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

.metrics-badge-icon {
    font-size: 14px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.metric-card {
    background: var(--bg-3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: rgba(240, 160, 48, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.metric-card.highlight {
    animation: pulseGlow 4s infinite;
    border-color: rgba(240, 160, 48, 0.3);
}

.metric-icon-wrap {
    font-size: 24px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 36px;
    font-weight: 800;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-tag {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    display: inline-block;
    margin-top: 6px;
}

.metrics-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.btn-metric-action {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 32px;
    border-radius: 24px;
    text-align: left;
    height: auto;
    border: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--bg-1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.btn-metric-action.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 15px 35px var(--primary-glow);
}

.btn-metric-action.btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.btn-metric-action:hover {
    transform: translateY(-8px) scale(1.02);
}

.btn-metric-action .btn-icon {
    font-size: 32px;
    background: rgba(255, 255, 255, 0.15);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: transform 0.4s var(--ease-out);
}

.btn-metric-action.btn-secondary .btn-icon {
    background: rgba(89, 100, 70, 0.05);
}

.btn-metric-action:hover .btn-icon {
    transform: rotate(-10deg) scale(1.1);
}

.btn-metric-action .btn-content {
    display: flex;
    flex-direction: column;
}

.btn-metric-action .btn-main {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Lora', serif;
    display: block;
    margin-bottom: 2px;
}

.btn-metric-action .btn-sub {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
}

.macro-bar-container {
    margin-bottom: 28px;
}

.macro-bar-container h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.macro-bar {
    height: 12px;
    background: var(--bg-4);
    border-radius: 50px;
    overflow: hidden;
    display: flex;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 16px 0;
}

.macro-segment {
    height: 100%;
    transition: width 1s var(--ease-out);
}

.macro-segment.protein {
    background: var(--protein);
    box-shadow: 0 0 12px var(--protein);
}

.macro-segment.carbs {
    background: var(--carbs);
    box-shadow: 0 0 12px var(--carbs);
}

.macro-segment.fat {
    background: var(--fat);
    box-shadow: 0 0 12px var(--fat);
}

.macro-labels {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.macro-label {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.macro-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.protein-dot,
.protein-text .macro-dot {
    background: var(--protein);
}

.carbs-dot,
.carbs-text .macro-dot {
    background: var(--carbs);
}

.fat-dot,
.fat-text .macro-dot {
    background: var(--fat);
}

/* ═══════════ DAY TABS ═══════════ */
.day-tabs {
    display: flex;
    background: var(--bg-3);
    padding: 5px;
    border-radius: var(--radius-md);
    gap: 4px;
    margin-bottom: 28px;
    overflow-x: auto;
}

.day-tab {
    flex: 1;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
}

.day-tab:hover {
    color: var(--text-secondary);
}

.day-tab.active {
    background: var(--bg-1);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ═══════════ MEAL & EXERCISE CARDS ═══════════ */
.meal-card,
.exercise-card {
    display: grid;
    grid-template-columns: 85px 1fr auto auto;
    align-items: center;
    gap: 32px;
    padding: 32px;
    margin-bottom: 20px;
    background: var(--bg-2);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    border-left: 6px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.meal-card:hover,
.exercise-card:hover {
    transform: translateY(-4px) scale(1.005);
    border-color: rgba(240, 160, 48, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.meal-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.02) 0%, transparent 40%);
    pointer-events: none;
}

.meal-card[data-type="early_morning"] { border-left-color: #fbd38d; }
.meal-card[data-type="breakfast"]     { border-left-color: #ffd93d; }
.meal-card[data-type="mid_morning_snack"],
.meal-card[data-type="snack"]         { border-left-color: #feb2b2; }
.meal-card[data-type="lunch"]         { border-left-color: #4ecdc4; }
.meal-card[data-type="evening_snack"] { border-left-color: #a29bfe; }
.meal-card[data-type="dinner"]        { border-left-color: #6c5ce7; }

.meal-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-3);
    padding: 12px 8px;
    border-radius: 20px;
    min-width: 85px;
    min-height: 85px;
    width: 85px;
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.meal-time-icon {
    font-size: 32px;
    margin-bottom: 4px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    flex-shrink: 0;
}

.meal-time-label {
    font-size: 9.5px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
    hyphens: none;
}

.meal-info h4 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
    font-family: 'Lora', serif;
    background: var(--text-primary);
    -webkit-background-clip: text;
    background-clip: text;
}

.meal-info p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.meal-footer-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.meal-serving {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-4);
    padding: 4px 12px;
    border-radius: 50px;
}

.meal-macros {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-3);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-right: 8px; /* give some breathing room from the swap button */
}

.meal-macro {
    text-align: center;
    min-width: 54px;
    padding: 4px 0;
    position: relative;
}

.meal-macro:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 25%;
    bottom: 25%;
    width: 1px;
    background: var(--glass-border);
}

.meal-macro-value {
    display: block;
    font-weight: 800;
    font-size: 17px;
    font-family: 'Outfit', sans-serif;
}

.meal-macro-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.swap-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 15px 7px 11px;
    border-radius: 20px;
    background: linear-gradient(135deg, #7a8c5a 0%, #596446 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(89, 100, 70, 0.35);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.swap-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    border-radius: inherit;
    pointer-events: none;
}

.swap-btn .swap-icon {
    font-size: 13px;
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
}

.swap-btn:hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 6px 18px rgba(89, 100, 70, 0.5);
    background: linear-gradient(135deg, #8a9e68 0%, #6b7756 100%);
}

.swap-btn:hover .swap-icon {
    transform: rotate(180deg);
}

.swap-btn:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 2px 8px rgba(89, 100, 70, 0.3);
}

.swapping {
    animation: swapFlash 0.4s ease;
}

.day-totals {
    background: var(--bg-3);
    border: 1px solid rgba(240, 160, 48, 0.2);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    justify-content: space-around;
    margin-top: 28px;
}

.total-item {
    text-align: center;
}

.total-value {
    font-size: 22px;
    font-weight: 800;
    display: block;
    font-family: 'Outfit', sans-serif;
}

.total-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.total-target {
    font-size: 11px;
    color: var(--text-muted);
}

.total-value.over {
    color: #e74c3c;
}

.total-value.under {
    color: #2ecc71;
}

/* ═══════════ EXERCISE CARD EXTRAS ═══════════ */
.exercise-number {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(240, 160, 48, 0.1);
    color: var(--primary);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
}

.exercise-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.exercise-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.exercise-tag.muscle {
    background: rgba(78, 205, 196, 0.1);
    color: var(--protein);
}

.exercise-tag.type {
    background: rgba(255, 217, 61, 0.1);
    color: var(--carbs);
}

.rest-day-card {
    text-align: center;
    padding: 60px 24px;
    background: var(--bg-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.rest-day-card .rest-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.rest-day-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.rest-day-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(240, 160, 48, 0.08);
    border: 1px solid rgba(240, 160, 48, 0.12);
    border-radius: 50px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 16px;
}

/* ═══════════ TRACKER ═══════════ */
.tracker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tracker-card {
    background: var(--bg-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
}

.tracker-card:hover {
    border-color: rgba(240, 160, 48, 0.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.tracker-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tracker-card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.tracker-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: rgba(240, 160, 48, 0.08);
    padding: 4px 10px;
    border-radius: 50px;
}

.water-tracker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.water-progress-ring {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.water-progress-ring svg {
    transform: rotate(-90deg);
}

.water-bg {
    stroke: var(--bg-4);
    stroke-width: 8;
    fill: transparent;
}

.water-fill {
    stroke: var(--protein);
    stroke-width: 8;
    fill: transparent;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s var(--ease-out);
    filter: drop-shadow(0 0 8px var(--protein));
}

.water-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.water-amount {
    font-size: 36px;
    font-weight: 800;
    color: var(--protein);
    font-family: 'Outfit', sans-serif;
}

.water-unit {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
}

.water-buttons {
    display: flex;
    gap: 8px;
}

.water-liters {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.timer-display {
    font-size: 80px;
    font-weight: 800;
    text-align: center;
    margin: 16px 0;
    font-variant-numeric: tabular-nums;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'JetBrains Mono', 'Outfit', monospace;
}

.timer-presets {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

.timer-preset {
    background: var(--bg-3);
    border: 1px solid var(--border-bright);
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 12px;
}

.timer-preset.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.rest-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.timer-buttons {
    display: flex;
    gap: 8px;
}

.weight-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.weight-input-row input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
}

.weight-input-row input:focus {
    outline: none;
    border-color: var(--primary);
}

.weight-chart-container {
    width: 100%;
    margin-bottom: 12px;
}

.weight-chart-container canvas {
    width: 100%;
    border-radius: 8px;
    background: var(--bg-3);
}

.weight-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.weight-stats strong {
    color: var(--text-primary);
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ═══════════ MODALS ═══════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-card {
    background: var(--bg-2);
    border: 1px solid var(--glass-border);
    border-top: 3px solid var(--primary);
    padding: 40px;
    border-radius: var(--radius-lg);
    max-width: 540px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.5s var(--ease-out);
}

.modal-card-wide {
    max-width: 640px;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    justify-content: flex-end;
}

.btn-rich {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 12px;
    height: 50px;
    min-width: 140px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-rich:hover {
    transform: translateY(-3px) scale(1.02);
}

.btn-rich .btn-icon {
    font-size: 16px;
    margin: 0 4px;
}

.btn-secondary.btn-rich {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-secondary.btn-rich:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.modal-actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* ═══════════ SWAP MODAL ═══════════ */
.swap-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.18s ease;
}

.swap-modal-box {
    background: var(--bg-2);
    border: 1px solid rgba(89, 100, 70, 0.15);
    border-radius: 28px;
    width: 100%;
    max-width: 640px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0,0,0,0.32), 0 0 0 1px rgba(255,255,255,0.06);
    animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.swap-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 28px 22px;
    background: linear-gradient(135deg, rgba(89,100,70,0.08) 0%, rgba(196,165,109,0.06) 100%);
    border-bottom: 1px solid rgba(89,100,70,0.1);
    flex-shrink: 0;
    gap: 16px;
}

.swap-modal-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.swap-modal-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-grad);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px var(--primary-glow);
}

.swap-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.swap-modal-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0;
}

.swap-modal-close-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.swap-modal-close-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.swap-result-count {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 10px 28px 8px;
    flex-shrink: 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--bg-2);
}

/* Swap Alternatives */
.swap-alternatives-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 16px 24px 24px;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(89,100,70,0.2) transparent;
}

.swap-alternatives-list::-webkit-scrollbar {
    width: 5px;
}

.swap-alternatives-list::-webkit-scrollbar-track {
    background: transparent;
}

.swap-alternatives-list::-webkit-scrollbar-thumb {
    background: rgba(89,100,70,0.2);
    border-radius: 4px;
}

.swap-alt-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg-1);
    border: 1.5px solid var(--glass-border);
    border-radius: 18px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.swap-alt-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-grad);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.swap-alt-card:hover {
    border-color: rgba(89,100,70,0.4);
    background: var(--bg-2);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(89,100,70,0.13);
}

.swap-alt-card:hover::before {
    opacity: 1;
}

.swap-alt-card:active {
    transform: translateY(0);
    box-shadow: none;
}

.swap-alt-info {
    flex: 1;
    min-width: 0;
}

.swap-alt-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swap-alt-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swap-alt-macros {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.swap-macro-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    padding: 7px 8px;
    border-radius: 10px;
    background: var(--bg-3);
}

.swap-macro-pill.cal  { background: rgba(196,165,109,0.14); }
.swap-macro-pill.prot { background: rgba(34,139,87,0.11); }
.swap-macro-pill.carb { background: rgba(59,130,246,0.09); }
.swap-macro-pill.fat  { background: rgba(239,116,53,0.09); }

.swap-macro-val {
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 3px;
}

.swap-macro-pill.cal  .swap-macro-val { color: #b8892a; }
.swap-macro-pill.prot .swap-macro-val { color: #22884a; }
.swap-macro-pill.carb .swap-macro-val { color: #3b82f6; }
.swap-macro-pill.fat  .swap-macro-val { color: #ef7435; }

.swap-macro-lbl {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    line-height: 1;
}

.swap-alt-arrow {
    font-size: 20px;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-weight: 300;
}

.swap-alt-card:hover .swap-alt-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary);
}

.swap-no-alts {
    text-align: center;
    padding: 40px 28px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Meat Preferences */
.meat-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.meat-checkbox-card {
    cursor: pointer;
}

.meat-checkbox-card input {
    display: none;
}

.meat-checkbox-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px;
    background: var(--bg-3);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.meat-checkbox-card input:checked+.meat-checkbox-label {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.meat-checkbox-label:hover {
    border-color: rgba(240, 160, 48, 0.3);
    transform: translateY(-2px);
}

.meat-emoji {
    font-size: 34px;
    line-height: 1;
    flex-shrink: 0;
}

.meat-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.meat-checkbox-card input:checked+.meat-checkbox-label .meat-name {
    color: var(--primary);
}

.meat-prefs-summary {
    margin-top: 12px;
    padding: 10px 16px;
    background: rgba(240, 160, 48, 0.05);
    border: 1px solid rgba(240, 160, 48, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.meat-summary-label {
    color: var(--text-muted);
    font-weight: 500;
}

#meat-summary-text {
    color: var(--primary);
    font-weight: 600;
    flex: 1;
}

.btn-edit-meats {
    background: none;
    border: 1px solid rgba(240, 160, 48, 0.25);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
}

.btn-edit-meats:hover {
    background: rgba(240, 160, 48, 0.08);
    border-color: var(--primary);
}

/* Recipe & Exercise Links */
.meal-recipe {
    margin-top: 6px;
}

.recipe-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recipe-toggle {
    background: none;
    border: none;
    color: var(--primary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.recipe-toggle:hover {
    text-decoration: underline;
}

.ai-recipe-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    color: white;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-recipe-btn:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ai-recipe-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.toggle-arrow {
    transition: transform 0.2s ease;
    font-size: 10px;
}

.meal-recipe.open .toggle-arrow {
    transform: rotate(90deg);
}

.recipe-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.meal-recipe.open .recipe-content {
    max-height: 1000px;
    /* Increased for AI recipes */
    overflow-y: auto;
    padding-top: 10px;
}

.recipe-content p,
.original-recipe {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    padding: 12px 16px;
    background: var(--bg-hover);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    margin-bottom: 15px;
}

.ai-recipe-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    width: fit-content;
    border: 1px solid var(--accent);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.ai-generated-recipe {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
}

.ai-generated-recipe ul,
.ai-generated-recipe ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.ai-generated-recipe li {
    margin-bottom: 6px;
}

.ai-generated-recipe h4,
.ai-generated-recipe h5 {
    color: var(--accent);
    margin: 15px 0 8px 0;
    font-family: 'Lora', serif;
}

.recipe-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.recipe-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.exercise-video-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(240, 160, 48, 0.06);
    border: 1px solid rgba(240, 160, 48, 0.12);
    transition: var(--transition);
}

.exercise-video-link:hover {
    transform: scale(1.05);
    background: var(--primary);
    color: #000;
}

/* Weight Loss */
.weight-loss-section {
    animation: sectionFadeIn 0.3s ease;
}

.weight-loss-feedback {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-top: 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    animation: sectionFadeIn 0.3s ease;
}

.weight-loss-feedback.good {
    background: rgba(0, 212, 170, 0.08);
    color: var(--success);
    border: 1px solid rgba(0, 212, 170, 0.15);
}

.weight-loss-feedback.warning {
    background: rgba(240, 160, 48, 0.08);
    color: var(--primary);
    border: 1px solid rgba(240, 160, 48, 0.15);
}

.weight-loss-feedback.danger {
    background: rgba(255, 107, 107, 0.08);
    color: var(--fat);
    border: 1px solid rgba(255, 107, 107, 0.15);
}

.stale-plan-banner {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.35);
    color: #c8960a;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.875rem;
    margin-bottom: 12px;
    text-align: center;
}

.generate-error-msg {
    background: rgba(255, 80, 80, 0.1);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: #d63333;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.875rem;
    margin-bottom: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

/* ═══════════ GROCERY ═══════════ */
.grocery-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.grocery-category {
    background: var(--bg-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.grocery-category:hover {
    border-color: rgba(240, 160, 48, 0.15);
}

.grocery-cat-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.grocery-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grocery-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.grocery-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.grocery-item input {
    display: none;
}

.grocery-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.grocery-item input:checked~.grocery-check {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.grocery-item input:checked~.grocery-name {
    text-decoration: line-through;
    opacity: 0.4;
}

.grocery-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.grocery-qty {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ═══════════ NUTRITION LOOKUP ═══════════ */
.nutrition-search-wrap {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto 24px;
}

.nutrition-search-input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.nutrition-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(240, 160, 48, 0.1);
}

.off-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.off-card {
    background: var(--bg-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.off-card:hover {
    transform: translateY(-4px);
    border-color: rgba(240, 160, 48, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.off-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-3);
}

.off-card-body {
    padding: 18px;
}

.off-card-body h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.off-card-macros {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.off-macro {
    font-size: 11px;
    color: var(--text-secondary);
}

.off-macro strong {
    color: var(--text-primary);
}

/* ═══════════ EMPTY STATES ═══════════ */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-illustration {
    margin-bottom: 20px;
}

.empty-state-img {
    width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

/* ═══════════ FOOTER ═══════════ */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 48px 0 32px;
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.footer-logo {
    font-size: 20px;
}

.footer-title {
    font-size: 20px;
    font-weight: 800;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.footer-flags {
    font-size: 18px;
    letter-spacing: 4px;
    margin-bottom: 14px;
}

.footer-links {
    font-size: 11px;
    color: var(--text-muted);
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-sep {
    margin: 0 6px;
    opacity: 0.3;
}

/* ═══════════ PRINT AREA ═══════════ */
#print-all-area {
    display: none;
}

.print-day-block {
    margin-bottom: 40px;
    page-break-after: always;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.print-day-block:last-child {
    page-break-after: auto;
    border-bottom: none;
}

/* ═══════════ MOBILE ═══════════ */
@media (max-width:768px) {
    .hero {
        padding: 40px 0 20px;
    }

    .container {
        padding: 0 20px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .hero-title {
        font-size: 38px;
    }

    .hero-subtitle {
        font-size: 16px;
        margin: 0 auto 24px;
    }

    .hero-visual {
        display: none;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 12px;
    }

    .hero-cta-group .btn {
        width: 100%;
    }

    /* Navigation */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-1);
        flex-direction: column;
        padding: 24px;
        border-bottom: 2px solid var(--border);
        box-shadow: var(--shadow-md);
        z-index: 1000;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 14px 20px;
        background: rgba(89, 100, 70, 0.03);
        margin-bottom: 8px;
        border-radius: 12px;
    }

    /* Section Visibility */
    .social-proof-section,
    .how-it-works-section {
        display: none !important;
    }

    /* AI Coach Optimization */
    .ai-coach-section {
        padding: 40px 0;
        margin-top: 10px;
    }

    .ai-coach-container {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 32px;
    }

    .ai-coach-title {
        font-size: 30px;
        margin-bottom: 12px;
    }

    .ai-coach-desc {
        font-size: 14px;
        margin: 0 auto 20px;
        max-width: 100%;
    }

    .ai-coach-input-wrap {
        margin: 0 auto 20px;
        max-width: 100%;
    }

    .ai-coach-suggestions {
        justify-content: center;
    }

    /* Layout Grids */
    .metrics-grid,
    .tracker-grid,
    .features-grid,
    .testimonials-grid,
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    .feature-card,
    .testimonial-card {
        padding: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .meal-card,
    .exercise-card {
        grid-template-columns: 1fr;
        padding: 20px 16px;
        gap: 16px;
        text-align: center;
    }
    .meal-time { margin: 0 auto; width: 90px; min-width: 90px; }
    .meal-info h4 { font-size: 17px; }
    .meal-info p { font-size: 13px; }
    .meal-footer-meta { justify-content: center; }
    .meal-macros { justify-content: center; margin-right: 0; padding: 10px 12px; width: 100%; box-sizing: border-box; }
    .swap-btn { align-self: center; width: 100%; justify-content: center; margin-top: 0; }

    .section-header,
    .section-header-centered {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        margin-bottom: 30px;
    }

    /* Component Adjustments */
    .macro-labels,
    .day-totals {
        flex-direction: column;
        gap: 12px;
    }

    .meat-checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .swap-btn {
        align-self: flex-end;
        margin-top: 8px;
    }

    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal-card {
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-width: 100%;
        animation: slideUp 0.5s var(--ease-out);
    }

    .container[style*="margin-top:100px"] {
        margin-top: 40px !important;
    }
}

@media (max-width:480px) {
    .hero-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 24px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .timer-display {
        font-size: 48px;
    }

    .water-progress-ring {
        width: 120px;
        height: 120px;
    }

    .water-amount {
        font-size: 28px;
    }

    .day-totals {
        flex-direction: column;
    }

    .step-card {
        padding: 24px 16px;
    }

    .profile-form {
        padding: 24px 18px;
    }

    .meal-card,
    .exercise-card {
        padding: 16px 14px;
        gap: 14px;
        border-radius: 20px;
    }
    .meal-time { width: 80px; min-width: 80px; }
    .meal-time-icon { font-size: 28px; }
    .meal-info h4 { font-size: 15px; }
    .meal-macros { gap: 8px; padding: 8px 10px; }
    .meal-macro-value { font-size: 15px; }
    .meal-macro-label { font-size: 8px; }
}

/* ═══════════ NEW SECTIONS: WHY, AI COACH, TESTIMONIALS ═══════════ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon-wrap {
    width: 64px;
    height: 64px;
    background: var(--bg-elevated);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 24px;
}

.ai-coach-section {
    background: var(--gemini-surface);
    padding: 100px 0;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--gemini-border);
    border-bottom: 1px solid var(--gemini-border);
}

.ai-coach-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.ai-coach-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-coach-title {
    font-family: 'Lora', serif;
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #f8f7f2;
}

.ai-coach-title-accent {
    font-style: italic;
    color: #f8f7f2;
    display: inline-block;
}

.ai-coach-desc {
    font-size: 18px;
    color: rgba(248, 247, 242, 0.85);
    margin-bottom: 40px;
    max-width: 500px;
}

.ai-coach-input-wrap {
    position: relative;
    max-width: 460px;
    margin-bottom: 24px;
}

.ai-coach-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    padding: 20px 70px 20px 30px;
    color: #f8f7f2;
    font-size: 16px;
    transition: var(--transition);
}

.ai-coach-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(196, 165, 109, 0.2);
}

.ai-coach-send-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 48px;
    height: 48px;
    background: var(--accent-grad);
    border: none;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.ai-coach-send-btn:hover {
    transform: scale(1.05);
}

.ai-coach-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ai-suggestion-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 8px 16px;
    color: rgba(248, 247, 242, 0.8);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.ai-suggestion-pill:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: var(--accent);
}

.ai-coach-response-area {
    position: relative;
}

.ai-coach-placeholder {
    height: 400px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.ai-coach-login-prompt {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.ai-login-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.ai-login-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    width: fit-content;
}

.ai-register-link {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.ai-register-link:hover {
    color: rgba(255, 255, 255, 1);
}

.ai-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.ai-coach-response-card {
    background: var(--gemini-card);
    color: #1a1a1a;
    padding: 40px;
    border-radius: 32px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 30px 60px rgba(89, 100, 70, 0.15);
    position: relative;
    z-index: 2;
    animation: cardEnter 0.6s var(--ease-out);
}

.ai-response-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.ai-response-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ai-response-label {
    font-weight: 700;
    font-size: 16px;
}

.ai-response-body {
    font-size: 16px;
    line-height: 1.6;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 15px;
}

.ai-response-body b {
    color: var(--primary-dark);
}

.ai-response-body ul {
    margin-top: 10px;
    padding-left: 20px;
}

.ai-ask-another {
    margin-top: 30px;
    background: none;
    border: none;
    color: var(--primary-dark);
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.testimonial-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 40px;
    border: 1px solid var(--border);
}

.testimonial-text {
    font-size: 20px;
    font-family: 'Outfit', sans-serif;
    font-style: italic;
    margin-bottom: 32px;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.testimonial-avatar {
    width: 56px;
    height: 56px;
    background: var(--primary-grad);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #000;
}

.testimonial-name {
    font-weight: 700;
    margin-bottom: 2px;
}

.testimonial-role {
    font-size: 14px;
    color: var(--text-muted);
}

/* ═══════════ FOOTER ═══════════ */
.footer {
    background: #06060e;
    border-top: 1px solid var(--border);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* footer-logo removed */

.footer-title {
    font-family: 'Lora', serif;
    font-weight: 500;
    font-size: 28px;
    color: var(--primary);
    letter-spacing: -0.01em;
}

.footer-tagline {
    color: var(--text-secondary);
    max-width: 320px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.footer-flags {
    font-size: 20px;
    margin-bottom: 32px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.footer-col-title {
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.footer-link-list {
    list-style: none;
    padding: 0;
}

.footer-link-list li {
    margin-bottom: 16px;
}

.footer-link-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link-list a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Redundant media queries removed - consolidated and updated above */

/* ═══════════ EQUIPMENT BADGE ═══════════ */
.equipment-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--accent-grad);
    color: #1a1a1a;
    padding: 4px 14px;
    border-radius: 50px;
    margin-left: 10px;
    vertical-align: middle;
    font-family: 'Inter', sans-serif;
}

/* ═══════════ PRINT ═══════════ */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .nav,
    .btn,
    .hero,
    .tracker-card,
    .footer,
    .ambient-bg,
    .social-proof-bar,
    .nutrition-lookup,
    .hero-visual,
    .ai-coach-section,
    .features-grid,
    .testimonials-grid {
        display: none !important;
    }

    .section {
        display: block !important;
        padding: 0 !important;
    }

    .container {
        max-width: 100% !important;
    }

    .meal-card,
    .exercise-card {
        border: 1px solid #eee !important;
        page-break-inside: avoid;
    }

    .metric-card {
        border: 1px solid #ddd !important;
    }

    #print-all-area {
        display: block !important;
        background: white !important;
        color: black !important;
        padding: 40px !important;
    }

    .day-tabs,
    .section-header button,
    .swap-btn,
    .recipe-toggle,
    .exercise-video-link,
    .export-options {
        display: none !important;
    }

    body.full-print .section {
        display: none !important;
    }

    .meal-info h4,
    .exercise-info h4 {
        color: #000 !important;
    }

    .day-totals {
        background: #f9f9f9 !important;
        border: 1px solid #ddd !important;
        color: #000 !important;
    }
}

/* ═══════════ LOGO POP-OUT ═══════════ */
.logo-pop-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #f8f7f2 !important;
    /* Solid fallback */
    background: rgba(248, 247, 242, 0.99) !important;
    z-index: 99999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.logo-pop-container {
    text-align: center;
    animation: logoZoomIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-pop-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 8px solid var(--primary);
    box-shadow: 0 30px 60px rgba(89, 100, 70, 0.3);
    margin-bottom: 30px;
    object-fit: cover;
}

.logo-pop-text {
    font-family: 'Lora', serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 0.5s;
}

.logo-pop-timer {
    margin-top: 20px;
    height: 4px;
    background: var(--border);
    width: 250px;
    border-radius: 2px;
    overflow: hidden;
    margin: 30px auto 0;
}

.logo-pop-progress {
    height: 100%;
    background: var(--primary-grad);
    width: 0%;
    animation: progressFill 2s linear forwards;
}

@keyframes logoZoomIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes progressFill {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@media (max-width:768px) {
    .logo-pop-img {
        width: 220px;
        height: 220px;
    }

    .logo-pop-text {
        font-size: 36px;
    }
}
/* ═══════════ MODALS ═══════════ */


.modal-header {
    padding: 22px 24px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(89,100,70,0.06) 0%, rgba(196,165,109,0.04) 100%);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.btn-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 1px solid var(--glass-border);
    font-size: 15px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-close:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.modal-body {
    padding: 24px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.meat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.meat-option {
    display: block;
    cursor: pointer;
}

.meat-option input {
    display: none;
}

.meat-option-content {
    padding: 18px 16px;
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
    background: var(--bg-1);
}

.meat-option-content:hover {
    border-color: rgba(89,100,70,0.3);
    background: var(--bg-2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(89,100,70,0.08);
}

.meat-option input:checked + .meat-option-content {
    background: var(--primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px var(--primary-glow);
    transform: translateY(-1px);
}

.meat-option input:checked + .meat-option-content .meat-name {
    color: white;
}

.meat-option input:checked + .meat-option-content .meat-emoji {
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.5));
}

.modal-footer {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.modal-footer .btn-primary {
    padding: 14px 32px;
    font-size: 15px;
    border-radius: 50px;
    letter-spacing: 0.01em;
}

.modal-footer .btn-outline {
    padding: 14px 24px;
    font-size: 14px;
    border-radius: 50px;
}

/* ═══════════ FEEDBACK MODAL ═══════════ */
.feedback-modal-box {
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.18);
    border: 1px solid var(--glass-border);
}

.feedback-form-group {
    margin-bottom: 16px;
}

.feedback-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.feedback-input,
.feedback-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--glass-border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.feedback-input:focus,
.feedback-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.feedback-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ═══════════ PRINT STYLES ═══════════ */
/* Print uses a new window (window.open) with inline CSS — no styles needed here */
#print-all-area { display: none; }

/* ═══════════ MOBILE FIXES (must stay at EOF — overrides globals above) ═══════════ */
@media (max-width: 768px) {

    /* ── Modal dialog: remove outer card padding, sections own their spacing ── */
    .modal-card {
        padding: 0;
        overflow-x: hidden;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }

    .modal-header {
        padding: 14px 16px 12px;
    }

    .modal-header h3 {
        font-size: 16px;
    }

    .modal-body {
        padding: 14px 16px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* ── Modal footer: wrap buttons so they don't overflow screen width ── */
    .modal-footer {
        padding: 12px 16px 18px;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: stretch;
    }

    .modal-footer .btn-primary {
        padding: 12px 18px;
        flex: 1;
        min-width: 0;
        text-align: center;
        justify-content: center;
    }

    .modal-footer .btn-outline {
        padding: 12px 14px;
        flex: 0 0 auto;
    }

    /* ── Meat preference grid: tighten cells on narrow screens ── */
    .meat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .meat-option-content {
        padding: 10px 8px;
        gap: 8px;
    }

    /* ── View Diet / Workout buttons: stack single-column ── */
    /* (grid-template-columns overrides display:grid; flex-direction has no effect on grids) */
    .metrics-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .btn-metric-action {
        padding: 16px 18px;
        gap: 12px;
    }

    .btn-metric-action .btn-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
        border-radius: 12px;
        flex-shrink: 0;
    }

    .btn-metric-action .btn-main {
        font-size: 15px;
    }

    .btn-metric-action .btn-sub {
        font-size: 12px;
    }

    /* ── Android / iOS safe area: push bottom-sheet modal above nav bar ── */
    .modal-overlay {
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Ensure modal footer itself also clears the nav bar as a fallback */
    .modal-footer {
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }
}


