/* Basic reset and mobile-first styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #faf8f5;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 193, 7, 0.03) 0%, transparent 50%);
}

header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffc845 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '🍽️ 🥗 🍕 🍰 🥘 🍜 🥖 🧁';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.08;
    letter-spacing: 2rem;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

header h1 {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 3px;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 500;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.controls {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

button {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, #f7931e 0%, #ff6b35 100%);
}

button:active {
    transform: translateY(0);
}

input[type="text"] {
    font-family: 'Inter', sans-serif;
    padding: 0.75rem;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    min-width: 120px;
}

select {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

#recipeList {
    display: grid;
    gap: 1rem;
}

.recipe-card {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #ffc845;
    position: relative;
}

.recipe-card::before {
    content: '👨‍🍳';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.15;
    transition: all 0.3s ease;
}

.recipe-card:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
}

.recipe-card:hover::before {
    opacity: 0.3;
    transform: scale(1.1);
}

.recipe-title {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.recipe-link {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recipe-link:hover {
    color: #ff6b35;
    text-decoration: none;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.recipe-source {
    font-weight: 600;
    color: #ff6b35;
}

.recipe-date {
    color: #999;
}

.recipe-url {
    color: #ff6b35;
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
    transition: color 0.3s ease;
}

.recipe-url:hover {
    color: #f7931e;
    text-decoration: underline;
}

.recipe-tags {
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    color: #d97120;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    font-weight: 600;
    border: 1px solid #ffd699;
}

.tag:hover {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border-color: #ff6b35;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.tag.active {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border-color: #ff6b35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.tag.active:hover {
    background: linear-gradient(135deg, #f7931e 0%, #ff6b35 100%);
}

.tag.favorite {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #d97120;
    font-weight: 700;
    position: relative;
    padding-left: 1.5rem;
    border-color: #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.tag.favorite::before {
    content: "★";
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
}

.tag.favorite:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    transform: translateY(-2px);
}

.tag.favorite.active {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border-color: #ff6b35;
    box-shadow: 0 2px 12px rgba(255, 107, 53, 0.5);
}

.tag.favorite.active:hover {
    background: linear-gradient(135deg, #f7931e 0%, #ff6b35 100%);
}

.recipe-card.has-favorite {
    border-left: 4px solid #ffd700;
    position: relative;
    background: linear-gradient(to right, #fffef9 0%, white 10%);
}

.recipe-card.has-favorite::before {
    content: "⭐";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.filter-indicator {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(255, 107, 53, 0.25);
}

.filter-indicator button {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    margin-left: 1rem;
    font-weight: 600;
    box-shadow: none;
}

.filter-indicator button:hover {
    background-color: white;
    color: #ff6b35;
    transform: translateY(-1px);
}

/* Mobile optimizations */
@media (min-width: 768px) {
    .controls {
        flex-direction: row;
        align-items: center;
    }
    
    input[type="text"] {
        width: auto;
        flex: 1;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .header-icon {
        font-size: 2.5rem;
    }
    
    #recipeList {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}
