body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    text-align: center;
}

header {
    background-image: url(../assets/images/form-pattern.png);
    background-clip: content-box;
    background-color: rgba(17, 16, 16, 0.749);
    background-position: absolute;
    color: white;
    padding: 0px;
    display: flex;
    font-size: 24px;
    font-weight: bold;
    justify-content: space-around;
    align-items: center;
}
header img{
  margin-top: 3%;
  width: 15%;
  height: 7%;
}
header button {
  font-size: 15px;
  padding: 10px 20px;
  background-color: transparent;
  color: wheat;
  border-top: #ff6f00 solid 1px;
  border-right: #ffffff solid 1px;
  border-bottom: white solid 1px;
  border-left: #ff6f00 solid 1px;
  transition: 1s;
}
header button:hover{
  background: linear-gradient(135deg,#a9581a  ,#fff);
  color: #000;
  transition: 1s;
  cursor: pointer;
}

/* Filter Section Styles */
.filter-section {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff6f00;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.filter-title {
    color: #ff6f00;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 20px;
}

.category-filter, .ingredient-filter {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    flex: 1;
    min-width: 250px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.category-filter:hover, .ingredient-filter:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.category-filter h3, .ingredient-filter h3 {
    margin-top: 0;
    color: #ff6f00;
    font-size: 18px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

#categoryFilter {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #fff;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s;
}

#categoryFilter:focus {
    border-color: #ff6f00;
    outline: none;
}

.ingredients-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    background-color: rgba(14, 6, 6, 0.9);
    border-radius: 4px;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: #ff6f00 rgba(255, 255, 255, 0.1);
}

.ingredients-list::-webkit-scrollbar {
    width: 8px;
}

.ingredients-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.ingredients-list::-webkit-scrollbar-thumb {
    background-color: #ff6f00;
    border-radius: 4px;
}

.filter-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 0 20px;
}

.filter-tag {
    background-color: #ff6f00;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-tag .remove-tag {
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

/* Button Styles */
.search-btn, .reset-btn {
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-btn {
    background-color: #ff6f00;
    color: white;
}

.search-btn:hover {
    background-color: #e56400;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.reset-btn {
    background-color: #555;
    color: white;
}

.reset-btn:hover {
    background-color: #444;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
















main {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 20px 0;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(../assets/images/footer-bg.jpg);
    background-size: cover;
    z-index: -1;
    opacity: 0.9;
}

.recipe-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.flip-card {
    background-color: transparent;
    width: 300px;
    height: 320px;
    perspective: 1000px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.flip-card:hover {
    transform: translateY(-5px);
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.flip-card-front {
    background-color: #fff;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.flip-card:hover .flip-card-front img {
    transform: scale(1.05);
}

.flip-card-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
    border-radius: 20px;
}

.flip-card-front h2 {
    position: absolute;
    bottom: 20px;
    width: 100%;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    z-index: 1;
    font-size: 22px;
    padding: 0 15px;
}

.flip-card-back {
    background: linear-gradient(135deg, #ff6f00, #e56400);
    color: white;
    transform: rotateY(180deg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.flip-card-back h1 {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.flip-card-back p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
    text-align: left;
}

.flip-card-back button {
    background-color: rgba(0,0,0,0.3);
    color: white;
    font-size: 16px;
    padding: 10px 20px;
    border: 2px solid white;
    cursor: pointer;
    border-radius: 30px;
    margin-top: 10px;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flip-card-back button:hover {
    background-color: white;
    color: #ff6f00;
    transform: translateY(-2px);
}

/* Recipe Container Styles */
.recipe-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    gap: 20px;
}

/* Recipe Count Styles */
.recipe-count {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    color: white;
    font-size: 18px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 5px;
}

.no-recipes-message {
    width: 100%;
    text-align: center;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    color: #333;
    font-size: 18px;
    margin: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ingredients-title {
    margin-top: 15px;
    margin-bottom: 5px;
    text-align: left;
}

.ingredients-list-text {
    text-align: left;
    margin-top: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border-radius: 10px;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    color: #333;
    transform: translateY(-50px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.modal-content.modal-open {
    transform: translateY(0);
    opacity: 1;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: #ff6f00;
    text-decoration: none;
}

#modalTitle {
    color: #ff6f00;
    margin-top: 10px;
    border-bottom: 2px solid #ff6f00;
    padding-bottom: 10px;
}

#modalDescription {
    font-style: italic;
    margin: 15px 0;
}

#modalIngredients, #modalRecipe {
    margin-top: 20px;
    text-align: left;
}

#modalIngredients h3, #modalRecipe h3 {
    color: #ff6f00;
    margin-bottom: 10px;
    font-size: 18px;
}

#modalIngredients ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 0;
}

#modalIngredients li {
    margin-bottom: 5px;
}

#modalRecipe p {
    line-height: 1.6;
}

/* Mobile Navigation */
nav.show-mobile-nav ul {
    display: flex;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: row;
        padding: 10px;
        text-align: center;
        display: flex !important;
    }
    
    header img {
        width: 25%;
        margin-top: 10px;
    }
    
    header h1 {
        font-size: 15px;
        margin: 10px 0;
    }
    
    nav ul {
        flex-direction: column;
        display: none;
    }
    
    .filter-section {
        padding: 15px 10px;
    }
    
    .filter-title {
        font-size: 20px;
    }
    
    .filter-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .category-filter, .ingredient-filter {
        width: 90%;
        min-width: auto;
    }
    
    .ingredients-list {
        max-height: 150px;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-btn, .reset-btn {
        width: 100%;
    }
    
    .flip-card {
        width: 280px;
        height: 300px;
    }
    
    .modal-content {
        margin: 30% auto 10% auto;
        width: 90%;
        padding: 15px;
    }
    
    #modalTitle {
        font-size: 20px;
    }
    
    .active-filters {
        padding: 0 5px;
    }
}

/* Animation for recipe cards */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.flip-card {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Custom scrollbar for the whole page */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background-color: #ff6f00;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #e56400;
}