:root {
    --theme-green: #3B5F41; /* Deep sage green from Image 1 */
    --theme-red: #D9534F;   /* Coral red from Image 1 */
    --theme-light: #F4F1EA; /* Off-white from Image 1 */
    --glass-bg: rgba(20, 30, 20, 0.45); /* Dark green-tinted glass */
    --glass-border: rgba(255, 255, 255, 0.15);
    
    --text-main: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.7);
}

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

body {
    background: linear-gradient(rgba(10, 20, 10, 0.7), rgba(10, 20, 10, 0.85)), url('https://images.unsplash.com/photo-1495195134817-a169d311d4d8?auto=format&fit=crop&w=2500&q=80') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    display: flex; flex-direction: column; min-height: 100vh;
}

.mobile-frame {
    width: 100%; max-width: 1200px; margin: 0 auto;
    position: relative; overflow-x: hidden; min-height: 100vh;
}

/* Header */
.app-header {
    background: rgba(59, 95, 65, 0.35);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--glass-border);
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    border-bottom-left-radius: 30px; border-bottom-right-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.header-top {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;
}
.greeting-sub { font-size: 0.85rem; color: var(--text-muted); display: block; margin-bottom: 2px;}
.greeting-main { font-size: 1.4rem; font-weight: 700; display:flex; align-items:center; gap:8px;}
.notification-btn {
    background: rgba(255,255,255,0.1); width: 44px; height: 44px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; color: white;
    border: 1px solid var(--glass-border); transition: 0.3s; cursor: pointer;
}
.notification-btn:hover { background: var(--theme-red); }

/* Search Inputs */
.search-container {
    display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; position: relative;
}
.search-container input {
    flex: 1; padding: 1rem 1rem 1rem 3rem; border-radius: 16px; 
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.4); outline: none; color: white; font-size: 0.95rem;
    backdrop-filter: blur(10px); transition: 0.3s;
}
.search-container input::placeholder { color: rgba(255,255,255,0.4); }
.search-container input:focus { border-color: var(--theme-red); background: rgba(0,0,0,0.6); }
.search-icon { position: absolute; left: 16px; color: rgba(255,255,255,0.6); width: 20px; height:20px; }

/* Hero Banner (Image 1 reference) */
.hero-banner {
    background: url('https://images.unsplash.com/photo-1490645935967-10de6ba17061?auto=format&fit=crop&w=800&q=80') center/cover;
    border-radius: 20px; padding: 2.5rem 1.5rem; margin: 1.5rem auto; position: relative; overflow: hidden;
    max-width: 600px; box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.hero-overlay {
    position: absolute; top:0; left:0; right:0; bottom:0; 
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%);
}
.hero-content {
    position: relative; z-index: 1;
}
.hero-content h2 { color: white; font-size: 1.6rem; font-weight: 500; line-height: 1.2; margin-bottom: 1rem; }
.hero-content h2 span { color: var(--theme-red); font-size: 2.5rem; font-weight: 800; display: block; }
.hero-btn { 
    background: var(--theme-red); color: white; border: none; padding: 0.6rem 1.2rem; 
    border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.3s;
}
.hero-btn:hover { background: #B5403D; transform: scale(1.05); }

/* Categories (Circular Image 1 reference) */
.section-title { font-size: 1.2rem; font-weight: 700; color: white; margin-top: 1rem; margin-bottom: 0.5rem; max-width: 600px; margin-left: auto; margin-right: auto;}
.categories {
    display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; padding: 15px 5px; margin-bottom: 0.5rem;
    max-width: 600px; margin-left: auto; margin-right: auto;
}
.categories::-webkit-scrollbar { display: none; }
.category {
    display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; transition: 0.3s;
    background: none; border: none; padding: 0; min-width: 70px;
}
.cat-circle {
    width: 65px; height: 65px; border-radius: 50%; background: var(--theme-green);
    display: flex; justify-content: center; align-items: center; font-size: 1.8rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); border: 2px solid transparent; transition: 0.3s;
}
.category span {
    font-size: 0.9rem; color: var(--text-muted); font-weight: 500; transition: 0.3s;
}
.category:hover .cat-circle { transform: translateY(-3px); }
.category.active .cat-circle {
    background: var(--theme-red); border-color: rgba(255,255,255,0.8); 
    box-shadow: 0 6px 20px rgba(217, 83, 79, 0.6); transform: translateY(-5px);
}
.category.active span { font-weight: 700; color: white; }

