@media (max-width: 900px) {
    .order-direction-group {
        flex-direction: column;
        gap: 0.7rem;
        align-items: center;
    }
}
@media (max-width: 576px) {
    .order-direction-group {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}
/* ===================================
   ORDER DIRECTION BUTTONS (Ascending/Descending)
   ================================== */
.order-direction-group {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin: 1.2rem 0 0.5rem 0;
}
.btn-order-direction {
    background: var(--color-blue);
    color: var(--color-white);
    border: 2.5px solid var(--color-blue);
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.6rem 2.2rem;
    min-width: 140px;
    box-shadow: 0 4px 15px rgba(0, 24, 164, 0.10);
    transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
    cursor: pointer;
    outline: none;
}
.btn-order-direction:hover,
.btn-order-direction:focus {
    background: var(--color-mint);
    color: var(--color-blue);
    border: 2.5px solid var(--color-mint);
    box-shadow: 0 6px 20px rgba(204, 255, 226, 0.18);
}
.btn-order-direction.selected,
.btn-order-direction:active {
    background: var(--color-pink);
    color: var(--color-white);
    border: 2.5px solid var(--color-pink);
    box-shadow: 0 6px 20px rgba(255, 101, 137, 0.18);
}
/* === SORT BY BUTTONS (Figma Tag States) === */
/* Cooking Time & Price per Serving: Mint theme */
.filter-option[data-sort="cooking-time"],
.filter-option[data-sort="price"] {
    background: var(--color-mint);
    color: var(--color-blue);
    border: 2.5px solid var(--color-mint);
    box-shadow: 0 4px 16px 0 rgba(0,24,164,0.08);
    font-weight: 600;
}
.filter-option[data-sort="cooking-time"]:hover,
.filter-option[data-sort="price"]:hover {
    background: var(--color-mint);
    color: var(--color-blue);
    border: 2.5px solid var(--color-blue);
    box-shadow: 0 6px 24px 0 rgba(0,24,164,0.12);
}
.filter-option[data-sort="cooking-time"].selected,
.filter-option[data-sort="price"].selected {
    background: var(--color-blue);
    color: var(--color-white);
    border: 2.5px solid var(--color-blue);
    box-shadow: 0 6px 24px 0 rgba(0,24,164,0.18);
}

/* Popularity & Number of Ingredients: Pink theme (Figma spec) */
.filter-option[data-sort="popularity"],
.filter-option[data-sort="ingredients-count"] {
    background: var(--color-light-pink);
    color: var(--color-blue);
    border: 2.5px solid transparent;
    box-shadow: 0 4px 16px 0 rgba(255,101,137,0.08);
    font-weight: 600;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.filter-option[data-sort="popularity"]:hover,
.filter-option[data-sort="ingredients-count"]:hover {
    background: var(--color-pink);
    color: var(--color-white);
    border: 2.5px solid var(--color-blue);
    box-shadow: 0 6px 24px 0 rgba(255,101,137,0.12);
}
.filter-option[data-sort="popularity"].selected,
.filter-option[data-sort="ingredients-count"].selected {
    background: var(--color-pink);
    color: var(--color-white);
    border: 2.5px solid var(--color-blue);
    box-shadow: 0 6px 24px 0 rgba(255,101,137,0.18);
}
/* ===================================
   THEME COLORS (Figma Spec)
   ================================== */
:root {
    --color-blue: #0018A4;
    --color-pink: #FF6589;
    --color-light-pink: #FFECEA;
    --color-white: #FFFFFF;
    --color-mint: #CCFFE2;
}
/* ===================================
   RECIPE LIBRARY CSS - WEEK 5
   Designed to match Figma design closely
   ================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-blue);
    background-color: var(--color-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   HERO BANNER STYLES WITH SIMPLE PARALLAX
   ================================== */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, var(--color-blue) 0%, #0015c7 50%, var(--color-pink) 100%);
    color: var(--color-white);
    padding: 0;
    text-align: center;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Enhanced parallax background with more visible effect */
.parallax-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 120%;
    background: url(images/4.jpg) center/cover;
    opacity: 0.8;
    z-index: 1;
    transform: translateY(var(--scroll, 0));
    will-change: transform;
}

/* Disable parallax on mobile for better performance */
@media (max-width: 768px) {
    .parallax-hero::before {
        transform: none;
        position: absolute;
    }
}

/* Disable parallax for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .parallax-hero::before {
        transform: none !important;
    }
}



.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out, float 6s ease-in-out infinite;
    background: rgba(0, 24, 164, 0.2);
    backdrop-filter: blur(8px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 24, 164, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform-style: preserve-3d;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.5),
        0 8px 16px rgba(0, 24, 164, 0.3),
        0 12px 24px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    transform: translateZ(20px);
    animation: floatTitle 8s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
    opacity: 0.95;
    text-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.4),
        0 6px 12px rgba(0, 24, 164, 0.2),
        0 1px 2px rgba(255, 255, 255, 0.1);
    position: relative;
    transform: translateZ(15px);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: floatSubtitle 7s ease-in-out infinite;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 24, 164, 0.2),
        0 1px 2px rgba(255, 255, 255, 0.1);
    position: relative;
    transform: translateZ(10px);
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: floatDescription 9s ease-in-out infinite;
}

.hero-cta-btn {
    background: var(--color-white);
    color: var(--color-blue);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    animation: floatButton 6.5s ease-in-out infinite;
    transform: translateZ(25px);
}

.hero-cta-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hero-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    background: var(--color-mint);
}

.hero-cta-btn:hover:before {
    left: 100%;
}

.hero-cta-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg) rotateY(0deg);
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.3),
            0 8px 16px rgba(0, 24, 164, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    25% {
        transform: translateY(-8px) rotateX(1deg) rotateY(-1deg);
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.35),
            0 12px 24px rgba(0, 24, 164, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }
    50% {
        transform: translateY(-12px) rotateX(0deg) rotateY(1deg);
        box-shadow: 
            0 30px 60px rgba(0, 0, 0, 0.4),
            0 15px 30px rgba(0, 24, 164, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    75% {
        transform: translateY(-8px) rotateX(-1deg) rotateY(0deg);
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.35),
            0 12px 24px rgba(0, 24, 164, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }
}

/* Individual floating animations for enhanced parallax effect */
@keyframes floatTitle {
    0%, 100% {
        transform: translateY(0px) translateZ(20px) rotateX(0deg);
    }
    25% {
        transform: translateY(-10px) translateZ(20px) rotateX(1deg);
    }
    50% {
        transform: translateY(-15px) translateZ(20px) rotateX(0deg);
    }
    75% {
        transform: translateY(-8px) translateZ(20px) rotateX(-0.5deg);
    }
}

@keyframes floatSubtitle {
    0%, 100% {
        transform: translateY(0px) translateZ(15px) rotateY(0deg);
    }
    30% {
        transform: translateY(-8px) translateZ(15px) rotateY(0.5deg);
    }
    60% {
        transform: translateY(-12px) translateZ(15px) rotateY(-0.5deg);
    }
    85% {
        transform: translateY(-5px) translateZ(15px) rotateY(0deg);
    }
}

@keyframes floatDescription {
    0%, 100% {
        transform: translateY(0px) translateZ(10px);
    }
    35% {
        transform: translateY(-6px) translateZ(10px);
    }
    65% {
        transform: translateY(-9px) translateZ(10px);
    }
    90% {
        transform: translateY(-3px) translateZ(10px);
    }
}

@keyframes floatButton {
    0%, 100% {
        transform: translateY(0px) translateZ(25px) scale(1);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }
    20% {
        transform: translateY(-12px) translateZ(25px) scale(1.02);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    }
    40% {
        transform: translateY(-18px) translateZ(25px) scale(1.05);
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    }
    60% {
        transform: translateY(-15px) translateZ(25px) scale(1.03);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    }
    80% {
        transform: translateY(-8px) translateZ(25px) scale(1.01);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.23);
    }
}

