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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin: 0;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95em;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Article & Recipe */
article.recipe h1 {
    font-size: 2em;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.recipe-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.recipe-meta span {
    display: inline-block;
    background: var(--bg-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.recipe-meta .cuisine {
    color: var(--primary-color);
}

.recipe-meta .type {
    color: var(--secondary-color);
}

/* Recipe Sections */
section {
    margin-bottom: 30px;
}

section h2 {
    font-size: 1.5em;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.ingredients ul,
.instructions ol {
    margin-left: 20px;
}

.ingredients li,
.instructions li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.ingredients li {
    list-style: none;
    padding-left: 25px;
    position: relative;
}

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

.instructions ol {
    counter-reset: step-counter;
    list-style: none;
}

.instructions li {
    counter-increment: step-counter;
    padding-left: 40px;
    position: relative;
}

.instructions li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

/* Nutrition */
.nutrition {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.nutrition table {
    width: 100%;
    border-collapse: collapse;
}

.nutrition th,
.nutrition td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.nutrition th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Attribution */
.recipe-attribution {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 30px;
}

.recipe-attribution h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.source-credit {
    margin-bottom: 15px;
    color: var(--text-light);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.attribution-note {
    margin-top: 15px;
    font-size: 0.9em;
    color: var(--text-light);
    font-style: italic;
}

/* Related Recipes */
.related {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.related h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.related ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.related li {
    padding: 0;
}

.related a {
    display: block;
    padding: 12px 15px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.related a:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: var(--bg-light);
    padding: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-size: 0.9em;
    margin-top: 40px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

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

.nav-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-numbers a {
    display: inline-block;
    width: 36px;
    height: 36px;
    text-align: center;
    line-height: 36px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
}

.page-numbers a:hover {
    background: var(--primary-color);
    color: white;
}

.page-numbers .current {
    display: inline-block;
    width: 36px;
    height: 36px;
    text-align: center;
    line-height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    article.recipe h1 {
        font-size: 1.5em;
    }

    .recipe-meta {
        gap: 10px;
    }

    .recipe-meta span {
        padding: 6px 12px;
        font-size: 0.85em;
    }
}
