:root {
    /* Dark Theme Default (Antigravity Style) */
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --accent: #dfaf60; /* Ein warmer, back-ähnlicher Akzent */
    --surface: rgba(255, 255, 255, 0.05);
    --surface-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(20, 20, 20, 0.6);
    --text-muted: #a1a1a6;
}

[data-theme="light"] {
    --bg-color: #eeebe3; /* Ein satteres Natur-Creme (Papier/Mehl), extrem edel */
    --text-color: #1a1a1a;
    --accent: #b37f28; 
    --surface: #ffffff; /* Leuchtend weiß auf Creme */
    --surface-border: rgba(0, 0, 0, 0.12); /* Schärfere Kante */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --text-muted: #666666;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100dvh;
    overflow-x: hidden;
    position: relative; /* WICHTIG: Damit position: absolute beim child funktioniert! */
}

body.home-scrollstop {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden !important;
}

body.home-scrollstop .hero {
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding-top: calc(75px + 4vh);
    padding-bottom: 0;
    overflow: hidden;
    position: relative;
    z-index: 5;
}

body.home-scrollstop .footer-huge-text {
    width: 100%;
    text-align: center;
    font-size: min(14.5vw, 21vh);
    font-weight: 800;
    line-height: 0.85;
    color: var(--text-color);
    letter-spacing: -3px;
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    z-index: -1; /* Hinter allem */
    pointer-events: none; /* Klicks gehen durch */
    overflow: hidden;
}

.header {
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
    pointer-events: auto;
}

.logo {
    display: none;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -1px;
}

.main-nav {
    display: flex;
    gap: 3rem;
    background: var(--surface);
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--surface-border);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    opacity: 0.6;
    transition: all 0.2s;
    font-size: 1.4rem;
}

.nav-link.active, .nav-link:hover {
    opacity: 1;
    color: var(--accent);
}

.header-actions {
    position: absolute;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

.header-actions .theme-btn,
.header-actions .pwa-install-btn {
    position: static !important;
    right: auto !important;
    top: auto !important;
    margin: 0 !important;
}

.theme-btn {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.6rem;
    backdrop-filter: blur(10px);
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

/* Fallback if not wrapped in .header-actions */
.header > .theme-btn {
    position: absolute;
    right: 40px;
}

.theme-btn:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
}

.pwa-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.3rem;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
}

.pwa-install-btn .pwa-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.pwa-install-btn .pwa-text {
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    color: var(--text-color);
}

.pwa-install-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(223, 175, 96, 0.25);
}

.pwa-install-btn:hover .pwa-text {
    color: var(--accent);
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100dvh;
    text-align: center;
    padding-top: calc(100px + 10vh);
    padding-bottom: 18dvh;
}

.title {
    font-size: clamp(3.8rem, 6.2vw, 6.2rem);
    font-weight: 600;
    letter-spacing: -2.5px;
    line-height: 1.06;
    margin-bottom: 1.2rem;
}

.subtitle {
    font-size: 1.45rem;
    opacity: 0.75;
    margin-bottom: 2.4rem;
}

/* Der Sentence Builder */
.sentence-builder {
    font-size: clamp(1.75rem, 2.7vw, 2.7rem);
    font-weight: 300;
    max-width: 1050px;
    line-height: 1.85;
}

.sentence-line {
    display: block;
}

.sentence-line:not(:first-child) {
    margin-top: 0.35rem;
}

.sentence-break {
    display: block;
    margin-top: 0.35rem;
}

.word-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0 6px;
    transition: all 0.3s;
}

.word-btn:hover {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(223, 175, 96, 0.4);
}

.word-btn.highlight {
    color: var(--accent);
}

.word-btn[data-type="beilage"],
.word-btn[data-type="ingredients"] {
    padding-right: 0;
}

.action-btn {
    display: block;
    margin: 2.4rem auto 0;
    background: var(--accent);
    color: white;
    border: none;
    padding: 1.15rem 2.8rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(223, 175, 96, 0.35);
    position: relative;
    z-index: 20;
}

/* -------------------------------------------
   Generator Progress HUD (Bäcker-Labor)
------------------------------------------- */
.generator-cta-box {
    margin: 2.2rem auto 0;
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 25;
}

.generator-cta-box .action-btn {
    margin: 0 auto;
}

.generator-cta-box .action-btn.hidden {
    display: none !important;
}

.generator-progress {
    width: 100%;
    max-width: 540px;
    background: var(--glass-bg, rgba(20, 20, 20, 0.75));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 1.2rem 1.6rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(223, 175, 96, 0.15);
    text-align: left;
    transition: all 0.3s ease;
    animation: fadeInProgress 0.35s ease-out;
}

