/* ========================================
   موسوعة الطبخ - نظام التصميم
   ======================================== */

:root {
    --primary: #E63946;
    --primary-dark: #C71F2D;
    --primary-light: #FFF0F1;
    --secondary: #FFB700;
    --secondary-dark: #E5A300;
    --accent: #2A9D8F;
    --accent-dark: #1F7268;

    --bg: #FFFCF7;
    --bg-cream: #FAF3E0;
    --bg-dark: #1A1D23;
    --surface: #FFFFFF;
    --surface-2: #F8F4ED;

    --text: #1A1D23;
    --text-soft: #4A4F58;
    --text-muted: #8A8F98;
    --text-light: #C5C9D0;

    --border: #E8E2D7;
    --border-soft: #F0EAE0;

    --shadow-sm: 0 2px 4px rgba(26, 29, 35, 0.04);
    --shadow: 0 4px 12px rgba(26, 29, 35, 0.08);
    --shadow-lg: 0 12px 32px rgba(26, 29, 35, 0.12);
    --shadow-xl: 0 24px 48px rgba(26, 29, 35, 0.16);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 999px;

    --font-sans: 'Tajawal', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    direction: rtl;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.main-content { min-height: 60vh; padding-bottom: 60px; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.d-inline { display: inline; }

/* ========== Flash ========== */
.flash-message {
    padding: 16px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}
.flash-success { background: #d1f9e6; color: #0f7b3e; border: 2px solid #5ec98a; }
.flash-error { background: #ffe0e0; color: #b71c1c; border: 2px solid #ef5350; }
.flash-close { position: absolute; left: 16px; font-size: 24px; color: currentColor; }

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 15px;
    transition: all 0.25s;
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: white; color: var(--primary); }
.btn-large { padding: 16px 32px; font-size: 17px; }
.btn-danger { background: #dc2626; color: white; }
.btn-success { background: #16a34a; color: white; }
.text-link-danger { color: #dc2626; font-size: 13px; }
.text-link-danger:hover { text-decoration: underline; }

/* ========== Navbar ========== */
.main-nav {
    background: rgba(255, 252, 247, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 76px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 20px;
    flex-shrink: 0;
}
.logo-icon { font-size: 32px; filter: drop-shadow(0 2px 4px rgba(230,57,70,0.3)); }
.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-toggle { display: none; font-size: 24px; color: var(--text); }
.nav-menu { display: flex; align-items: center; gap: 24px; flex: 1; justify-content: space-between; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 500;
    color: var(--text-soft);
    transition: all 0.2s;
}
.nav-link:hover { background: var(--primary-light); color: var(--primary); }
.nav-link.active { background: var(--primary); color: white; }
.nav-search {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border-radius: var(--radius-full);
    padding: 4px 4px 4px 16px;
    width: 280px;
    transition: all 0.2s;
}
.nav-search:focus-within { background: white; box-shadow: 0 0 0 3px var(--primary-light); }
.nav-search input {
    flex: 1; background: transparent; border: none; outline: none;
    padding: 8px 12px; font-family: inherit; font-size: 14px; text-align: right;
}
.nav-search button {
    width: 36px; height: 36px;
    background: var(--primary); color: white;
    border-radius: 50%;
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-user { position: relative; }
.user-trigger {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    color: var(--text);
}
.user-trigger img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.user-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0;
    background: white; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); min-width: 200px; padding: 8px;
    opacity: 0; pointer-events: none; transform: translateY(-8px);
    transition: all 0.2s;
}
.nav-user.open .user-dropdown { opacity: 1; pointer-events: auto; transform: translateY(0); }
.user-dropdown a, .user-dropdown button {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--text); width: 100%; text-align: right;
    transition: background 0.15s;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--surface-2); }

/* ========== Hero ========== */
.hero {
    position: relative;
    padding: 80px 0 100px;
    overflow: hidden;
    background: linear-gradient(135deg, #FFF7E8 0%, #FFE5D9 50%, #FFD1C7 100%);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-grain {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(230,57,70,0.08) 0, transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(255,183,0,0.1) 0, transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(42,157,143,0.06) 0, transparent 50%);
}
.hero-container {
    position: relative;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero-content { z-index: 2; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: white; padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 13px; font-weight: 700; color: var(--primary);
    box-shadow: var(--shadow-sm); margin-bottom: 24px;
}
.badge-dot {
    width: 8px; height: 8px;
    background: var(--primary); border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}
.hero-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 900; line-height: 1.05;
    margin-bottom: 24px; letter-spacing: -0.02em;
}
.title-line { display: block; color: var(--text); }
.title-accent {
    display: block;
    background: linear-gradient(135deg, var(--primary), var(--secondary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--text-soft);
    margin-bottom: 36px;
    max-width: 540px;
}
.hero-search {
    display: flex; align-items: center;
    background: white;
    border-radius: var(--radius-full);
    padding: 8px 8px 8px 24px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px; max-width: 580px;
}
.hero-search > i { font-size: 22px; color: var(--text-muted); margin-left: 12px; }
.hero-search input {
    flex: 1; border: none; outline: none;
    font-size: 16px; padding: 14px 12px;
    background: transparent; font-family: inherit;
    text-align: right;
}
.hero-search button {
    background: var(--primary); color: white;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 700; font-size: 15px;
    transition: all 0.2s;
}
.hero-search button:hover { background: var(--primary-dark); transform: scale(1.02); }
.hero-stats { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-item strong {
    display: block; font-size: 28px; font-weight: 900;
    color: var(--text); line-height: 1; margin-bottom: 4px;
}
.stat-item span { font-size: 13px; color: var(--text-muted); }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

.hero-visual { position: relative; height: 500px; }
.floating-card {
    position: absolute;
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column;
    align-items: center; text-align: center;
    animation: float 6s ease-in-out infinite;
}
.floating-card .emoji { font-size: 40px; margin-bottom: 8px; }
.floating-card strong { display: block; font-size: 16px; }
.floating-card small { color: var(--text-muted); font-size: 12px; }
.card-1 { top: 20px; right: 40px; animation-delay: 0s; }
.card-2 { top: 200px; left: 20px; animation-delay: 1.5s; }
.card-3 { bottom: 80px; right: 80px; animation-delay: 3s; }
.card-main {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    justify-content: center;
    animation: rotate-slow 30s linear infinite;
}
.emoji-big { font-size: 100px; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes rotate-slow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ========== Sections ========== */
.section { padding: 80px 0; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
}
.section-eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}
.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.title-emoji { display: inline-block; margin-right: 8px; }
.section-link {
    color: var(--primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}
.section-link:hover { gap: 12px; }

/* ========== Category Cards ========== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
}
.category-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.category-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--cat-color, var(--primary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--cat-color, var(--primary));
}
.category-card:hover::before { transform: scaleX(1); }
.cat-icon { font-size: 48px; margin-bottom: 12px; }
.category-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.category-card small { color: var(--text-muted); font-size: 13px; }

/* ========== Recipes Grid ========== */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
}
.recipes-featured-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
}
.recipes-featured-grid > .recipe-card-featured { grid-row: span 2; }

/* ========== Recipe Card ========== */
.recipe-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
}
.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    display: block;
}
.recipe-card-featured .card-image { aspect-ratio: 4/5; }
.card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.recipe-card:hover .card-image img { transform: scale(1.05); }
.card-video-badge, .card-featured-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(6px);
}
.card-featured-badge {
    background: var(--secondary);
    color: var(--text);
    top: 12px; left: 12px; right: auto;
}
.card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    display: flex; align-items: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s;
}
.recipe-card:hover .card-overlay { opacity: 1; }
.card-meta-overlay { display: flex; gap: 8px; flex-wrap: wrap; }
.card-meta-overlay span {
    background: rgba(255,255,255,0.95);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    color: white;
}
.card-body {
    padding: 20px;
    display: flex; flex-direction: column;
    gap: 12px; flex: 1;
}
.card-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--cat-color, var(--primary));
    background: color-mix(in srgb, var(--cat-color, var(--primary)) 12%, transparent);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    align-self: flex-start;
}
.card-title { font-size: 18px; font-weight: 800; line-height: 1.3; }
.recipe-card-featured .card-title { font-size: 24px; }
.card-title a { color: var(--text); transition: color 0.2s; }
.card-title a:hover { color: var(--primary); }
.card-desc { color: var(--text-soft); font-size: 14px; line-height: 1.6; }
.card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}
.card-rating {
    display: flex; align-items: center; gap: 4px;
    color: var(--secondary); font-size: 14px;
}
.card-rating .bi-star-fill { color: var(--secondary); }
.card-rating .bi-star { color: var(--text-light); }
.rating-text { color: var(--text-soft); margin-right: 4px; font-weight: 700; }
.rating-text small { color: var(--text-muted); font-weight: 400; }
.card-meta { display: flex; gap: 12px; color: var(--text-muted); font-size: 13px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.card-chef {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-soft); font-size: 13px; font-weight: 500;
}
.card-chef img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.verified-mini { color: var(--primary); font-size: 12px; }
.card-time-ago { color: var(--text-muted); font-size: 12px; }

