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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0; /* Remove padding to allow header to extend full width */
}

.header {
    position: relative;
    width: 100%;
    height: 200px; /* Fixed height for desktop */
    margin-bottom: 3rem;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.header:hover .header-image {
    transform: scale(1.05);
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg, 
        rgba(102, 126, 234, 0.8) 0%, 
        rgba(118, 75, 162, 0.8) 100%
    );
    z-index: 2;
}

.header-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.subtitle {
    font-size: 1.4rem;
    color: rgba(255,255,255,0.95);
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    max-width: 600px;
}

.main {
    padding: 0 2rem;
}

.search-section {
    margin-bottom: 3rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    background: white;
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.search-input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.search-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.results-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

.fragrances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.fragrance-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.fragrance-card-link:hover {
    transform: translateY(-4px);
}

.fragrance-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fragrance-card-link:hover .fragrance-card {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
    background: white;
}

.fragrance-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.fragrance-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.external-link-icon {
    color: #667eea;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.fragrance-card-link:hover .external-link-icon {
    opacity: 1;
    transform: translate(2px, -2px);
}

.notes-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.notes-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-label {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
    font-size: 0.9rem;
}

.notes-content {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.family-text {
    color: #8e44ad;
    font-weight: 500;
    font-style: italic;
}

.fragrance-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.view-product-text {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.fragrance-card-link:hover .view-product-text {
    color: #5a67d8;
    transform: translateX(4px);
}

.error-message {
    background: #fee;
    color: #c53030;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #feb2b2;
    text-align: center;
    margin-top: 2rem;
}

.highlighted-ingredient {
    color: #333;
    font-weight: 700;
}

.candle-recommendation {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.candle-label {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    white-space: nowrap;
}

.candle-name {
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    font-style: italic;
    flex: 1;
}

.candle-generation-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    color: white;
}

.candle-generation-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.candle-generation-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.5;
    margin: 0;
}

.candle-spinner {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

@keyframes candleGlow {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header {
        height: 350px;
    }
    
    .title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    .header {
        height: 300px;
        margin-bottom: 2rem;
        border-radius: 0 0 15px 15px;
    }
    
    .title {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
        max-width: 100%;
    }
    
    .header-content {
        padding: 1.5rem;
    }
    
    .main {
        padding: 0 1rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-button {
        width: 100%;
    }
    
    .fragrances-grid {
        grid-template-columns: 1fr;
    }
    
    .fragrance-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .external-link-icon {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .header {
        height: 250px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .header-content {
        padding: 1rem;
    }
    
    .main {
        padding: 0 0.5rem;
    }
    
    .results-section {
        padding: 1.5rem;
    }
    
    .fragrance-card {
        padding: 1rem;
    }
}

/* Loading state for header image */
.header-image.loading {
    opacity: 0.7;
}

/* Fallback for when image fails to load */
.header-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 0;
}

.header-image {
    z-index: 1;
} 