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

body {
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #333;
}

header {
    background: linear-gradient(135deg, #4facfe, #00c6ff);
    color: white;
    text-align: center;
    padding: 25px 10px;
}

.controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px;
}

input, select, button {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

button {
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background: #2980b9;
}

#recipes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    padding: 20px;
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card img {
    width: 100%;
    height: auto;          
    max-height: 200px;     
    object-fit: contain;   
    background: #f0f0f0;
    display: block;
}

.card h3 {
    padding: 10px;
    font-size: 16px;
    text-align: center;
}

.details {
    padding: 10px;
    font-size: 13px;
    max-height: 220px;
    overflow-y: auto;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.details ul, .details ol {
    margin-left: 20px;
    margin-top: 8px;
}

.details li {
    margin-bottom: 5px;
}

footer {
    text-align: center;
    padding: 15px;
    background: #2c3e50;
    color: white;
    margin-top: 20px;
}

@media (max-width: 768px) {
    #recipes {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 480px) {
    input {
        width: 100%;
    }

    .controls {
        flex-direction: column;
        align-items: center;
    }
}
.dark {
    background: #121212;
    color: #eee;
}

.dark header {
    background: #1e1e1e;
}

.dark .card {
    background: #1f1f1f;
    color: #fff;
}

.dark .details {
    background: #2a2a2a;
}

.dark input,
.dark select {
    background: #333;
    color: white;
    border: 1px solid #555;
}

.dark button {
    background: #555;
}

.dark footer {
    background: #1e1e1e;
}
header {
    position: relative; 
}
#darkBtn {
    position: absolute;
    right: 20px;
    top: 20px;

    padding: 8px 12px;
    border-radius: 5px;
    border: none;
    background: black;
    color: white;
    cursor: pointer;
}
