/* RecipeStrip - Clean, Fast, No Bloat */

:root {
    --primary: #e85d04;
    --primary-dark: #d35400;
    --bg: #fafafa;
    --card-bg: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --border: #dfe6e9;
    --success: #00b894;
    --error: #d63031;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Warm Background Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50vh;
    background: 
        radial-gradient(ellipse 100% 100% at 50% 0%, rgba(232, 93, 4, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(255, 159, 64, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Food-themed decorative pattern */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='2' fill='%23e85d04' opacity='0.03'/%3E%3Ccircle cx='10' cy='10' r='1.5' fill='%23ff9f40' opacity='0.03'/%3E%3Ccircle cx='50' cy='50' r='1' fill='%23e85d04' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

/* Decorative food icons */
.header::before {
    content: '🍳';
    position: absolute;
    left: 10%;
    top: 0;
    font-size: 2rem;
    opacity: 0.15;
    animation: foodFloat1 8s ease-in-out infinite;
}

.header::after {
    content: '🥗';
    position: absolute;
    right: 10%;
    top: 10px;
    font-size: 1.8rem;
    opacity: 0.15;
    animation: foodFloat2 10s ease-in-out infinite;
}

@keyframes foodFloat1 {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes foodFloat2 {
    0%, 100% { transform: translateY(0) rotate(5deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
    position: relative;
    display: inline-block;
}

/* Chef hat icon decoration */
.logo::before {
    content: '👨‍🍳';
    position: absolute;
    left: -45px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header:hover .logo::before {
    opacity: 1;
}

.tagline {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

#recipeUrl {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.2s;
}

#recipeUrl:focus {
    border-color: var(--primary);
}

#recipeUrl::placeholder {
    color: #b2bec3;
}

.btn-primary {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
}

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

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

.hint {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
}

/* Error Message */
.error-message {
    background: #ffeaea;
    border: 1px solid var(--error);
    color: var(--error);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Recipe Card */
.recipe-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Decorative corner accent */
.recipe-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(232, 93, 4, 0.05) 50%);
    pointer-events: none;
}

/* Recipe divider decoration */
.recipe-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.2;
}

.recipe-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.recipe-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.recipe-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Action Bar */
.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.btn-action {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    background: var(--border);
}

.btn-action.success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* Recipe Sections */
.recipe-section {
    margin-bottom: 2rem;
}

.recipe-section:last-of-type {
    margin-bottom: 1rem;
}

.recipe-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

/* Ingredients */
.ingredients-list {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.ingredients-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid #f1f1f1;
}

.ingredients-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.ingredients-list li:last-child {
    border-bottom: none;
}

/* Instructions */
.instructions-list {
    list-style: none;
    counter-reset: steps;
    display: grid;
    gap: 1rem;
}

.instructions-list li {
    counter-increment: steps;
    padding-left: 2.5rem;
    position: relative;
    line-height: 1.7;
}

.instructions-list li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, #ff9f40 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(232, 93, 4, 0.3);
    transition: transform 0.2s ease;
}

.instructions-list li:hover::before {
    transform: scale(1.1);
}

/* Nutrition */
.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.nutrition-item {
    background: var(--bg);
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.nutrition-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.nutrition-item .label {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Recipe Footer */
.recipe-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.recipe-footer a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.recipe-footer a:hover {
    text-decoration: underline;
}

/* Saved Recipes Section */
.saved-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.saved-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.saved-list {
    list-style: none;
    margin-bottom: 1rem;
}

.saved-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.saved-list li:hover {
    color: var(--primary);
}

.saved-list li:last-child {
    border-bottom: none;
}

.saved-list .delete-btn {
    color: var(--error);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.1rem;
}

.btn-secondary {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-light);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--bg);
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .logo {
        font-size: 2rem;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .btn-primary {
        width: 100%;
    }

    .recipe-card {
        padding: 1.5rem;
    }

    .recipe-title {
        font-size: 1.5rem;
    }

    .action-bar {
        justify-content: center;
    }

    .btn-action {
        flex: 1;
        min-width: calc(50% - 0.5rem);
        text-align: center;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .header,
    .input-section,
    .action-bar,
    .saved-section,
    .footer,
    .error-message,
    #toast {
        display: none !important;
    }

    .recipe-card {
        box-shadow: none;
        padding: 0;
    }

    .recipe-title {
        font-size: 1.5rem;
    }

    .recipe-footer {
        display: none;
    }

    .instructions-list li::before {
        background: black;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
