* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root {
    --tenne-tawny: #7fa154;
    --tenne-tawny-dark: #537b3f;
}

body {
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.6;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    overflow-x: hidden;
    height: 100vh;
    overflow: auto;
}

::-webkit-scrollbar {
    width: 0px;
}

header li {
    list-style: none;
}

header a {
    text-decoration: none;
    color: #000;
    font-size: 1rem;
}

header a:hover {
    color: var(--tenne-tawny);
}

header {
    position: relative;
    padding: 0 2rem;
}

.navbar {
    width: 100%;
    height: 80px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo img {
    width: 100px;
    cursor: pointer;
}

.navbar a {
    font-size: 15px;
    font-weight: 600;
}

.navbar .links {
    display: flex;
    gap: 2rem;
    cursor: pointer;
}

.navbar .toggle_btn {
    font-size: 2.5rem;
    cursor: pointer;
    display: none;
}

.navbar .menu {
    display: flex;
    justify-content: center;
    align-items: center;
}

.action_btn {
    background-color: var(--tenne-tawny);
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    outline: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: scale 0.2s ease;
}

.action_btn:hover {
    scale: 1.1;
    transition: 0.2s;
    color: #fff;
    background-color: var(--tenne-tawny-dark);
}

.action_btn:active {
    scale: 0.95;
}

.dropdown_menu {
    display: none;
    position: absolute;
    right: 2rem;
    top: 100px;
    height: 0;
    width: 300px;
    background-color: #b0b0b0;
    backdrop-filter: blur(15px);
    border-radius: 10px;
    overflow: hidden;
    transition: height 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dropdown_menu.open {
    height: 320px;
}

.dropdown_menu li {
    padding: 0.7rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dropdown_menu .action_btn {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn {
    font-family: inherit;
    cursor: pointer;
    outline: 0;
    font-size: 1.05rem;
}

.text {
    opacity: 0.8;
}

.title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.container {
    min-height: 100vh;
    min-width: 100vw;
}

.meal-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    text-align: center;
}

.meal-search {
    margin: 2rem 0;
}

.meal-search cite {
    font-size: 1rem;
}

.meal-search-box {
    margin: 1.2rem 0;
    display: flex;
    align-items: stretch;
}

.search-control,
.search-btn {
    width: 100%;
}

#search-type {
    width: 150px;
    padding: 0 1rem;
    font-size: 1.1rem;
    font-family: inherit;
    outline: 0;
    border: 1px solid var(--tenne-tawny);
    color: black;
    background-color: #fff;
    border-top-left-radius: 2rem;
    border-bottom-left-radius: 2rem;
    cursor: pointer;
}

.search-control {
    padding: 0 1rem;
    font-size: 1.1rem;
    font-family: inherit;
    outline: 0;
    border: 1px solid var(--tenne-tawny);
    color: black;
    border-radius: 0;
    border-left: none;
}

.search-control::placeholder {
    color: black;
}

.search-btn {
    width: 150px;
    height: 55px;
    font-size: 1.8rem;
    background: var(--tenne-tawny);
    color: #fff;
    border: none;
    border-top-right-radius: 2rem;
    border-bottom-right-radius: 2rem;
    transition: all 0.4s linear;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-btn:hover {
    background: var(--tenne-tawny-dark);
}

.meal-result {
    margin-top: 4rem;
}

#meal {
    margin: 1rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 2fr));
    gap: 1rem;
}

.meal-item {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 21px -12px rgba(0, 0, 0, 0.79);
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
}

.meal-img img {
    width: 100%;
    display: block;
    object-fit: cover;
    height: 250px;
}

.meal-name {
    padding: 1.5rem 0.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.meal-name h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.meal-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.meal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.recipe-btn {
    text-decoration: none;
    color: #fff;
    background: var(--tenne-tawny);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.75rem 0;
    display: inline-block;
    width: calc(100% - 50px);
    text-align: center;
    border-radius: 2rem;
    transition: all 0.4s linear;
}

.recipe-btn:hover {
    background: var(--tenne-tawny-dark);
}

.wishlist-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #ccc;
    transition: color 0.3s ease;
}

.wishlist-btn:hover,
.wishlist-btn .wishlist-active {
    color: var(--tenne-tawny);
}

.wishlist-btn .wishlist-active {
    color: var(--tenne-tawny);
}

.meal-details {
    background: #fff;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    color: #000;
}

.meal-details-content {
    margin: 2rem;
}

.meal-details-content p:not(.recipe-category) {
    padding: 1rem 0;
}

