/* =================================================================
   RECIPE FINDER - ENHANCED STYLES WITH BETTER UX
   ================================================================= */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    --primary-color: #FF6B35;
    --primary-hover: #FF5722;
    --primary-light: #FFE6DF;
    --secondary-color: #004E89;
    --accent-color: #F7B801;
    
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #FF5722 100%);
    --gradient-secondary: linear-gradient(135deg, #004E89 0%, #1A659E 100%);
    --gradient-accent: linear-gradient(135deg, #F7B801 0%, #FFC300 100%);
    
    --font-primary: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
    --text-3xl: clamp(1.875rem, 1.65rem + 1.125vw, 2.25rem);
    --text-4xl: clamp(2.25rem, 1.95rem + 1.5vw, 3rem);
    
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    --z-base: 1;
    --z-dropdown: 10;
    --z-sticky: 100;
    --z-modal: 1000;
    --z-toast: 2000;
}

/* ===== BASE STYLES ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    overflow-x: hidden;
    width: 100%;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FF6B35 0%, #FF5722 50%, #F7B801 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-animation {
    text-align: center;
}

.cooking-pot {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
}

.pot-body {
    width: 80px;
    height: 60px;
    background: #374151;
    border-radius: 0 0 20px 20px;
    position: absolute;
    bottom: 0;
    left: 10px;
    border: 3px solid #1F2937;
}

.pot-body::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -10px;
    width: 20px;
    height: 30px;
    background: #374151;
    border: 3px solid #1F2937;
    border-radius: 10px 0 0 10px;
}

.pot-body::after {
    content: '';
    position: absolute;
    top: -15px;
    right: -10px;
    width: 20px;
    height: 30px;
    background: #374151;
    border: 3px solid #1F2937;
    border-radius: 0 10px 10px 0;
}

.steam {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: steam-rise 2s ease-in-out infinite;
}

.steam {
    width: 10px;
    height: 10px;
    left: 30px;
    bottom: 60px;
}

.steam-2 {
    width: 15px;
    height: 15px;
    left: 45px;
    bottom: 60px;
    animation-delay: 0.4s;
}

.steam-3 {
    width: 12px;
    height: 12px;
    left: 60px;
    bottom: 60px;
    animation-delay: 0.8s;
}

@keyframes steam-rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-40px) scale(1.5);
        opacity: 0;
    }
}

.loading-text {
    color: white;
    font-size: var(--text-xl);
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===== APP CONTAINER ===== */
.app-container {
    min-height: 100vh;
    padding-bottom: 80px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ===== SMART DOCK ===== */
.smart-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--gray-200);
    padding: 0.5rem 0.25rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-lg);
    width: 100%;
    flex-wrap: nowrap;
    gap: 0.25rem;
}

.dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.4rem 0.25rem;
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-base);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    font-weight: 500;
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
}

.dock-item i {
    font-size: 1.25rem;
    transition: transform var(--transition-bounce);
}

.dock-item:hover {
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-3px);
}

.dock-item:hover i {
    transform: scale(1.15);
}

.dock-item.active {
    color: var(--primary-color);
}