/* ===================================
   MAIN CONTENT LAYOUT
   ================================== */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--color-blue);
    margin-bottom: 2rem;
    font-weight: 600;
}

/* ===================================
   FILTERS SECTION
   ================================== */
.filters-section {
    background: var(--color-white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px rgba(0, 24, 164, 0.08);
    border: 1.5px solid var(--color-blue);
}

.filter-group {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    min-width: 180px;
}
/* Dropdown filters row for side-by-side layout */
.dropdown-filters-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Custom dropdown styling */
.custom-dropdown {
    position: relative;
    min-width: 200px;
}

.dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    border: 2.5px solid var(--color-blue);
    background: var(--color-white);
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-blue);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    box-sizing: border-box;
}

.dropdown-trigger:hover {
    border-color: var(--color-pink);
    background: var(--color-light-pink);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 101, 137, 0.25);
}

.dropdown-trigger.active {
    border-color: var(--color-pink);
    background: var(--color-light-pink);
    color: var(--color-pink);
    box-shadow: 0 0 0 3px rgba(255, 101, 137, 0.15);
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    fill: var(--color-blue);
}

.dropdown-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
    fill: var(--color-pink);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border: 2.5px solid var(--color-pink);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 101, 137, 0.2);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scaleY(0.9);
    transform-origin: top;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 6px;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scaleY(1);
}

