:root {
    --primary-color: #00875a;
    --primary-hover: #006644;
    --accent-amber: #f59e0b;
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

html, body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-page);
    min-height: 100vh;
}

body.cooking-mode-open {
    overflow: hidden !important;
}

h1, h2, h3, .recipe-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #ffffff;
    padding: 2.2rem 2rem;
    border-radius: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    color: #9ca3af;
    margin-bottom: 0;
    font-size: 1rem;
}

/* Filter Card */
.filter-card {
    border-radius: 1rem;
    background: var(--card-bg);
}

.search-input-group .form-control {
    font-size: 1.05rem;
}

.search-input-group .form-control:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

/* Recipe Card Grid & Items */
.recipe-card {
    border-radius: 0.875rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    background: var(--card-bg);
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.12) !important;
}

.recipe-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: #f1f5f9;
    overflow: hidden;
}

.recipe-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-img {
    transform: scale(1.04);
}

.recipe-img-placeholder {
    width: 100%;
    height: 100%;
}

.recipe-title {
    font-size: 1.05rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7rem;
}

.recipe-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Recipe Details */
.recipe-hero-card {
    border-radius: 1rem;
}

.recipe-hero-img {
    min-height: 280px;
    max-height: 380px;
}

.ingredient-item {
    transition: background-color 0.15s ease;
    border-radius: 0.5rem;
    cursor: pointer;
}

.ingredient-item:hover {
    background-color: #f8fafc;
}

.ingredient-item.checked .ingredient-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.step-card {
    transition: border-color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

.step-card:hover {
    border-color: #cbd5e1;
}

/* Typography / Utilities */
.fs-7 {
    font-size: 0.8rem;
}

.fs-8 {
    font-size: 0.725rem;
}

.hover-shadow {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.transition {
    transition: all 0.2s ease-in-out;
}

/* Floating Bookmark Button on Cards */
.btn-bookmark-float {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(17, 24, 39, 0.65);
    border: none;
    backdrop-filter: blur(4px);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 2;
}

.btn-bookmark-float:hover {
    transform: scale(1.15);
    background: rgba(17, 24, 39, 0.85);
}

.cursor-pointer {
    cursor: pointer !important;
}

/* Custom Lists Cards */
.list-card {
    border-radius: 0.875rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.list-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.12) !important;
}

.list-cover-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #f1f5f9;
}

.list-cover-grid {
    display: grid;
    width: 100%;
    height: 100%;
    gap: 2px;
    background-color: #e2e8f0;
}

.list-cover-grid.single-img {
    grid-template-columns: 1fr;
}

.list-cover-grid.multi-img {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.list-cover-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Print Stylesheet */
@media print {
    .sidebar, .top-row, .btn, .accordion, .recipe-meta-row, .pagination, #blazor-error-ui {
        display: none !important;
    }

    body, .page, main, .content {
        background: white !important;
        color: black !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }
}