/* ========== Video Cards ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}
.video-card { display: block; color: inherit; transition: transform 0.2s; }
.video-card:hover { transform: translateY(-4px); }
.video-thumb {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    background: rgba(230, 57, 70, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s;
}
.video-card:hover .video-play {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
}
.video-duration {
    position: absolute;
    bottom: 8px; left: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
}
.video-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.video-chef { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; }
.video-chef img { width: 24px; height: 24px; border-radius: 50%; }

/* ========== Cuisines ========== */
.cuisines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.cuisine-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    border: 2px solid var(--border-soft);
    transition: all 0.3s;
}
.cuisine-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.cuisine-flag { font-size: 40px; display: block; margin-bottom: 8px; }
.cuisine-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.cuisine-card small { color: var(--text-muted); }

/* ========== Chefs ========== */
.chefs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}
.chef-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--border-soft);
}
.chef-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.chef-avatar { position: relative; width: 100px; height: 100px; margin: 0 auto 16px; }
.chef-avatar img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-light);
}
.verified-badge {
    position: absolute;
    bottom: 0; left: 0;
    background: var(--primary);
    color: white;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    font-size: 14px;
}
.chef-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.chef-specialty { color: var(--primary); font-size: 13px; margin-bottom: 12px; font-weight: 600; }
.chef-stats { color: var(--text-muted); font-size: 14px; }

