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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.search-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
}

.search-box {
    display: flex;
    gap: 10px;
}

#searchInput {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s;
}

#searchInput:focus {
    border-color: #667eea;
}

#searchBtn {
    padding: 15px 40px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

#searchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

#searchBtn:active {
    transform: translateY(0);
}

.suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 30px;
    right: 30px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-top: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f5f5ff;
}

.results {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-height: 400px;
}

.welcome-message,
.no-results {
    text-align: center;
    padding: 40px 20px;
}

.welcome-message h2,
.no-results h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.welcome-message p,
.no-results p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #666;
}

.destacion-callout {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f8 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.destacion-callout p {
    margin-bottom: 8px;
}

.destacion-callout p:last-child {
    margin-bottom: 0;
}

.destacion-link {
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid #667eea;
    transition: all 0.3s ease;
}

.destacion-link:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

.result-card {
    margin-bottom: 40px;
}

.result-card h2 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 10px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.result-card h3 {
    color: #555;
    font-size: 1.3rem;
    margin: 20px 0;
}

.companions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.companion-card {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.companion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.companion-card.verdura {
    border-left-color: #4caf50;
    background: #f1f8f4;
}

.companion-card.hierba {
    border-left-color: #8bc34a;
    background: #f7faf1;
}

.companion-card.especia {
    border-left-color: #ff5722;
    background: #fff3f0;
}

.companion-card.fruta {
    border-left-color: #e91e63;
    background: #fef0f5;
}

.companion-card.legumbre {
    border-left-color: #795548;
    background: #f5f3f2;
}

.companion-card.lácteo {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.companion-card.condimento {
    border-left-color: #9e9e9e;
    background: #f5f5f5;
}

.companion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.companion-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
}

.companion-type {
    font-size: 0.85rem;
    color: #666;
    background: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 500;
}

.companion-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    text-transform: capitalize;
}

.tag-huerta {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.tag-cocina {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.companion-benefit {
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.9;
    font-size: 0.95rem;
}

footer p {
    margin-bottom: 8px;
}

.footer-links {
    margin-top: 10px;
}

footer .destacion-link {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

footer .destacion-link:hover {
    border-bottom-color: white;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #c62828;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .search-section {
        padding: 20px;
    }

    .search-box {
        flex-direction: column;
    }

    #searchBtn {
        width: 100%;
    }

    .companions-grid {
        grid-template-columns: 1fr;
    }

    .result-card h2 {
        font-size: 1.5rem;
    }
}

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

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