.dock-item.active i {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.dock-item .badge {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    background: var(--error);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    box-shadow: var(--shadow-md);
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
    overflow-x: hidden;
}

/* ===== PAGES ===== */
.page {
    display: none;
    width: 100%;
}

.page.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: var(--gradient-primary);
    padding: 3rem 2rem;
    border-radius: var(--radius-2xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-title {
    color: white;
    margin-bottom: 1rem;
}

.title-main {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    animation: slideInLeft 0.6s ease-out;
}

.title-sub {
    display: block;
    font-size: var(--text-lg);
    font-weight: 500;
    opacity: 0.95;
    animation: slideInLeft 0.6s ease-out 0.1s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-lg);
    margin-bottom: 2rem;
    max-width: 600px;
    animation: slideInLeft 0.6s ease-out 0.2s both;
}

/* ===== SEARCH CONTAINER ===== */
.search-container {
    max-width: 700px;
    width: 100%;
    animation: slideInLeft 0.6s ease-out 0.3s both;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    padding: 0.25rem 0.5rem 0.25rem 1rem;
    transition: all var(--transition-base);
    width: 100%;
    z-index: 100;
}

.search-wrapper:focus-within {
    box-shadow: var(--shadow-2xl), 0 0 0 4px rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

.search-icon {
    color: var(--gray-400);
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: var(--text-base);
    padding: 0.75rem 0;
    background: transparent;
    color: var(--gray-800);
    min-width: 0;
}

.search-input::placeholder {
    color: var(--gray-400);
}

.voice-btn,
.visual-search-btn {
    background: var(--primary-light);
    border: none;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.voice-btn:hover,
.visual-search-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.voice-btn.listening {
    animation: pulse-ring 1.5s ease-in-out infinite;
    background: var(--error);
    color: white;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* ===== AUTOCOMPLETE DROPDOWN ===== */
#autocompleteDropdown {
    position: fixed;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-height: 400px;
    overflow-y: auto;
    z-index: 999999;
    border: 1px solid #e0e0e0;
    width: 90%;
    max-width: 700px;
}

#autocompleteDropdown.hidden {
    display: none !important;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: linear-gradient(135deg, #FFF5F1 0%, #FFE8DD 100%);
}

.autocomplete-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.autocomplete-info {
    flex: 1;
}

.autocomplete-title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 15px;
    margin-bottom: 4px;
}

.autocomplete-meta {
    font-size: 13px;
    color: #7f8c8d;
}

/* ===== FILTER SECTION HEADER ===== */
.filter-section-header {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.filter-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    display: block;
}

/* ===== SEARCH FILTERS ===== */
.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    justify-content: flex-start;
}

.filter-chip {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    flex: 0 1 auto;
}

.filter-chip:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.filter-chip.active {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-bounce);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
    text-align: center;
}

.action-card i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: transform var(--transition-bounce);
}

.action-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.action-card:hover i {
    transform: scale(1.2) rotate(10deg);
}

.action-card:active {
    transform: translateY(-3px) scale(0.98);
}

/* ===== REGIONAL GRID ===== */
.regional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.region-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    height: 200px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    animation: fadeInScale 0.5s ease-out both;
}

.region-card:nth-child(1) { animation-delay: 0.05s; }
.region-card:nth-child(2) { animation-delay: 0.1s; }
.region-card:nth-child(3) { animation-delay: 0.15s; }
.region-card:nth-child(4) { animation-delay: 0.2s; }
.region-card:nth-child(5) { animation-delay: 0.25s; }
.region-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.region-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.region-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.region-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.region-card:hover .region-image img {
    transform: scale(1.15);
}

.region-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
}

.region-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
    z-index: 1;
}

.region-info h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.region-info p {
    font-size: var(--text-sm);
    opacity: 0.9;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-header h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gray-900);
}

.see-all-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--text-sm);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.see-all-btn:hover {
    background: var(--primary-light);
    transform: translateX(5px);
}

/* ===== RECIPE GRID ===== */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.recipe-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    animation: fadeInScale 0.5s ease-out both;
}

.recipe-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.recipe-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.15) rotate(2deg);
}

.save-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    color: var(--gray-400);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-btn:hover {
    background: white;
    color: var(--error);
    transform: scale(1.15) rotate(10deg);
}

.save-btn.saved {
    color: var(--error);
    background: white;
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.25); }
}

.recipe-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gray-700);
    z-index: 2;
}

.recipe-info {
    padding: 1.25rem;
}

.recipe-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.recipe-meta i {
    color: var(--primary-color);
}

/* ===== CHALLENGES ===== */
.challenges-section {
    background: linear-gradient(135deg, #F7F7F7 0%, #FFFFFF 100%);
    padding: 2rem;
    border-radius: var(--radius-2xl);
    margin-top: 2rem;
}

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

.challenge-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    border: 2px solid var(--gray-200);
    transition: all var(--transition-base);
}

.challenge-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.challenge-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.challenge-card h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.challenge-card p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