/* ========== CTA ========== */
.cta-section { padding: 60px 0; }
.cta-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-xl);
    padding: 60px;
    color: white;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.cta-box::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    pointer-events: none;
}
.cta-eyebrow {
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    opacity: 0.9;
}
.cta-content h2 {
    font-size: 40px; font-weight: 900;
    margin: 12px 0 16px; line-height: 1.2;
}
.cta-content p { font-size: 18px; margin-bottom: 28px; opacity: 0.95; }
.cta-visual { text-align: center; position: relative; z-index: 2; }
.cta-emoji {
    font-size: 180px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

/* ========== Footer ========== */
.main-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 80px 0 30px;
    margin-top: 60px;
}
.footer-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}
.brand-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.brand-logo span { font-size: 32px; }
.brand-logo h3 { color: white; font-size: 22px; font-weight: 900; }
.footer-brand p { color: #9ca3af; line-height: 1.7; margin-bottom: 24px; max-width: 380px; }
.social-links { display: flex; gap: 12px; }
.social-links a {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
    font-size: 16px;
}
.social-links a:hover { background: var(--primary); transform: translateY(-3px); }
.footer-col h4 { color: white; font-size: 16px; font-weight: 800; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: #9ca3af; transition: color 0.2s; font-size: 14px; }
.footer-col ul a:hover { color: white; }
.footer-col > p { color: #9ca3af; font-size: 14px; margin-bottom: 12px; }
.newsletter-form { display: flex; gap: 4px; }
.newsletter-form input {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}
.newsletter-form input::placeholder { color: #6b7280; }
.newsletter-form button {
    background: var(--primary); color: white;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 13px;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

/* ========== Recipe Page ========== */
.recipe-hero {
    background: linear-gradient(180deg, var(--bg-cream), transparent);
    padding: 32px 0 60px;
}
.recipe-breadcrumb {
    display: flex; align-items: center;
    gap: 8px; color: var(--text-muted);
    font-size: 14px; margin-bottom: 24px;
    flex-wrap: wrap;
}
.recipe-breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.recipe-breadcrumb a:hover { color: var(--primary); }
.recipe-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.recipe-badges { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.badge-category, .badge-cuisine {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px; font-weight: 700;
}
.badge-category {
    background: color-mix(in srgb, var(--cat-color, var(--primary)) 12%, transparent);
    color: var(--cat-color, var(--primary));
}
.badge-cuisine { background: var(--surface-2); color: var(--text); }
.recipe-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900; line-height: 1.1;
    margin-bottom: 16px;
}
.recipe-description {
    font-size: 17px; color: var(--text-soft);
    margin-bottom: 24px; line-height: 1.7;
}
.recipe-author {
    background: white;
    padding: 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.author-link { display: flex; align-items: center; gap: 12px; color: inherit; }
.author-link img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.author-link strong { display: block; font-size: 16px; }
.author-link small { color: var(--text-muted); font-size: 13px; display: block; margin-top: 2px; }

.recipe-rating-display {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 24px; font-size: 16px;
}
.recipe-rating-display .stars { color: var(--secondary); font-size: 20px; }
.recipe-rating-display .stars .bi-star { color: var(--text-light); }
.rating-value { font-weight: 800; font-size: 20px; }
.rating-count { color: var(--text-muted); font-size: 14px; }

.recipe-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: white;
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 14px; font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
}
.action-btn:hover { border-color: var(--primary); color: var(--primary); }
.action-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.recipe-cover {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.cover-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.recipe-video { position: relative; aspect-ratio: 16/9; }
.recipe-video iframe { width: 100%; height: 100%; border: 0; }

/* Quick Info */
.recipe-quickinfo { padding: 30px 0; }
.quickinfo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    background: white;
    padding: 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}
.quick-card {
    text-align: center;
    padding: 8px;
    border-left: 1px solid var(--border-soft);
}
.quick-card:last-child { border-left: none; }
.quick-icon { font-size: 28px; margin-bottom: 6px; }
.quick-card small { display: block; color: var(--text-muted); font-size: 12px; margin-bottom: 4px; }
.quick-card strong { font-size: 16px; font-weight: 800; }
.calories-card {
    background: linear-gradient(135deg, #FFF0F1, #FFE5D9);
    border-radius: var(--radius);
    border-left: none;
}

/* Recipe Layout */
.recipe-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 40px;
    margin-top: 40px;
}
.recipe-sidebar { position: sticky; top: 100px; align-self: start; }
.sidebar-block {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}
.sidebar-block h2, .sidebar-block h3 {
    font-size: 20px; font-weight: 800;
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
    color: var(--text);
}
.sidebar-block h2 i, .sidebar-block h3 i { color: var(--primary); }

.servings-adjuster {
    background: var(--surface-2);
    padding: 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.servings-adjuster label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.servings-controls { display: flex; align-items: center; gap: 8px; }
.servings-controls button {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border);
    font-size: 20px; font-weight: 700;
    color: var(--primary);
    transition: all 0.2s;
}
.servings-controls button:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}
.servings-controls input {
    flex: 1; height: 36px;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px; font-weight: 700;
    background: white;
    outline: none;
    font-family: inherit;
}

.ingredients-list { display: flex; flex-direction: column; gap: 4px; }
.ingredient-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}
.ingredient-item:hover { background: var(--surface-2); }
.ingredient-item input[type="checkbox"] { display: none; }
.ing-checkbox {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    flex-shrink: 0; margin-top: 3px;
    transition: all 0.2s;
    position: relative;
}
.ingredient-item input:checked ~ .ing-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}
.ingredient-item input:checked ~ .ing-checkbox::after {
    content: '✓';
    color: white;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px; font-weight: 700;
}
.ingredient-item input:checked ~ .ing-text {
    text-decoration: line-through;
    opacity: 0.5;
}
.ing-text { flex: 1; font-size: 15px; line-height: 1.5; }
.ing-qty { color: var(--primary); font-weight: 700; }
.ing-unit { color: var(--text-muted); margin-left: 4px; }
.ing-notes { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }

.utensils-list li {
    padding: 8px 0;
    color: var(--text-soft);
    font-size: 14px;
    display: flex; align-items: center;
    gap: 8px;
}
.utensils-list li::before { content: '✓'; color: var(--accent); font-weight: 700; }

.nutrition-note { color: var(--text-muted); font-size: 12px; margin-bottom: 12px; }
.nutrition-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.nutrition-item {
    background: var(--surface-2);
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
}
.nut-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.nut-value { font-weight: 800; font-size: 15px; }

.dietary-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.dietary-tag {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent-dark);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
}

/* Steps */
.recipe-main {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}
.steps-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.steps-title i { color: var(--primary); }
.steps-list { display: flex; flex-direction: column; gap: 32px; }
.step-item { display: flex; gap: 20px; position: relative; }
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 60px; right: 24px;
    bottom: -32px;
    width: 2px;
    background: var(--border-soft);
}
.step-number {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px; font-weight: 900;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    z-index: 1;
}
.step-content { flex: 1; padding-top: 8px; }
.step-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}
.step-content p { font-size: 16px; line-height: 1.8; color: var(--text); }
.step-content img {
    margin-top: 12px;
    border-radius: var(--radius);
    max-height: 300px;
    object-fit: cover;
}

