/* ============================================
   Prashant Cooks - Modern Food Blog Styles
   Enhanced & Polished Version
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #000000;
    --secondary-color: #333333;
    --text-dark: #000000;
    --text-light: #666666;
    --bg-light: #ffffff;
    --bg-light-secondary: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --border-radius: 12px;
    --border-radius-small: 8px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Material Icons */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1;
    text-rendering: optimizeLegibility;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
    position: relative;
}

a:hover {
    color: var(--primary-color);
}

/* Consistent underline animation for all links */
a:not(.btn):not(.filter-btn):not(.category-tag):not(.social-links a):not(.back-to-top):not(.mobile-menu-toggle):not(.theme-toggle)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

a:not(.btn):not(.filter-btn):not(.category-tag):not(.social-links a):not(.back-to-top):not(.mobile-menu-toggle):not(.theme-toggle):hover::after {
    width: 100%;
}

/* Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.02);
}

.logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo:hover img {
    transform: rotate(-5deg) scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    font-size: 1rem;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Override for footer links to use white underline */
footer a::after {
    background-color: white;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    border-radius: var(--border-radius-small);
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-light-secondary);
}

.mobile-menu-toggle .material-icons {
    font-size: 1.75rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    color: white;
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero .btn {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

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

.hero .btn-primary:hover {
    background-color: white;
    color: var(--primary-color);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3);
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Search & Filters */
.search-filters {
    background: linear-gradient(to bottom, var(--bg-light), var(--bg-light-secondary));
    padding: 2.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.search-box-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.search-box {
    width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: var(--transition);
    font-family: inherit;
}

.search-box-wrapper .material-icons {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group-label {
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.filter-btn {
    padding: 0.65rem 1.5rem;
    border: 2px solid var(--border-color);
    background-color: var(--bg-light);
    color: var(--text-dark);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    font-family: inherit;
    position: relative;
    overflow: visible;
    will-change: transform;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-light-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

/* Recipe Grid */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.recipe-card {
    background-color: var(--bg-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    position: relative;
    background: linear-gradient(to bottom, var(--bg-light), var(--bg-light-secondary));
}

.recipe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.recipe-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.02));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.recipe-card:hover::before {
    transform: scaleX(1);
}

.recipe-card:hover::after {
    opacity: 1;
}

.recipe-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.recipe-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-light-secondary), var(--border-color));
}

.recipe-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.recipe-card-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.recipe-card:hover .recipe-card-image {
    transform: scale(1.1);
}

.recipe-card:hover .recipe-card-image-wrapper::after {
    opacity: 1;
}

.recipe-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.recipe-card-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-weight: 800;
    line-height: 1.3;
    transition: var(--transition);
    letter-spacing: -0.01em;
}

.recipe-card:hover .recipe-card-title {
    color: var(--primary-color);
}

.recipe-card-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.recipe-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.recipe-card:hover .recipe-card-meta span {
    color: var(--text-dark);
}

.recipe-card-meta .material-icons {
    font-size: 1.1rem;
    opacity: 0.8;
    color: var(--primary-color);
    transition: var(--transition);
}

.recipe-card:hover .recipe-card-meta .material-icons {
    opacity: 1;
    transform: scale(1.1);
}

.recipe-card-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}

.recipe-card:hover .recipe-card-description {
    color: var(--text-dark);
}

.recipe-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 2px solid var(--border-color);
    transition: var(--transition);
}

.recipe-card:hover .recipe-card-categories {
    border-top-color: var(--primary-color);
}

.category-tag {
    background: linear-gradient(135deg, var(--bg-light-secondary), var(--bg-light));
    color: var(--text-dark);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1.5px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    letter-spacing: 0.3px;
}

.category-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 25px;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-tag:hover::before {
    opacity: 1;
}

.category-tag:active {
    transform: translateY(0) scale(1);
}

/* Recipe Detail Page */
.recipe-header {
    margin-bottom: 3rem;
}

.recipe-image {
    width: 100%;
    max-width: 900px;
    height: 500px;
    object-fit: cover;
    object-position: center;
    border-radius: var(--border-radius);
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
}

.recipe-meta {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: var(--bg-light-secondary);
    border-radius: var(--border-radius);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-light);
    font-size: 1rem;
}

.meta-item .material-icons {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.meta-item strong {
    color: var(--text-dark);
    font-weight: 600;
}

.recipe-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .recipe-content {
        grid-template-columns: 1fr 1fr;
    }
}