.dropdown-option {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-blue);
    font-weight: 500;
    border-bottom: 1px solid rgba(204, 255, 226, 0.5);
}

.dropdown-option:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.dropdown-option:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-option:hover {
    background: var(--color-mint);
    color: var(--color-blue);
    transform: translateX(6px);
}

.dropdown-option.selected {
    background: var(--color-light-pink);
    color: var(--color-pink);
    font-weight: 700;
    position: relative;
}

.dropdown-option.selected::after {
    content: '✓';
    position: absolute;
    right: 1.2rem;
    color: var(--color-pink);
    font-weight: bold;
    font-size: 1.1em;
}

/* Custom scrollbar for dropdown */
.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: var(--color-mint);
    border-radius: 4px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--color-pink);
    border-radius: 4px;
    border: 1px solid var(--color-white);
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--color-blue);
}

/* Sort group spacing */
.sort-group {
    margin-bottom: 2rem;
    align-items: center;
    display: flex;
    flex-direction: column;
}

.filter-title {
    font-size: 1.1rem;
    color: var(--color-blue);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: none;
    padding-bottom: 0;
}

.filter-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 0.4rem;
    justify-items: stretch;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1.2rem;
    border: 2px solid var(--color-blue);
    border-radius: 25px;
    background: var(--color-white);
    color: var(--color-blue);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
    min-width: 120px;
    justify-content: center;
    box-shadow: none;
}

.filter-option:hover {
    border: 2px solid var(--color-pink);
    color: var(--color-pink);
    background: var(--color-light-pink);
}

.filter-option input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: #667eea;
}

/* Remove default checked styles for sort buttons, handled by .selected class */
/* === END SORT BY BUTTONS === */

.filter-label {
    font-size: 1rem;
    font-family: inherit;
    transition: color 0.2s;
}

/* ===================================
   ACTION BUTTONS
   ================================== */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ===================================
   BUTTON ICONS & ANIMATIONS
   ================================== */
.btn-icon {
    display: inline-block;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

/* Broom cleaning animation */
.broom-icon {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: top center; /* Rotate from handle, so brush moves */
}

#clear-filters-btn:active .broom-icon {
    animation: broomSweep 1.2s ease-in-out;
}

@keyframes broomSweep {
    0% { transform: rotate(0deg) translateX(0px); }
    15% { transform: rotate(-25deg) translateX(-8px) scale(1.1); }
    30% { transform: rotate(20deg) translateX(8px) scale(1.05); }
    45% { transform: rotate(-15deg) translateX(-6px) scale(1.1); }
    60% { transform: rotate(10deg) translateX(6px) scale(1.05); }
    75% { transform: rotate(-8deg) translateX(-4px) scale(1.08); }
    90% { transform: rotate(5deg) translateX(3px) scale(1.02); }
    100% { transform: rotate(0deg) translateX(0px) scale(1); }
}

/* Enhanced hover effect for broom - small sweeping motion keeping brush on floor */
.btn:hover .broom-icon {
    animation: broomPendulum 1.5s ease-in-out infinite;
}

@keyframes broomPendulum {
    0% { transform: rotate(15deg) scale(1.05); }     /* Small sweep right */
    25% { transform: rotate(5deg) scale(1.1); }      /* Moving towards center */
    50% { transform: rotate(-15deg) scale(1.15); }   /* Small sweep left */
    75% { transform: rotate(-5deg) scale(1.1); }     /* Moving back towards center */
    100% { transform: rotate(15deg) scale(1.05); }   /* Back to right sweep */
}

/* Dice roll animation */
.dice-icon {
    transition: transform 0.3s ease;
}

/* Continuous rolling and orbiting while hovering - dice floats in circles */
#random-recipe-btn:hover .dice-icon {
    animation: diceHoverOrbit 3s ease-in-out infinite;
}

/* Click animation takes priority over hover - triggered by JavaScript class */
#random-recipe-btn .dice-icon.throwing {
    animation: diceThrow 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