.info-card {
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 32px;
    border-right: 4px solid;
}
.chef-notes-card {
    background: linear-gradient(135deg, #FFFCEB, #FFF7D6);
    border-right-color: var(--secondary);
}
.chef-notes-card h3 i { color: var(--secondary-dark); }
.health-notes-card {
    background: linear-gradient(135deg, #E8F5F2, #D4ECE6);
    border-right-color: var(--accent);
}
.health-notes-card h3 i { color: var(--accent-dark); }
.info-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.info-card p { color: var(--text-soft); line-height: 1.7; }

.recipe-content-rich {
    margin-top: 32px;
    line-height: 1.9;
    color: var(--text);
}
.recipe-tags {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.tag {
    background: var(--surface-2);
    color: var(--text-soft);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    transition: all 0.2s;
}
.tag:hover { background: var(--primary); color: white; }

/* Rating Section */
.rating-section, .comments-section, .related-section {
    margin-top: 60px;
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.rating-section h2, .comments-section h2, .related-section h2 {
    font-size: 24px; font-weight: 900;
    margin-bottom: 24px;
    display: flex; align-items: center; gap: 8px;
}
.rating-section h2 i { color: var(--secondary); }
.comments-section h2 i { color: var(--accent); }
.related-section h2 i { color: var(--primary); }

.rating-form { max-width: 600px; }
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 16px;
}
.star-rating input { display: none; }
.star-rating label {
    cursor: pointer;
    font-size: 36px;
    color: var(--text-light);
    transition: all 0.2s;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--secondary);
}
.rating-form textarea {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.rating-form textarea:focus { border-color: var(--primary); }

.reviews-list { margin-top: 40px; }
.reviews-list h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
}
.review-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-soft);
}
.review-header {
    display: flex; align-items: center;
    gap: 12px; margin-bottom: 8px;
}
.review-header img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.review-stars { display: flex; align-items: center; gap: 4px; color: var(--secondary); font-size: 14px; }
.review-stars small { color: var(--text-muted); margin-right: 8px; }
.review-item p { color: var(--text-soft); margin-top: 8px; line-height: 1.7; }