/* ===== DRAWER ===== */
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.drawer.active {
    opacity: 1;
    pointer-events: all;
}

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 700px;
    background: white;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: var(--shadow-2xl);
}

.drawer.active .drawer-content {
    transform: translateX(0);
}

.close-drawer {
    position: sticky;
    top: 1rem;
    left: calc(100% - 3rem);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--gray-200);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    color: var(--gray-700);
}

.close-drawer:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* ===== RECIPE DETAIL ===== */
.detail-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.detail-header-content {
    padding: 2rem;
}

.detail-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 900;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
}

.meta-tag i {
    color: var(--primary-color);
}

.recipe-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: white;
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.action-btn.primary {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.action-btn.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* ===== RECIPE DETAIL BODY ===== */
.recipe-detail-body {
    padding: 2rem;
}

.detail-section {
    margin-bottom: 2.5rem;
}

.detail-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.detail-section h2 i {
    color: var(--primary-color);
}

.section-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.serving-adjuster {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.serving-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.serving-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

#servingDisplay {
    font-weight: 700;
    color: var(--gray-900);
    min-width: 30px;
    text-align: center;
}

/* ===== INGREDIENTS LIST ===== */
.ingredients-list {
    list-style: none;
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.ingredient-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
    transition: all var(--transition-fast);
}

.ingredient-item:hover {
    background: white;
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

.ingredient-item:last-child {
    border-bottom: none;
}

.ingredient-item input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.ingredient-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: var(--text-base);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ingredient-measure {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 0.5rem;
    min-width: 80px;
}

.ingredient-name {
    color: var(--gray-800);
}

.ingredient-item input[type="checkbox"]:checked + label {
    opacity: 0.5;
    text-decoration: line-through;
}

/* ===== INSTRUCTIONS ===== */
.instructions-list {
    list-style: none;
    counter-reset: step-counter;
}

.instruction-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    counter-increment: step-counter;
    animation: slideInLeft 0.5s ease-out both;
}

.instruction-step:nth-child(1) { animation-delay: 0.1s; }
.instruction-step:nth-child(2) { animation-delay: 0.2s; }
.instruction-step:nth-child(3) { animation-delay: 0.3s; }

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-lg);
    box-shadow: var(--shadow-md);
}

.step-content {
    flex: 1;
    padding-top: 0.5rem;
    color: var(--gray-700);
    line-height: 1.8;
}

/* ===== VIDEO ===== */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--gray-900);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-base);
}

.modal.active .modal-content {
    transform: scale(1);
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-header h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
}

.close-modal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.close-modal:hover {
    background: var(--error);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== MEAL PLAN SELECTOR ===== */
.meal-plan-selector {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-weight: 600;
    color: var(--gray-700);
}

.form-input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    transition: all var(--transition-base);
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.meal-type-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.meal-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 600;
    color: var(--gray-700);
}

.meal-type-btn i {
    font-size: 2rem;
    color: var(--gray-400);
    transition: all var(--transition-base);
}

.meal-type-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-3px);
}

.meal-type-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
}

.meal-type-btn.active i {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* ===== SHOPPING LIST ===== */
.shopping-list {
    max-height: 500px;
    overflow-y: auto;
}

.shopping-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    transition: all var(--transition-fast);
    flex-wrap: wrap;
}

.shopping-item:hover {
    background: var(--gray-50);
}

.shopping-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.shopping-item.checked .item-name {
    text-decoration: line-through;
    opacity: 0.5;
}

.item-name {
    flex: 1;
    font-size: var(--text-base);
    color: var(--gray-800);
    word-break: break-word;
}

.item-source {
    font-size: var(--text-xs);
    color: var(--gray-500);
    width: 100%;
}

.delete-item {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.delete-item:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--text-base);
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

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

.full-width {
    width: 100%;
    justify-content: center;
}

/* ===== FILTERS ===== */
.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-group label,
.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--text-base);
    color: var(--gray-700);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    flex-wrap: wrap;
}

.checkbox-group label:hover,
.radio-group label:hover {
    background: var(--gray-50);
}