@keyframes diceHoverOrbit {
    0% { 
        transform: rotate(0deg) scale(1.05) translateX(4px) translateY(0px); 
    }
    25% { 
        transform: rotate(90deg) scale(1.1) translateX(0px) translateY(-4px); 
    }
    50% { 
        transform: rotate(180deg) scale(1.15) translateX(-4px) translateY(0px); 
    }
    75% { 
        transform: rotate(270deg) scale(1.1) translateX(0px) translateY(4px); 
    }
    100% { 
        transform: rotate(360deg) scale(1.05) translateX(4px) translateY(0px); 
    }
}

@keyframes diceThrow {
    0% { transform: rotate(0deg) scale(1) translateY(0px); }
    15% { transform: rotate(45deg) scale(1.3) translateY(-8px); }  /* Throw up */
    30% { transform: rotate(135deg) scale(1.4) translateY(-12px); }
    45% { transform: rotate(225deg) scale(1.5) translateY(-8px); }
    60% { transform: rotate(315deg) scale(1.3) translateY(-4px); }  /* Coming down */
    75% { transform: rotate(405deg) scale(1.2) translateY(2px); }   /* Bounce */
    85% { transform: rotate(450deg) scale(1.1) translateY(-1px); }  /* Small bounce */
    95% { transform: rotate(495deg) scale(1.05) translateY(1px); }  /* Settle bounce */
    100% { transform: rotate(540deg) scale(1) translateY(0px); }    /* Rest position */
}

/* Refresh spin animation */
.refresh-icon {
    transition: transform 0.3s ease;
}

/* Continuous spinning while hovering - refresh icon keeps rotating */
#refresh-recipes-btn:hover .refresh-icon {
    animation: refreshHoverSpin 2s linear infinite;
}

/* Fast burst spin when clicked - immediate feedback */
#refresh-recipes-btn .refresh-icon.burst-spin {
    animation: refreshBurstSpin 0.8s linear infinite !important;
}

@keyframes refreshHoverSpin {
    0% { transform: rotate(0deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1.05); }
}

@keyframes refreshBurstSpin {
    0% { transform: rotate(0deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1.2); }
}

/* Loading state for refresh button */
#refresh-recipes-btn.loading {
    position: relative;
    overflow: hidden;
}

#refresh-recipes-btn.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced hover effects for button icons (dice has its own specific animation) */
.btn:hover .btn-icon {
    transform: scale(1.1);
}

/* Improved spacing for button icons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

/* Note: Broom hover effect is defined above in the broom-specific section */
/* Note: Dice hover effect is defined above in the dice-specific section */
/* Note: Refresh hover effect is defined above in the refresh-specific section */

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 160px;
}