/* Comments */
.comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-soft);
}
.comment-form img { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.comment-input-wrapper { flex: 1; }
.comment-input-wrapper textarea {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    outline: none;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.comment-input-wrapper textarea:focus { border-color: var(--primary); }
.comments-list { display: flex; flex-direction: column; gap: 24px; }
.comment-item { display: flex; gap: 12px; }
.comment-item img { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.comment-body {
    flex: 1;
    background: var(--surface-2);
    padding: 16px;
    border-radius: var(--radius);
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 14px;
}
.comment-meta small { color: var(--text-muted); margin-right: auto; }
.comment-body p { color: var(--text); line-height: 1.7; }

/* ========== Filters & Forms ========== */
.filters-bar {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}
.filter-group select, .filter-group input {
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
.filter-group select:focus, .filter-group input:focus {
    border-color: var(--primary);
    background: white;
}

/* ========== Forms ========== */
.form-page {
    padding: 40px 0;
}
.form-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}
.form-card h1 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 24px;
}
.form-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-soft);
}
.form-section:last-child { border: none; padding-bottom: 0; margin-bottom: 0; }
.form-section h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-section h2 i { color: var(--primary); }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.form-row.four { grid-template-columns: repeat(4, 1fr); }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text);
}
.form-group label .required { color: var(--primary); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 2px solid var(--border);
    background: white;
    border-radius: var(--radius);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-help {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
}

/* Dynamic Lists (ingredients/steps) */
.dynamic-list { display: flex; flex-direction: column; gap: 12px; }
.dynamic-item {
    background: var(--surface-2);
    padding: 16px;
    border-radius: var(--radius);
    position: relative;
}
.dynamic-item .item-number {
    position: absolute;
    top: -10px; right: -10px;
    width: 28px; height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}
.remove-btn {
    background: white;
    color: #dc2626;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}
.remove-btn:hover { background: #dc2626; color: white; }
.add-btn {
    background: var(--primary-light);
    color: var(--primary);
    padding: 10px 16px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    transition: all 0.2s;
}
.add-btn:hover { background: var(--primary); color: white; }

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.pagination .page-item a,
.pagination .page-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px; height: 40px;
    padding: 0 12px;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
    transition: all 0.2s;
    font-weight: 600;
}
.pagination .page-item.active span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.pagination .page-item a:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pagination .page-item.disabled span { opacity: 0.4; }

/* ========== Admin Dashboard ========== */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    min-height: 100vh;
}
.admin-sidebar {
    background: var(--bg-dark);
    color: white;
    padding: 32px 16px;
}
.admin-sidebar h2 { color: white; font-size: 18px; margin-bottom: 24px; padding: 0 12px; }
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #9ca3af;
    border-radius: var(--radius);
    margin-bottom: 4px;
    transition: all 0.2s;
}
.admin-nav-link:hover { background: rgba(255,255,255,0.05); color: white; }
.admin-nav-link.active { background: var(--primary); color: white; }
.admin-main { padding: 40px; background: var(--surface-2); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-right: 4px solid var(--primary);
}
.stat-card .stat-icon { font-size: 32px; margin-bottom: 12px; }
.stat-card .stat-label { color: var(--text-muted); font-size: 14px; margin-bottom: 4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 900; }