/* ===== PAGE SPECIFIC ===== */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--gray-600);
    font-size: var(--text-lg);
}

.discover-filters,
.saved-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-select,
.filter-search {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    background: white;
    transition: all var(--transition-base);
}

.filter-select:focus,
.filter-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* ===== MEAL PLAN ===== */
.meal-plan-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.week-nav-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.week-nav-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.week-display {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-900);
    text-align: center;
}

#mealPlanPage {
    min-height: 600px;
    display: block;
    width: 100%;
}

#mealPlanGrid {
    display: block;
    width: 100%;
}

.meal-plan-container {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: 20px;
    overflow-x: auto;
    width: 100%;
}

.meal-plan-header {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #FF6B35;
    min-width: 700px;
}

.day-label {
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    font-size: 14px;
    text-transform: uppercase;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

.meal-row {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    min-width: 700px;
}

.meal-type-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #FF6B35;
    text-transform: capitalize;
    font-size: 14px;
    background: #FFF5F1;
    border-radius: 8px;
    padding: 8px;
}

.meal-slot {
    min-height: 130px;
    border: 2px dashed #dee2e6;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meal-slot:hover {
    border-color: #FF6B35;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255,107,53,0.15);
}

.meal-slot[data-recipe-id]:not([data-recipe-id=""]) {
    cursor: pointer;
}

.empty-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 130px;
    padding: 16px;
    color: #adb5bd;
    gap: 8px;
}

.empty-slot i {
    font-size: 28px;
}

.empty-slot span {
    font-size: 13px;
    font-weight: 600;
}

.meal-slot:hover .empty-slot {
    color: #FF6B35;
}

.meal-content {
    width: 100%;
    height: 100%;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.meal-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meal-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    padding: 16px 8px 8px 8px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
}

.remove-meal {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: none;
    color: #dc3545;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s;
    z-index: 30;
}

.remove-meal:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1) rotate(90deg);
}

.meal-plan-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding: 16px;
    flex-wrap: wrap;
}

/* ===== EMPTY STATES ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--gray-500);
    width: 100%;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: var(--text-base);
    margin-bottom: 2rem;
    max-width: 400px;
}

.empty-state.hidden {
    display: none;
}

.cta-btn {
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: var(--text-base);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ===== IMAGE UPLOAD ===== */
.upload-area {
    border: 3px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-area i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.image-preview {
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.image-preview.hidden {
    display: none;
}

/* ===== NUTRITION SECTION ===== */
.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.nutrition-item {
    background: var(--gray-100);
    padding: 16px;
    border-radius: 12px;
    border: 2px solid var(--gray-200);
}

.nutrition-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--gray-600);
    font-weight: 600;
    margin-bottom: 8px;
}

.nutrition-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.nutrition-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.nutrition-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B35, #F7931E);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.nutrition-percent {
    font-size: 11px;
    color: var(--gray-600);
    font-weight: 600;
}

.nutrition-note {
    margin-top: 16px;
    padding: 12px;
    background: #fff3cd;
    border-radius: 8px;
    color: #856404;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    bottom: 100px;
    right: 1rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    width: calc(100% - 2rem);
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid;
    transform: translateX(calc(100% + 2rem));
    transition: transform var(--transition-slow);
    animation: slideInRight 0.4s ease-out forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(calc(100% + 2rem));
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--error);
}

.toast-info {
    border-left-color: var(--info);
}

.toast i {
    font-size: 1.5rem;
}

.toast-success i {
    color: var(--success);
}

.toast-error i {
    color: var(--error);
}

.toast-info i {
    color: var(--info);
}

.toast span {
    flex: 1;
    font-weight: 600;
    color: var(--gray-800);
}

.toast-achievement {
    background: var(--gradient-accent);
    border: none;
    color: white;
}

.achievement-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.achievement-icon {
    font-size: 2.5rem;
    animation: bounce 1s ease infinite;
}

.achievement-title {
    font-weight: 700;
    font-size: var(--text-sm);
    opacity: 0.9;
}

.achievement-name {
    font-weight: 800;
    font-size: var(--text-lg);
}