.recipe-back-btn {
    background: var(--tenne-tawny);
    color: #fff;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 2rem;
    transition: all 0.4s linear;
    cursor: pointer;
    margin-bottom: 2rem;
}

.recipe-back-btn:hover {
    background: var(--tenne-tawny-dark);
}

.recipe-title {
    letter-spacing: 1px;
    padding-bottom: 1rem;
    color: var(--tenne-tawny);
}

.recipe-category {
    background: var(--tenne-tawny);
    font-weight: 600;
    color: #fff;
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
    margin-bottom: 1rem;
}

.recipe-instruct {
    padding: 1rem 0;
}

.recipe-meal-img img {
    width: 500px;
    height: 450px;
    border-radius: 20px;
    margin: 0 auto;
    display: block;
    object-fit: cover;
}

.recipe-video {
    margin: 1.4rem 0;
    width: 100%;
}

.notFound {
    grid-template-columns: 1fr!important;
    color: var(--tenne-tawny);
    font-size: 1.8rem;
    font-weight: 600;
    width: 100%;
}

footer {
    background-color: #7fa154;
    color: white;
}

.container1 {
    width: 100vw;
    padding: 0 100px;
}

.formSearch {
    border-radius: 20px;
    border: 0px;
    height: 40px;
}

.btnSearch {
    background-color: #537b3f;
    border-color: #7fa154;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
    border: 0px;
}

.btnSearch:hover {
    background-color: #3e4f29;
    border-color: #3e4f29;
    border: 0px;
}

.star-rating {
    display: flex;
    gap: 5px;
    margin: 5px 0;
}

.star {
    font-size: 25px;
    cursor: pointer;
    color: #ccc;
    transition: color 0.3s;
}

.star.selected {
    color: #7fa154;
}

/* Wishlist specific styles */
.wishlist-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.wishlist-title {
    font-size: 2rem;
    color: var(--tenne-tawny);
    margin-bottom: 2rem;
    text-align: center;
}

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

.wishlist-item {
    background-color: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 21px -12px rgba(0, 0, 0, 0.79);
    transition: transform 0.3s ease;
}

.wishlist-item:hover {
    transform: translateY(-5px);
}

.wishlist-item-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.wishlist-item-content {
    padding: 1.5rem;
}

.wishlist-item-title {
    font-size: 1.4rem;
    color: var(--tenne-tawny);
    margin-bottom: 0.5rem;
}

.wishlist-item-category {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.wishlist-item-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wishlist-view-btn,
.wishlist-remove-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.wishlist-view-btn {
    background-color: var(--tenne-tawny);
    color: #fff;
}

.wishlist-view-btn:hover {
    background-color: var(--tenne-tawny-dark);
}

.wishlist-remove-btn {
    background-color: #f44336;
    color: #fff;
}

.wishlist-remove-btn:hover {
    background-color: #d32f2f;
}

.empty-wishlist {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-top: 2rem;
}

/* Wishlist message styles */
.wishlist-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--tenne-tawny);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.wishlist-message-hide {
    opacity: 0;
}

/* Media Queries */
@media (max-width: 850px) {
    .navbar .links,
    .navbar .action_btn {
        display: none;
    }
    .navbar .toggle_btn {
        display: block;
    }
    .dropdown_menu {
        display: block;
    }
}

@media  (max-width: 768px) {
    .wishlist-items {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .meal-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .recipe-btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    .wishlist-btn {
        text-align: center;
    }
    .wishlist-message {
        bottom: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

@media (max-width: 530px) {
    .navbar {
        padding: 0 1rem;
    }
    .navbar .logo img {
        width: 80px;
    }
    .meal-search-box {
        width: 100%;
        flex-direction: row;
    }
    .search-btn {
        height: 45px;
        font-size: 1.5rem;
    }
    .meal-item {
        margin: 1rem 0;
    }
    .meal-img img {
        height: 200px;
    }
    .recipe-meal-img img {
        width: 80vw;
        height: 30vh;
    }
    iframe {
        width: 80vw;
        height: 30vh;
    }
    .dropdown_menu {
        left: 2rem;
        width: unset;
    }
}

@media screen and (min-width: 530px) {
    .meal-search-box {
        width: 630px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (min-width: 500px) {
    #meal {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 1rem;
    }
    .meal-item {
        margin: 0;
    }
}

@media screen and (min-width: 850px) {
    #meal {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .wishlist-container {
        padding: 1rem;
    }
    .wishlist-title {
        font-size: 1.5rem;
    }
    .wishlist-item-title {
        font-size: 1.2rem;
    }
    .wishlist-item-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    .wishlist-view-btn,
    .wishlist-remove-btn {
        width: 100%;
    }
}