.admin-table {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: 24px;
}
.admin-table table { width: 100%; border-collapse: collapse; }
.admin-table th {
    background: var(--surface-2);
    text-align: right;
    padding: 14px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-soft);
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px;
}
.admin-table tr:hover { background: var(--surface-2); }
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}
.status-published { background: #d1f9e6; color: #0f7b3e; }
.status-pending { background: #fff3cd; color: #856404; }
.status-rejected { background: #ffe0e0; color: #b71c1c; }
.status-draft { background: #e2e3e5; color: #383d41; }

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text); }

/* ========== Auth ========== */
.auth-page {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #FFF7E8 0%, #FFE5D9 100%);
}
.auth-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 460px;
}
.auth-card h1 {
    font-size: 28px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 8px;
}
.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
}
.auth-card .btn-primary { width: 100%; justify-content: center; }
.auth-card .form-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-soft);
    font-size: 14px;
}
.auth-card .form-footer a { color: var(--primary); font-weight: 700; }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .recipe-layout { grid-template-columns: 1fr; }
    .recipe-sidebar { position: static; }
    .hero-container { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .recipes-featured-grid { grid-template-columns: 1fr 1fr; }
    .recipes-featured-grid > .recipe-card-featured { grid-row: auto; grid-column: span 2; }
    .recipe-hero-grid { grid-template-columns: 1fr; }
    .cta-box { grid-template-columns: 1fr; text-align: center; }
    .cta-visual { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 76px;
        left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        gap: 16px;
    }
    .nav-menu.active { display: flex; }
    .nav-links { flex-direction: column; width: 100%; }
    .nav-search { width: 100%; }
    .hero { padding: 50px 0 60px; }
    .section { padding: 50px 0; }
    .recipes-featured-grid { grid-template-columns: 1fr; }
    .recipes-featured-grid > .recipe-card-featured { grid-column: auto; }
    .form-row, .form-row.three, .form-row.four { grid-template-columns: 1fr; }
    .recipe-main { padding: 24px; }
    .footer-grid { grid-template-columns: 1fr; }
    .rating-section, .comments-section, .related-section { padding: 24px; }
    .form-card { padding: 24px; }
    .cta-box { padding: 32px; }
    .cta-content h2 { font-size: 28px; }
}

/* Print Styles */
@media print {
    .main-nav, .main-footer, .recipe-actions,
    .rating-section, .comments-section, .related-section,
    .cta-section, .hero-visual { display: none !important; }
    .recipe-layout { grid-template-columns: 1fr 2fr; }
    body { background: white; }
}