/* ===== PWA INSTALL PROMPT ===== */
.install-prompt {
    position: fixed;
    bottom: 100px;
    left: 1rem;
    right: 1rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    z-index: var(--z-toast);
    animation: slideUp 0.5s ease-out;
}

.install-prompt.hidden {
    display: none;
}

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

.install-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.install-content i {
    font-size: 2rem;
    color: var(--primary-color);
}

.install-content > div {
    flex: 1;
    min-width: 150px;
}

.install-content strong {
    display: block;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.install-content p {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.install-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dismiss-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
}

.dismiss-btn:hover {
    color: var(--gray-700);
}

/* ===== LOADING ===== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    width: 100%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

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

/* ===== SCROLLBAR STYLING ===== */
#autocompleteDropdown::-webkit-scrollbar,
.meal-plan-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#autocompleteDropdown::-webkit-scrollbar-track,
.meal-plan-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#autocompleteDropdown::-webkit-scrollbar-thumb,
.meal-plan-container::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 10px;
}

#autocompleteDropdown::-webkit-scrollbar-thumb:hover,
.meal-plan-container::-webkit-scrollbar-thumb:hover {
    background: #e55a2b;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .meal-plan-header,
    .meal-row {
        grid-template-columns: 80px repeat(7, minmax(110px, 1fr));
    }
    
    .day-label {
        font-size: 12px;
        padding: 6px;
    }
    
    .meal-type-label {
        font-size: 12px;
        padding: 6px;
    }
    
    .meal-slot {
        min-height: 110px;
    }
    
    .empty-slot {
        min-height: 110px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1.5rem;
    }
    
    .title-main {
        font-size: var(--text-3xl);
    }
    
    .title-sub {
        font-size: var(--text-base);
    }
    
    .hero-description {
        font-size: var(--text-base);
    }
    
    .search-wrapper {
        padding: 0.25rem;
    }
    
    .voice-btn,
    .visual-search-btn {
        width: 36px;
        height: 36px;
    }
    
    .search-input {
        font-size: var(--text-sm);
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .regional-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .region-card {
        height: 150px;
    }
    
    .region-info {
        padding: 1rem;
    }
    
    .region-info h3 {
        font-size: var(--text-base);
    }
    
    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .recipe-image {
        height: 150px;
    }
    
    .drawer-content {
        max-width: 100%;
    }
    
    .detail-title {
        font-size: var(--text-2xl);
    }
    
    .recipe-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .meal-plan-container {
        overflow-x: auto;
    }
    
    .meal-plan-grid {
        min-width: 900px;
    }
    
    .toast-container {
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
        width: calc(100% - 1rem);
    }
    
    .challenges-grid {
        grid-template-columns: 1fr;
    }
    
    .challenge-card {
        padding: 1rem;
    }
    
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .regional-grid {
        grid-template-columns: 1fr;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-chip {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .meal-type-buttons {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
    
    .install-content {
        flex-direction: column;
        text-align: center;
    }
    
    .install-content i {
        margin-bottom: 0.5rem;
    }
    
    .install-btn {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .dock-item span {
        display: none;
    }
    
    .dock-item i {
        font-size: 1.5rem;
    }
    
    .dock-item {
        padding: 0.5rem 0;
    }
    
    .smart-dock {
        padding: 0.25rem;
    }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT ===== */
@media print {
    .smart-dock,
    .recipe-actions,
    .close-drawer,
    .hero-section,
    .quick-actions,
    .search-container,
    .filter-section-header,
    .search-filters,
    .voice-btn,
    .visual-search-btn {
        display: none !important;
    }
    
    .drawer-content {
        position: static;
        transform: none;
        box-shadow: none;
        max-width: 100%;
    }
    
    body {
        background: white;
    }
    
    .page {
        display: block !important;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .dock-item:hover,
    .recipe-card:hover,
    .region-card:hover,
    .action-card:hover,
    .filter-chip:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }
    
    .dock-item:active,
    .recipe-card:active,
    .region-card:active,
    .action-card:active,
    .filter-chip:active,
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.98);
    }
}