* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg: #0a0a0f;
    --bg-secondary: #12121a;
    --surface: rgba(26, 26, 36, 0.8);
    --surface-solid: #1a1a24;
    --surface-hover: rgba(34, 34, 46, 0.9);
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --primary: #ff6b6b;
    --primary-dark: #e55555;
    --primary-glow: rgba(255, 107, 107, 0.2);
    --accent: #4ecdc4;
    --accent-glow: rgba(78, 205, 196, 0.2);
    --text: #f5f5f7;
    --text-secondary: #a0a0b0;
    --text-muted: #666680;
    --success: #4ade80;
    --warning: #fbbf24;
    --radius: 20px;
    --radius-sm: 12px;
    --safe-top: env(safe-area-inset-top, 20px);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    --gradient-accent: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    --gradient-surface: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    --gradient-glow: radial-gradient(ellipse at top, rgba(255, 107, 107, 0.15) 0%, transparent 50%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Animated background glow */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(255, 107, 107, 0.08) 0%, transparent 40%),
                radial-gradient(ellipse at 70% 60%, rgba(78, 205, 196, 0.06) 0%, transparent 40%);
    animation: ambientGlow 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

@keyframes ambientGlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, -5%) rotate(3deg); }
}

#app {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Views */
.view {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.view.active {
    display: flex;
}

/* Home Header - Glass Effect */
.home-header {
    padding: calc(var(--safe-top) + 16px) 16px 12px;
    background: linear-gradient(to bottom, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.8) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.header-top h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--accent) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

.icon-btn:hover {
    border-color: var(--border-light);
    background: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.icon-btn:hover svg {
    transform: scale(1.1);
}

.icon-btn:active {
    transform: scale(0.95) translateY(0);
}

.icon-btn.primary {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.icon-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.icon-btn.active svg {
    fill: var(--primary);
    stroke: var(--primary);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Search */
.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

#searchInput {
    width: 100%;
    padding: 14px 40px 14px 44px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 10px 40px rgba(0, 0, 0, 0.2);
    background: var(--surface-hover);
}

#searchInput::placeholder {
    color: var(--text-muted);
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-muted);
    color: var(--bg);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
}

/* Category Tabs */
.category-scroll {
    position: sticky;
    top: 130px;
    z-index: 90;
    background: var(--bg);
    padding: 0 0 12px;
}

.category-tabs {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.cat-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 25px;
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-tab .emoji {
    font-size: 16px;
    transition: transform 0.2s;
}

.cat-tab:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.cat-tab:hover .emoji {
    transform: scale(1.2);
}

.cat-tab.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.35);
}

.cat-tab:active {
    transform: scale(0.97) translateY(0);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 10px;
    padding: 0 16px 12px;
}

.filter-bar select {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-bar select:hover {
    border-color: var(--border-light);
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Recipe Grid */
.recipe-grid-container {
    flex: 1;
    padding: 0 16px 100px;
}

.recipe-count {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.recipe-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    position: relative;
}

.recipe-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-surface);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.recipe-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-light);
    border-color: var(--border-light);
}

.recipe-card:hover::before {
    opacity: 1;
}

.recipe-card:active {
    transform: scale(0.98) translateY(0);
}

.card-image {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, rgba(255,107,107,0.1) 0%, rgba(78,205,196,0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3) 100%);
}

.card-body {
    padding: 14px;
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.recipe-card:hover .card-title {
    color: var(--primary);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.card-category {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-glow), rgba(255,107,107,0.25));
    color: var(--primary);
    font-weight: 600;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.card-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-fav svg {
    width: 14px;
    height: 14px;
    fill: var(--primary);
    stroke: var(--primary);
}

.card-time {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.6);
    border-radius: 8px;
    font-size: 11px;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Detail View */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(var(--safe-top) + 12px) 16px 12px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--surface);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

.detail-actions {
    display: flex;
    gap: 8px;
}

.view-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.recipe-detail {
    padding: 0 16px 100px;
    overflow-y: auto;
}

.recipe-detail .hero {
    text-align: center;
    padding: 20px 0 30px;
}

.recipe-detail .hero-emoji {
    font-size: 4rem;
    margin-bottom: 16px;
}

.recipe-detail h1 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.recipe-detail .source-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.recipe-detail .time-info {
    margin-top: 12px;
    padding: 10px 16px;
    background: var(--surface);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: inline-block;
}

.recipe-detail .description {
    color: var(--text-secondary);
    margin: 20px 0;
    line-height: 1.6;
}

/* Servings Control */
.servings-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.servings-control span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.servings-control strong {
    font-size: 1.2rem;
    min-width: 30px;
    text-align: center;
}