.ingredients-section,
.steps-section {
    background: linear-gradient(to bottom, var(--bg-light), var(--bg-light-secondary));
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.ingredients-section h2,
.steps-section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.ingredients-list,
.steps-list {
    list-style: none;
}

.ingredients-list li {
    padding: 1rem 0;
    padding-left: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
    position: relative;
    transition: var(--transition-fast);
    line-height: 1.6;
}

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

.ingredients-list li:hover {
    padding-left: 3rem;
    color: var(--text-dark);
}

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

.steps-list li {
    padding: 1.25rem 0;
    padding-left: 3.5rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.6;
    transition: var(--transition-fast);
}

.steps-list li:hover {
    color: var(--text-dark);
    padding-left: 4rem;
}

.steps-list li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 0;
    top: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: var(--shadow);
}

.steps-list {
    counter-reset: step-counter;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    position: relative;
    overflow: visible;
    will-change: transform;
}

.btn .material-icons {
    font-size: 1.1rem;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light-secondary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

/* YouTube Embed */
.youtube-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 2.5rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Nutrition Info */
.nutrition-info {
    background: linear-gradient(135deg, var(--bg-light-secondary), var(--bg-light));
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 2.5rem 0;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-card);
}

.nutrition-info h3 {
    margin-bottom: 1rem;
}

.nutrition-info p {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Footer */
footer {
    background: #000000;
    padding: 1.5rem 2rem 1rem;
    margin-top: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.footer-content h3 {
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
    color: white;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.footer-content>p {
    color: white;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: visible;
    will-change: transform;
    backdrop-filter: blur(10px);
}

.social-links a::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-links a .material-icons {
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

.social-links a:hover {
    background: white;
    color: #000000;
    border-color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.social-links a:hover::before {
    opacity: 1;
}

.social-links a:active {
    transform: translateY(-2px) scale(1.05);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin: 0;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-links a {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.15rem 0;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-links a:hover::after {
    width: 100%;
}

/* Ensure all footer links use white underline */
footer a:not(.social-links a)::after {
    background-color: white !important;
}

.footer-copyright {
    margin-top: 0;
    padding-top: 0.75rem;
    border-top: none;
    color: white;
    font-size: 12px;
    line-height: 1.6;
}

.footer-copyright p {
    margin: 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
    z-index: 999;
    border: none;
    padding: 0;
    overflow: visible;
    will-change: transform;
}

.back-to-top .material-icons {
    font-size: 1.5rem;
    color: white;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.back-to-top:active {
    transform: translateY(-1px) scale(1.02);
}

.back-to-top.visible {
    display: flex;
    animation: fadeInUp 0.3s ease-out;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-light);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 1rem;
    vertical-align: middle;
}

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

.error-message {
    background: linear-gradient(135deg, #fee, #fdd);
    color: #c33;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    border-left: 4px solid #c33;
    box-shadow: var(--shadow);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state .material-icons {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Print Styles */
@media print {

    header,
    footer,
    .action-buttons,
    .back-to-top,
    .search-filters {
        display: none;
    }

    .recipe-content {
        grid-template-columns: 1fr;
    }

    body {
        background: white;
        color: black;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .hero {
        padding: 4rem 1.5rem;
    }

    .container {
        padding: 2rem 1.5rem;
    }

    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .recipe-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    nav {
        padding: 1rem;
    }

    .logo img {
        height: 35px;
    }

    .logo span {
        font-size: 1.2rem;
    }

    .search-filters {
        padding: 1.5rem;
    }

    .recipe-image {
        height: 300px;
    }

    .recipe-card-image-wrapper {
        height: 200px;
    }

    .recipe-card:hover {
        transform: translateY(-6px) scale(1.01);
    }

    .back-to-top {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    footer {
        padding: 1.25rem 1.5rem 0.75rem;
        margin-top: 2.5rem;
    }

    .footer-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.15rem;
    }

    .footer-content>p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .social-links {
        gap: 0.5rem;
        margin: 0.5rem 0;
    }

    .social-links a {
        width: 36px;
        height: 36px;
    }

    .social-links a .material-icons {
        font-size: 1.1rem;
    }

    .footer-links {
        gap: 0.9rem;
        margin: 0;
        padding: 0.6rem 0;
    }

    .footer-links a {
        font-size: 0.8rem;
        padding: 0.1rem 0;
    }

    .footer-copyright {
        margin-top: 0.5rem;
        padding-top: 0.4rem;
        font-size: 11px;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Smooth Animations */
@media (prefers-reduced-motion: no-preference) {

    .recipe-card,
    .filter-btn,
    .btn {
        animation: fadeInUp 0.6s ease-out backwards;
    }

    .recipe-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .recipe-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .recipe-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .recipe-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .recipe-card:nth-child(5) {
        animation-delay: 0.5s;
    }

    .recipe-card:nth-child(6) {
        animation-delay: 0.6s;
    }
}