/* Special styling for main action buttons */
.btn-primary,
.btn-secondary {
    background: var(--color-pink);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(255, 101, 137, 0.10);
    border: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn-primary:hover,
.btn-secondary:hover {
    background: var(--color-mint);
    color: var(--color-blue);
    box-shadow: 0 6px 20px rgba(204, 255, 226, 0.18);
    transform: translateY(-2px);
}
.btn-primary:active,
.btn-secondary:active,
.btn-primary.selected,
.btn-secondary.selected {
    background: var(--color-blue);
    color: var(--color-white);
    box-shadow: 0 6px 20px rgba(0, 24, 164, 0.18);
}

/* ===================================
   RECIPE DISPLAY SECTION
   ================================== */
.recipe-display-section {
    text-align: center;
}

.recipe-container {
    margin-bottom: 2rem;
    width: 100%;
}

/* Recipe Card Styles */
.recipe-card {
    background: var(--color-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--color-blue);
    max-width: 400px;
    width: 100%;
    transition: box-shadow 0.3s, transform 0.3s;
    border: none;
}

.recipe-card:hover {
    box-shadow: 0 8px 32px 0 var(--color-blue), 0 0 0 2.5px var(--color-pink);
    transform: translateY(-5px) scale(1.02);
}

.recipe-image {
    height: 250px;
    background: var(--color-light-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.placeholder-image {
    font-size: 4rem;
    color: var(--color-blue);
    opacity: 0.8;
}

/* Real recipe images */
.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Heart button for favorites */
.heart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}

.heart-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.heart-btn.favorited {
    background: rgba(255, 101, 137, 0.9);
    color: white;
}

.heart-btn.favorited:hover {
    background: rgba(255, 101, 137, 1);
}

.heart-icon {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.heart-btn:active .heart-icon {
    animation: heartPulse 0.6s ease-in-out;
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.3) rotate(-5deg); }
    50% { transform: scale(1.5) rotate(5deg); }
    75% { transform: scale(1.2) rotate(-2deg); }
    100% { transform: scale(1); }
}

/* Heart animation for favorites button */
.btn .heart-icon {
    transition: transform 0.3s ease;
}

.btn:hover .heart-icon {
    animation: heartFloat 2s ease-in-out infinite;
}

@keyframes heartFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    25% { transform: translateY(-3px) scale(1.05); }
    50% { transform: translateY(-5px) scale(1.1); }
    75% { transform: translateY(-2px) scale(1.05); }
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-title {
    font-size: 1.4rem;
    color: var(--color-blue);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.recipe-description {
    color: var(--color-pink);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-blue);
    font-size: 0.9rem;
}

.recipe-time,
.recipe-difficulty {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ===================================
   MESSAGE DISPLAY
   ================================== */
.message-display {
    background: var(--color-mint);
    border: 1.5px solid var(--color-blue);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: var(--color-blue);
    font-weight: 500;
}

.message-display.success {
    background: var(--color-mint);
    border-color: var(--color-blue);
    color: var(--color-blue);
}

.message-display.error {
    background: var(--color-light-pink);
    border-color: var(--color-pink);
    color: var(--color-pink);
}

.message-display.loading {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    position: relative;
}

.message-display.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #856404;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   FOOTER
   ================================== */
.footer {
    background: var(--color-blue);
    color: var(--color-white);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* ===================================
   RESPONSIVE DESIGN
   Mobile First Approach
   ================================== */

/* Small screens (320px - 576px) */
@media (max-width: 1200px) {
    .dropdown-filters-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
}
@media (max-width: 768px) {
    .dropdown-filters-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .filter-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }
    
    /* Custom dropdown mobile adjustments */
    .custom-dropdown {
        min-width: auto;
    }
    
    .dropdown-trigger {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        font-size: 0.9rem;
    }
    
    .dropdown-option {
        padding: 0.7rem 1rem;
    }
}
@media (max-width: 576px) {
    .dropdown-filters-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .filter-options {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Custom dropdown small mobile adjustments */
    .dropdown-trigger {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        min-height: 44px;
    }
    
    .dropdown-menu {
        font-size: 0.85rem;
        max-height: 200px;
    }
    
    .dropdown-option {
        padding: 0.6rem 0.8rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    .hero-banner {
        padding: 3rem 0;
        min-height: 60vh;
    }
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .hero-cta-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    .filters-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    .dropdown-filters-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .filter-group {
        min-width: unset;
    }
    select {
        width: 100%;
    }
    .filter-options {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .filter-option {
        min-width: 100px;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    .btn {
        width: 100%;
        max-width: 250px;
    }
    .recipe-card {
        max-width: 100%;
    }
    .recipe-image {
        height: 200px;
    }
    .placeholder-image {
        font-size: 3rem;
    }
}

/* Medium screens (577px - 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    .hero-banner {
        padding: 4rem 0;
        min-height: 70vh;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }
    .filter-options {
        gap: 0.8rem;
    }
    
    .filter-option {
        min-width: 110px;
    }
    
    .recipe-card {
        max-width: 350px;
    }
}

/* Large screens (769px - 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .filter-options {
        gap: 1rem;
    }
    
    .container {
        max-width: 750px;
    }
}

/* Extra large screens (993px - 1200px) */
@media (min-width: 993px) and (max-width: 1200px) {
    .container {
        max-width: 970px;
    }
}

/* XXL screens (1201px+) */
@media (min-width: 1201px) {
    .container {
        max-width: 1200px;
    }
    
    .filter-options {
        gap: 1.2rem;
    }
    
    .filters-section {
        padding: 2.5rem;
    }
}

/* Ultra-wide screens (1600px+) */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .main-content {
        padding: 3rem 0;
    }
    
    .filters-section {
        padding: 3rem;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.7rem;
    }
    
    .hero-description {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}



/* Multiple recipe cards layout */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    width: 100%;
}

/* Responsive grid adjustments */
@media (min-width: 768px) {
    .recipe-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 1200px) {
    .recipe-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }
}

/* Ensure recipe cards don't get too wide */
.recipe-card {
    max-width: 400px;
    justify-self: center;
}

/* Recipe Card Enhanced Styles for Week 6 */
.recipe-details {
    margin: 1rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.recipe-details div {
    margin-bottom: 0.3rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--color-blue);
    background: var(--color-light-pink);
    border-radius: 12px;
    border: 2px solid var(--color-pink);
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: var(--color-pink);
    font-size: 1.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Hidden class for dynamic showing/hiding */
.hidden {
    display: none;
}

/* Fade in animation for dynamic content */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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