:root {
    /* Brand Palette */
    --primary: #FF6B35;
    /* Orange (CTA, Hero) */
    --primary-hover: #e85d2a;
    --secondary: #2EC4B6;
    /* Teal (Accents) */
    --gold: #F59E0B;
    /* Premium */

    /* Theme Colors */
    --bg-body: #FAFAFA;
    /* Light BG */
    --card-bg: #FFFFFF;
    /* White Cards */
    --text-main: #1A1A1A;
    /* Dark Text */
    --text-muted: #525252;
    /* Muted Text */

    /* Glassmorphism (Light Mode) */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);

    --radius-lg: 1.5rem;
    --radius-md: 0.75rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

/* Dynamic Background */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: var(--secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: var(--gold);
    animation-delay: -10s;
}

@keyframes float {

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

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

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

/* Container & Typography */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    background: var(--text-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo .highlight {
    background: linear-gradient(to right, var(--primary), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glassmorphism Cards */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

/* Nav */
.nav-container {
    width: 100%;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.nav-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo-small {
    font-size: 1.75rem;
    /* Increased size */
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.03em;
}

.logo-small a {
    transition: opacity 0.2s;
}

.logo-small a:hover {
    opacity: 0.9;
}

.logo-small .highlight {
    color: var(--primary);
}

.btn-small {
    padding: 0.75rem 1.5rem;
    /* Increased padding */
    background: rgba(255, 255, 255, 0.15);
    /* Slightly lighter */
    border-radius: var(--radius-md);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 0 6rem;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.highlight-text {
    background: linear-gradient(to right, var(--primary), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn-large {
    padding: 1.5rem 4rem;
    font-size: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 30px rgba(255, 107, 53, 0.3);
}

.btn-large:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.4);
}

.hero-note {
    font-size: 0.85rem;
    color: var(--text-dim);
    opacity: 0.8;
}

/* Value & Features */
.value-section,
.features-grid,
.extractor-section {
    margin-bottom: 6rem;
}

.value-card {
    padding: 3rem;
    text-align: center;
}

.value-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.value-card p {
    font-size: 1.1rem;
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

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

.feature-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--text-light);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-dim);
    line-height: 1.5;
}

/* Extractor Section */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-dim);
}

/* Footer */
.footer {
    width: 100%;
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    background: #f1f5f9;
    /* Slightly darker than body for separation */
    margin-top: auto;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0 2rem;
}

.footer-brand .logo-small {
    margin-bottom: 0.5rem;
    display: block;
}

.footer-tagline {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-light);
}

.app-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.store-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: default;
    /* Placeholder */
    font-size: 0.85rem;
    transition: background 0.2s;
}

.store-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.copyright {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-top: 3rem;
    opacity: 0.6;
}

/* Fixes for original styles to fit new layout */
.header {
    display: none;
}

/* Hide old header */

.input-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.link-icon {
    color: var(--text-dim);
    margin-right: 0.75rem;
}

input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.1rem;
    outline: none;
    padding: 1rem 0;
}

input::placeholder {
    color: var(--text-dim);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: calc(var(--radius-md) - 4px);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Recipe Result */
.result-container {
    width: 100%;
}

.recipe-card {
    padding: 2.5rem;
}

.recipe-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.recipe-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.recipe-desc {
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.recipe-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.styled-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.styled-list li {
    position: relative;
    padding-left: 1.75rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.styled-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 1.5rem;
    line-height: 1;
    top: 0.1rem;
}

.number-list {
    counter-reset: items;
}

.number-list li {
    padding-left: 2.5rem;
}

.number-list li::before {
    counter-increment: items;
    content: counter(items);
    font-size: 0.9rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    top: -0.1rem;
    left: 0;
}

.card-footer h3,
h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

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

.nutrition-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nutri-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-light);
}

.nutri-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* States */
.hidden {
    display: none !important;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    text-align: center;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .input-group {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
    }

    .input-wrapper {
        background: rgba(15, 23, 42, 0.6);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-md);
        padding: 0.25rem 1rem;
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .btn-primary {
        width: 100%;
    }



    .hero-title {
        font-size: 2.5rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    /* Mobile Nav */
    .nav-content {
        padding: 0 1rem;
    }

    .logo-small {
        font-size: 1.5rem;
    }

    .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Mobile Hero */
    .hero-section {
        padding: 2rem 0 4rem;
    }

    .hero-title {
        font-size: 2.5rem;
        padding: 0 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    /* Mobile Legal */
    .legal-content {
        padding: 1.5rem;
        /* Reduced from 4rem */
        margin-bottom: 2rem;
    }

    .legal-content h1 {
        font-size: 2rem;
    }

    /* Mobile App & Extractor */
    .app-container {
        min-height: auto;
        /* Allow natural flow on mobile */
        padding-top: 2rem;
    }

    .input-group {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .input-wrapper {
        width: 100%;
        margin: 0;
        background: rgba(255, 255, 255, 0.5);
        /* Slightly more visible on mobile */
    }

    .btn-primary {
        width: 100%;
        padding: 0.875rem;
    }

    .container {
        padding: 1rem;
        /* Reduced container padding */
    }
}

/* App Page Specifics */
.app-page {
    justify-content: flex-start;
    /* Ensure items align to top initially */
}

.app-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60vh;
    /* Center vertically on desktop */
}

/* Legal Page Specifics */
.legal-page {
    background-color: var(--bg-dark);
}

.legal-content {
    padding: 4rem;
    margin-bottom: 4rem;
}

.legal-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.legal-content .last-updated {
    color: var(--text-dim);
    margin-bottom: 3rem;
    font-style: italic;
}

.legal-content section {
    margin-bottom: 2.5rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.legal-content p,
.legal-content li {
    line-height: 1.8;
    color: #cbd5e1;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.legal-content ul {
    list-style-position: inside;
    margin-left: 1rem;
}