@keyframes fadeInProgress {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.generator-progress.hidden {
    display: none !important;
}

.progress-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.progress-badge {
    background: rgba(223, 175, 96, 0.16);
    color: var(--accent);
    border: 1px solid rgba(223, 175, 96, 0.35);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    transition: all 0.3s ease;
}

.progress-percent {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: monospace, monospace;
    color: var(--text-color);
    opacity: 0.85;
}

.progress-title {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.35;
    transition: opacity 0.25s ease;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.65rem;
}

[data-theme="light"] .progress-track {
    background: rgba(0, 0, 0, 0.08);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #e8be72);
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(223, 175, 96, 0.6);
    transition: width 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.progress-fill::after {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShimmer 1.8s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-subtext {
    font-size: 0.85rem;
    color: var(--text-muted, #a1a1a6);
    line-height: 1.4;
    font-style: italic;
    min-height: 1.4em;
    transition: opacity 0.25s ease;
}

.apply-btn {
    width: 100%;
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 1rem;
    border-radius: 50px; /* Abgerundet für modernen look */
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.nav-pill {
    padding: 10px 25px;
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 1000;
}
.apply-btn.hidden {
    display: none;
}

/* Fullscreen Overlay Settings (Google Food Mood Style) */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color); /* Solider Hintergrund */
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.fullscreen-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.close-btn {
    position: absolute;
    top: 3rem;
    right: 4rem;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 3rem;
    cursor: pointer;
    opacity: 0.5;
}

.close-btn:hover {
    opacity: 1;
}

.list-container {
    height: 80vh;
    width: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    scrollbar-width: none; /* Hide scrollbar for clean look */
}

.list-container::-webkit-scrollbar {
    display: none;
}

.list-item {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 4rem; /* Sehr groß, wie im Beispiel */
    font-family: inherit;
    font-weight: 300;
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.3s ease;
    padding: 10px 20px;
}

.list-item:hover, .list-item.active {
    opacity: 1;
    color: var(--accent);
    transform: scale(1.05);
}

.footer-huge-text {
    width: 100%;
    text-align: center;
    font-size: 15vw;
    font-weight: 800;
    line-height: 1;
    color: var(--text-color);
    pointer-events: none;
    user-select: none;
    letter-spacing: -3px;
    padding: 50px 0 50px 0;
    position: relative;
    z-index: 10;
}

/* -------------------------------------------
   Recipe Reveal Overlay
------------------------------------------- */
.recipe-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.4s ease;
    padding: 20px;
}

[data-theme="light"] .recipe-overlay {
    background: rgba(255, 255, 255, 0.7);
}

.recipe-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.recipe-reveal-content.split-layout {
    background: var(--bg-color);
    width: 95vw;
    max-width: 1400px;
    height: 95vh;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    border: 1px solid var(--surface-border);
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: row;
}

.recipe-image-side {
    flex: 1;
    position: relative;
    background: #000;
}

#recipe-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.recipe-body-side {
    flex: 1;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
}

.recipe-body-inner {
    padding: 3rem 6%; /* Mehr Breite für den Text auf dem Desktop */
    margin-top: auto;
    margin-bottom: auto;
}

/* Typography & Layout per Food Mood Reference */
#recipe-title {
    font-size: 3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
    letter-spacing: -1px;
}

.recipe-meta-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.recipe-intro {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.ingredients-box {
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 2.5rem 3rem;
    margin-bottom: 3rem;
    background: rgba(223, 175, 96, 0.02);
}

.box-title {
    color: var(--accent);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 0;
}

.ingredients-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
    row-gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ingredients-grid li {
    font-size: 1.1rem;
    color: var(--text-color);
    position: relative;
    padding-left: 1.2rem;
}
.ingredients-grid li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
}

.wave-divider {
    width: 100px;
    height: 10px;
    margin: 0 auto 3rem auto;
}

.steps-list {
    list-style: none;
    counter-reset: steps;
    padding: 0;
}

.steps-list li {
    counter-increment: steps;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    position: relative;
}

.steps-list li::before {
    content: counter(steps) ". ";
    color: var(--accent);
    font-weight: 600;
}

.recipe-list {
    list-style-position: inside;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
}

.recipe-list li {
    margin-bottom: 0.5rem;
}

.recipe-actions {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.share-btn {
    margin: 0;
    background: #34c759; /* Apple Green */
    box-shadow: 0 10px 30px rgba(52, 199, 89, 0.3);
}

.share-btn:hover {
    background: #30b753;
}

/* -------------------------------------------
   Mobile & Tablet Responsive Optimization
------------------------------------------- */
@media (max-width: 1024px) {
    .header {
        padding: 20px 24px;
    }
    .main-nav {
        gap: 1.5rem;
        padding: 0.6rem 1.8rem;
    }
    .nav-link {
        font-size: 1.1rem;
    }
    .hero {
        padding-top: 140px;
        height: auto;
        min-height: 100dvh;
    }
}

@media (max-width: 768px) {
    html:has(body.home-scrollstop),
    body.home-scrollstop {
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important; /* Striktes Scrollstop auf der Startseite */
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }

    .logo {
        display: none !important;
    }

    .header {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        padding: 8px 10px !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
        z-index: 100 !important;
        height: auto !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
    }

    .main-nav {
        display: inline-flex !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        padding: 4px 6px !important;
        border-radius: 30px !important;
        width: auto !important;
        max-width: calc(100% - 84px) !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        flex-shrink: 1 !important;
    }

    .main-nav::-webkit-scrollbar {
        display: none !important;
    }

    .nav-link {
        font-size: 0.82rem !important;
        padding: 3px 5px !important;
        white-space: nowrap !important;
    }

    .header-actions {
        position: static !important;
        right: auto !important;
        top: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    .theme-btn,
    .header-actions .theme-btn {
        position: static !important;
        padding: 4px 8px !important;
        font-size: 0.95rem !important;
        border-radius: 20px !important;
        flex-shrink: 0 !important;
        height: 32px !important;
        min-width: 34px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .pwa-install-btn,
    .header-actions .pwa-install-btn {
        position: static !important;
        padding: 4px 8px !important;
        font-size: 0.95rem !important;
        border-radius: 20px !important;
        flex-shrink: 0 !important;
        height: 32px !important;
        min-width: 34px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .pwa-install-btn .pwa-text {
        display: none !important;
    }

    body.home-scrollstop .hero {
        height: 100dvh !important;
        max-height: 100dvh !important;
        padding: 8px 12px 14vh !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        overflow: hidden !important;
        position: relative !important;
        z-index: 5 !important;
    }

    .title {
        font-size: clamp(2.35rem, 8.2vw, 3.25rem);
        letter-spacing: -1.5px;
        line-height: 1.08;
        margin-bottom: 0.45rem;
    }

    .subtitle {
        font-size: clamp(1.0rem, 3.6vw, 1.25rem);
        opacity: 0.75;
        margin-bottom: 1.35rem;
    }

    .sentence-line {
        display: block !important;
        white-space: normal !important;
    }

    .sentence-line:not(:first-child) {
        margin-top: 0.55rem !important;
    }

    .sentence-break {
        display: none !important;
    }

    .sentence-builder {
        font-size: clamp(1.18rem, 4.4vw, 1.5rem) !important;
        line-height: 1.65 !important;
        max-width: 95% !important;
        padding: 0 4px !important;
        letter-spacing: -0.2px !important;
    }

    .word-btn {
        padding: 2px 7px !important;
        margin: 2px 1px !important;
        border-radius: 6px;
        background: rgba(223, 175, 96, 0.14);
        border-bottom: 2px solid var(--accent);
        display: inline-block;
        white-space: nowrap !important;
        font-weight: 600;
        vertical-align: baseline;
    }

    .action-btn {
        width: 100%;
        max-width: 320px;
        padding: 0.95rem 1.8rem;
        font-size: 1.15rem;
        margin: 0 auto;
        box-shadow: 0 8px 25px rgba(223, 175, 96, 0.35);
        flex-shrink: 0;
        position: relative;
        z-index: 50;
    }

    .generator-cta-box {
        margin: 1.5rem auto 0;
        width: 100%;
        max-width: 320px;
    }

    .generator-progress {
        padding: 0.85rem 1.1rem;
        border-radius: 16px;
        max-width: 100%;
    }

    .progress-title {
        font-size: 0.94rem;
        margin-bottom: 0.5rem;
    }

    .progress-subtext {
        font-size: 0.78rem;
    }

    body.home-scrollstop .footer-huge-text,
    .footer-huge-text {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        text-align: center !important;
        font-size: 15vw !important;
        font-weight: 800 !important;
        line-height: 0.85 !important;
        color: var(--text-color) !important;
        opacity: 0.95 !important;
        pointer-events: none !important;
        user-select: none !important;
        z-index: 1 !important;
        letter-spacing: -2px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    [data-theme="light"] body.home-scrollstop .footer-huge-text,
    [data-theme="light"] .footer-huge-text {
        color: #1a1a1a !important;
        opacity: 0.9 !important;
    }

    /* Modal / List Overlay Fixes */
    .fullscreen-overlay {
        padding: 15px;
    }

    .list-container {
        height: 72vh;
        gap: 0.5rem;
        padding: 10px 0;
    }

    .list-item {
        font-size: clamp(1.4rem, 5.5vw, 2rem);
        padding: 8px 12px;
        max-width: 90vw;
        word-break: break-word;
        text-align: center;
    }

    .close-btn {
        top: 1.2rem;
        right: 1.2rem;
        font-size: 2rem;
    }

    .apply-btn {
        bottom: 1.5rem !important;
        width: calc(100% - 30px) !important;
        padding: 0.95rem !important;
    }

    /* Recipe Reveal Modal */
    .recipe-overlay {
        padding: 0;
    }

    .recipe-reveal-content.split-layout {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .recipe-image-side {
        flex: none;
        width: 100%;
        height: 35vh;
        min-height: 220px;
    }

    .recipe-body-side {
        flex: 1;
        overflow-y: visible;
    }

    .recipe-body-inner {
        padding: 1.5rem 1.2rem 4rem;
    }

    #recipe-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .recipe-meta-icons {
        gap: 1rem;
        font-size: 0.95rem;
        flex-wrap: wrap;
        margin-bottom: 1.8rem;
    }

    .recipe-intro {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .ingredients-box {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }

    .ingredients-grid {
        grid-template-columns: 1fr;
        row-gap: 0.8rem;
    }

    .steps-list li {
        font-size: 1.05rem;
        line-height: 1.7;
        margin-bottom: 1.2rem;
    }

    #close-recipe-overlay {
        top: 1rem;
        right: 1rem;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
        border-radius: 50%;
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* =========================================================================
   PWA (PROGRESSIVE WEB APP) STYLING & MODALS
   ========================================================================= */

/* Standalone Mode: Hide install button and banner when app is installed */
@media all and (display-mode: standalone) {
    .pwa-install-btn,
    #pwa-install-btn,
    .pwa-floating-banner {
        display: none !important;
    }
}

/* PWA Guidance Modal (iOS & General) */
.pwa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pwa-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pwa-modal-box {
    background: rgba(18, 18, 22, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    max-width: 450px;
    width: 100%;
    padding: 28px 24px 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(223, 175, 96, 0.12);
    position: relative;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f0f0f0;
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
}

[data-theme="light"] .pwa-modal-box {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.pwa-modal-overlay.active .pwa-modal-box {
    transform: translateY(0) scale(1);
}

.pwa-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    transition: opacity 0.2s, transform 0.2s;
}

.pwa-modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.pwa-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.pwa-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    flex-shrink: 0;
}

.pwa-modal-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.3px;
    color: inherit;
}

.pwa-modal-sub {
    font-size: 0.88rem;
    color: var(--text-muted, #a1a1a6);
    margin: 3px 0 0 0;
    line-height: 1.3;
}

.pwa-modal-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 18px 0 22px;
}

.pwa-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 14px;
    border-radius: 14px;
}

[data-theme="light"] .pwa-step {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.pwa-step-num {
    background: var(--accent);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.pwa-step-content {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.45;
}

.pwa-step-content p {
    margin: 0 0 6px 0;
}

.pwa-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: inherit;
}

[data-theme="light"] .pwa-step-badge {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

.pwa-badge-highlight {
    border-color: var(--accent);
    color: var(--accent);
}

.pwa-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
    text-align: center;
}

[data-theme="light"] .pwa-modal-footer {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.pwa-footer-note {
    font-size: 0.8rem;
    color: var(--text-muted, #8e8e93);
    margin: 0 0 14px 0;
    line-height: 1.35;
}

.pwa-modal-confirm-btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pwa-modal-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(223, 175, 96, 0.35);
}

/* PWA Mobile Floating Banner */
.pwa-floating-banner {
    position: fixed;
    bottom: 18px;
    left: 14px;
    right: 14px;
    max-width: 440px;
    margin: 0 auto;
    background: rgba(18, 18, 22, 0.95);
    border: 1px solid rgba(223, 175, 96, 0.35);
    border-radius: 18px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 9999;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(223, 175, 96, 0.15);
    animation: pwaSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
}

[data-theme="light"] .pwa-floating-banner {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(216, 75, 22, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@keyframes pwaSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pwa-banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pwa-banner-text strong {
    font-size: 0.92rem;
    color: var(--text-color, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-text span {
    font-size: 0.76rem;
    color: var(--text-muted, #a1a1a6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pwa-banner-install-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pwa-banner-install-btn:hover {
    transform: scale(1.03);
}

.pwa-banner-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #8e8e93);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
}