.servings-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Section Headers */
.recipe-detail .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.recipe-detail h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.add-to-cart {
    padding: 8px 12px;
    border-radius: 20px;
    border: none;
    background: var(--accent);
    color: var(--bg);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Ingredients List */
.ingredients-list {
    list-style: none;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 28px;
}

.ingredients-list li {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.ingredients-list li:last-child {
    border-bottom: none;
}

.ingredient-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.ingredient-check.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.ingredient-text.checked {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Instructions */
.instructions-list {
    list-style: none;
}

.instructions-list li {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    line-height: 1.6;
    padding-top: 4px;
}

/* Modal - Glass Effect */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    align-items: flex-end;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(26, 26, 36, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: calc(var(--safe-bottom) + 16px);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.5);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-body input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 8px;
}

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

.supported-sites {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.primary-btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--gradient-primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
}

.primary-btn:active {
    transform: translateY(0) scale(0.98);
}

.primary-btn:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

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

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

.error {
    margin-top: 12px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-sm);
    color: #fca5a5;
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

/* Shopping List */
.shopping-list {
    padding: 16px;
}

.shopping-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.shopping-item.checked {
    opacity: 0.5;
}

.shopping-item.checked span {
    text-decoration: line-through;
}

/* Cooking Mode */
.cooking-mode {
    background: linear-gradient(135deg, var(--bg) 0%, #0f0f18 100%);
}

.cooking-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: calc(var(--safe-top) + 16px) 16px 16px;
    background: rgba(26, 26, 36, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.close-cooking {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.cooking-title {
    font-size: 1rem;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cooking-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
}

.cooking-step {
    font-size: 1.5rem;
    line-height: 1.6;
}

.cooking-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px calc(var(--safe-bottom) + 24px);
    background: var(--surface);
}

.cooking-nav-btn {
    padding: 14px 24px;
    border-radius: 25px;
    border: none;
    background: var(--gradient-primary);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.cooking-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.cooking-nav-btn:disabled {
    background: var(--surface);
    color: var(--text-muted);
    box-shadow: none;
    transform: none;
}

.step-indicator {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ========== BATCH 1: Notes Section ========== */
.notes-section {
    margin: 20px 0;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius);
}

.note-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.note-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.note-editor {
    margin-top: 12px;
}

.note-editor textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

.note-editor textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.saved-note {
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    border-left: 3px solid var(--accent);
}

/* ========== BATCH 1: Ingredient Search ========== */
.ingredient-search-container {
    padding: 16px;
}

.ingredient-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    text-align: center;
}

.ingredient-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.ingredient-input-row input {
    flex: 1;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}

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

.add-ingredient-btn {
    width: 50px;
    border-radius: var(--radius);
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.selected-ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.selected-ingredient {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    border-radius: 20px;
    color: var(--primary);
    font-size: 0.9rem;
}

.selected-ingredient button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ingredient-match-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.match-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    background: var(--accent);
    color: var(--bg);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* ========== BATCH 1: Random Button ========== */
#randomBtn svg {
    width: 18px;
    height: 18px;
}

/* ========== BATCH 3: Meal Planner ========== */
.meal-plan-container {
    padding: 16px;
}

.week-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.week-nav button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 12px;
}

.week-nav span {
    font-weight: 600;
}

.meal-plan-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meal-day {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
}

.meal-day.today {
    border: 2px solid var(--primary);
}

.meal-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg);
}

.day-name {
    font-weight: 600;
}

.day-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meal-slot {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.meal-slot:hover {
    background: var(--surface-hover);
}

.meal-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 90px;
}

.meal-recipe {
    flex: 1;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meal-empty {
    flex: 1;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.remove-meal {
    background: var(--primary);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
}

/* Meal Picker */
.meal-picker-results {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 12px;
}

.meal-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.meal-picker-item:hover {
    background: var(--surface-hover);
}

.picker-emoji {
    font-size: 1.5rem;
}

.picker-title {
    flex: 1;
    font-size: 0.95rem;
}

.picker-fav {
    font-size: 0.8rem;
}

/* ========== BATCH 3: Cooking Timers ========== */
.timer-widget {
    position: fixed;
    bottom: calc(var(--safe-bottom) + 16px);
    left: 16px;
    right: 16px;
    max-width: 568px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 12px;
    z-index: 150;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.timer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.timer-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 4px;
}

.timer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timer-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.timer-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.timer-cancel {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
}

.step-timer-btn {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    border-radius: 15px;
    color: var(--primary);
    font-size: 0.75rem;
    cursor: pointer;
    vertical-align: middle;
}

.step-timer-btn:hover {
    background: var(--primary);
    color: white;
}
