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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 15px;
    padding: 20px;
    background-color: #ff6b6b;
    color: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Navigation Styles */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 10px 20px;
    margin-bottom: 30px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: #ffecec;
    color: #ff6b6b;
}

.nav-links a.active {
    background-color: #ff6b6b;
    color: white;
}

.search-container {
    display: flex;
}

.search-container form {
    display: flex;
    gap: 5px;
}

.search-container input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}

.search-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #ff5252;
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container form {
        width: 100%;
    }
    
    .search-container input {
        flex: 1;
    }
}

h1, h2, h3 {
    margin-bottom: 15px;
    color: #333;
}

.search-query {
    margin-bottom: 20px;
}

.search-query h2 {
    font-size: 1.5rem;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #666;
    border-top: 1px solid #ddd;
}

footer a {
    color: #ff6b6b;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* Button Styles */
.button-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #ff5252;
}

/* Recipe Container - Home Page */
.recipe-container {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.recipe {
    text-align: center;
}

.recipe img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.recipe h2 {
    color: #ff6b6b;
    margin-bottom: 15px;
}

.recipe-category {
    display: inline-block;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

/* Recipes List - 10 Random Page */
.recipes-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.recipe-preview {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.recipe-preview:hover {
    transform: translateY(-5px);
}

.recipe-preview a {
    text-decoration: none;
    color: inherit;
}

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

.recipe-preview h3 {
    padding: 15px;
    text-align: center;
    color: #ff6b6b;
}

/* Recipe Details Page */
.recipe-details-container {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.recipe-header {
    text-align: center;
    margin-bottom: 30px;
}

.recipe-header img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 400px;
}

.recipe-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.recipe-meta span {
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
}

.recipe-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .recipe-content {
        grid-template-columns: 1fr;
    }
}

.ingredients-list {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.ingredients-list h3 {
    margin-bottom: 15px;
    color: #ff6b6b;
}

.ingredients-list ul {
    list-style-type: none;
}

.ingredients-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

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

.ingredient-img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 50%;
}

.instructions {
    line-height: 1.8;
}

.instructions h3 {
    margin-bottom: 15px;
    color: #ff6b6b;
}

.instructions p {
    margin-bottom: 20px;
    text-align: justify;
}

.video-container {
    margin-top: 30px;
    text-align: center;
}

.video-container h3 {
    margin-bottom: 15px;
    color: #ff6b6b;
}

.video-container a {
    display: inline-block;
    background-color: #ff6b6b;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.video-container a:hover {
    background-color: #ff5252;
}

/* Error styles */
.error {
    text-align: center;
    padding: 30px;
    background-color: #fff3f3;
    border-radius: 8px;
    border: 1px solid #ffd0d0;
    color: #ff5252;
}

/* Sort and Filter Styles */
.controls-container {
    margin-bottom: 20px;
}

.sort-filter-container {
    display: flex;
    justify-content: space-between;
    background-color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

@media (max-width: 768px) {
    .sort-filter-container {
        flex-direction: column;
    }
}

.sort-container, .filter-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-container label, .filter-container label {
    font-weight: 500;
}

.sort-container select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}

.filter-container input[type="checkbox"] {
    margin-right: 5px;
}

/* Recipe Meta Info */
.recipe-meta-info {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    padding: 0 15px 15px;
    flex-wrap: wrap;
}

.ingredient-count {
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
}

.youtube-badge {
    background-color: #ff0000;
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.no-results {
    text-align: center;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}