/* Main Content */
main { padding: 2rem 1.5rem; display: flex; flex-direction: column; align-items: center; }

/* Section Header */
.section-header { width: 100%; max-width: 600px; margin-bottom: 1.2rem; display: flex; justify-content: space-between; align-items: center; }
.section-header h2 { font-size: 1.3rem; font-weight: 700; color: white; }

/* Dropzone (Glassmorphism like Image 2) */
.dropzone {
    width: 100%; max-width: 600px;
    background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 24px; padding: 3rem 1.5rem; text-align: center;
    border: 1px solid var(--glass-border); margin-bottom: 2rem; position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); transition: 0.3s; cursor: pointer;
}
.dropzone.dragover { background: rgba(217, 83, 79, 0.1); border-color: var(--theme-red); }
.dropzone .icon { font-size: 3.5rem; color: var(--theme-light); margin-bottom: 1rem; opacity: 0.9; }
.dropzone h3 { font-size: 1.2rem; color: white; margin-bottom: 0.5rem; }
.dropzone p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* Buttons */
.primary-btn {
    background: rgba(255,255,255,0.15); color: white; font-weight: 600;
    padding: 0.8rem 1.5rem; border-radius: 14px; border: 1px solid var(--glass-border); 
    font-size: 0.95rem; cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; gap: 8px; backdrop-filter: blur(10px);
}
.primary-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }

#scan-btn { background: var(--theme-green); border-color: var(--theme-green); }
#scan-btn:hover { background: #487A50; }

.preview-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; border-radius: 24px; z-index: 5; overflow: hidden;
}
.preview-container img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.remove-btn {
    position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.7); backdrop-filter: blur(10px);
    color: white; border: 1px solid rgba(255,255,255,0.2); width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s;
}
.remove-btn:hover { background: var(--theme-red); }

/* Generate Button */
.generate-btn {
    width: 100%; max-width: 600px; background: linear-gradient(135deg, var(--theme-red), #B5403D); 
    color: white; border: none; padding: 1.2rem; border-radius: 16px; font-size: 1.1rem; font-weight: 700;
    cursor: pointer; transition: 0.3s; box-shadow: 0 8px 20px rgba(217, 83, 79, 0.4);
}
.generate-btn:disabled { background: rgba(255,255,255,0.1); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.generate-btn:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(217, 83, 79, 0.6); }

/* Loading */
.loading-section { text-align: center; padding: 4rem 1rem; width: 100%; max-width: 600px;
    background: var(--glass-bg); backdrop-filter: blur(20px); border-radius: 24px; border: 1px solid var(--glass-border);
}
.spinner {
    width: 50px; height: 50px; border: 4px solid rgba(255,255,255,0.1); border-top-color: var(--theme-red);
    border-radius: 50%; margin: 0 auto 1.5rem; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Results */
.recipe-card {
    background: var(--glass-bg); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border-radius: 24px; padding: 2rem; width: 100%; max-width: 800px;
    border: 1px solid var(--glass-border); box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}
#recipe-title { font-size: 1.5rem; color: var(--theme-light); margin-bottom: 1.5rem; font-weight: 700;}
.recipe-content { font-size: 1rem; color: rgba(255,255,255,0.9); line-height: 1.7; }

/* Markdown styling */
.recipe-content h1, .recipe-content h2 { color: var(--theme-red); margin-top: 1.5rem; margin-bottom: 1rem; font-weight: 700; font-size: 1.6rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem;}
.recipe-content h3, .recipe-content h4 { color: var(--theme-light); font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: 0.8rem; }
.recipe-content ul, .recipe-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; margin-top: 0.5rem; }
.recipe-content li { margin-bottom: 0.6rem; }
.recipe-content p { margin-bottom: 1rem; }
.recipe-content strong { color: var(--theme-light); }

/* Desktop View Enhancements */
@media(min-width: 768px){
    .app-header {
        border-radius: 30px; margin-top: 2rem; padding: 3rem 4rem 2.5rem 4rem; max-width: 1000px; margin-left: auto; margin-right: auto;
    }
    .search-container { max-width: 600px; margin: 0 auto 1rem auto; }
    .categories { justify-content: center; }
    main { padding: 3rem 2rem; }
    .dropzone { padding: 5rem 3rem; }
    .section-header { max-width: 800px; }
    .recipe-card { padding: 3rem; }
}
