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

:root {
    --greywhite: #E7ECEF;
    --darkerblue: #274C77;
    --lighterblue: #6096BA;
    --skyblue: #A3CEF1;
    --browngrey: #8B8C89;
    --blackblueish: #34495e;
    --dark: #373349;
    --shadow: rgba(0, 0, 0, .2);
    
    --primary-color: #6096BA;
    --primary-dark: #274C77;
    --secondary-color: #A3CEF1;
    --background: linear-gradient(135deg, #6096BA 0%, #274C77 100%);
    --card-bg: #ffffff;
    --text-primary: #373349;
    --text-secondary: #8B8C89;
    --border-color: #E7ECEF;
    --success-color: #6096BA;
    --shadow-css: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    min-height: 100vh;
    padding: 2rem 1rem;
    padding-top: 1rem;
    color: var(--text-primary);
}

/* Navigation */
.main-nav {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-css);
    gap: 0.5rem;
}

.main-nav a {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem;
    background: transparent;
}

.main-nav a:hover {
    background: rgba(96, 150, 186, 0.1);
    color: var(--darkerblue);
}

.main-nav a.active {
    background: linear-gradient(135deg, #6096BA 0%, #274C77 100%);
    color: white;
}

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

.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.icon {
    font-size: 3rem;
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
}

.section {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    border: 1px solid var(--greywhite);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.preference-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.radio-label {
    cursor: pointer;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.radio-label input[type="radio"]:checked + .radio-button {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(96, 150, 186, 0.1) 0%, rgba(163, 206, 241, 0.2) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 150, 186, 0.3);
}

.radio-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.radio-text {
    font-weight: 500;
    color: var(--text-primary);
}

.input {
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input:focus {
    outline: none;
    border-color: var(--lighterblue);
    box-shadow: 0 0 0 3px rgba(96, 150, 186, 0.1);
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #6096BA 0%, #274C77 100%);
    color: white;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(96, 150, 186, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.25rem;
}

.loading {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    border: 1px solid var(--greywhite);
}

.loading p {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 4px solid var(--skyblue);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.suggestions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.suggestion-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.suggestion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s;
}

.suggestion-card:hover::before {
    left: 100%;
}

.suggestion-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15);
}

.suggestion-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.suggestion-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.suggestion-type {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.back-btn {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.back-btn:hover {
    border-color: var(--lighterblue);
    color: var(--darkerblue);
    background: var(--greywhite);
}

.btn-save {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6096BA 0%, #274C77 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(96, 150, 186, 0.4);
}

.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.recipe-content {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    line-height: 1.8;
}

.recipe-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.recipe-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.recipe-content ul,
.recipe-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.recipe-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    .suggestions-list {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .icon {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}

/* Recipe formatting styles */
.recipe-text {
    color: var(--text-primary);
}

.recipe-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--skyblue);
}

.recipe-section:last-child {
    border-bottom: none;
}

.recipe-text h3 {
    color: var(--darkerblue);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.recipe-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

.recipe-text strong strong {
    background: linear-gradient(135deg, var(--lighterblue), var(--skyblue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recipe-text em {
    color: var(--text-secondary);
    font-style: italic;
}

.recipe-text ul, 
.recipe-text ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.recipe-text li {
    margin: 0.5rem 0;
    line-height: 1.8;
    color: var(--text-primary);
}

.recipe-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.recipe-note {
    background: linear-gradient(135deg, #E7ECEF 0%, #A3CEF1 100%);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary-color);
    margin: 1rem 0;
}

/* Search Styles */
.search-container {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--lighterblue);
    box-shadow: 0 0 0 3px rgba(96, 150, 186, 0.1);
}

.search-btn {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #6096BA 0%, #274C77 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(96, 150, 186, 0.4);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
}

.no-results-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-secondary);
}

/* Recipes Header */
.recipes-header {
    margin-bottom: 1.5rem;
}

.recipes-header h2 {
    color: var(--text-primary);
    font-weight: 600;
}

/* Recipe Header */
.recipe-header {
    text-align: center;
    margin-bottom: 2rem;
}

.recipe-header-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.recipe-header h1 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.recipe-type-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--skyblue) 0%, var(--lighterblue) 100%);
    color: var(--darkerblue);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.suggestion-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Mobile improvements */
/* Save Notification */
.save-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--lighterblue) 0%, var(--primary-color) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px var(--shadow);
    transform: translateY(200%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.save-notification.show {
    transform: translateY(0);
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .main-nav {
        font-size: 0.75rem;
    }
    
    .main-nav a {
        padding: 0.5rem 0.25rem;
    }
    
    .save-notification {
        right: 1rem;
        bottom: 1rem;
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}
