:root {
    --primary-color: #EC407A;
    /* Medium Pink (Rose) */
    --primary-light: #F8BBD0;
    /* Baby Pink */
    --primary-dark: #880E4F;
    /* Deep Pink */
    --secondary-color: #3E2723;
    /* Dark Chocolate */
    --bg-color: #FFF5F7;
    /* Very Light Pink Background */
    --surface-color: #FFFFFF;
    --text-color: #3E2723;
    /* Chocolate Brown for main text too */
    --text-light: #795548;
    /* Lighter Brown */
    --header-footer-bg: #3E2723;
    /* Dark Chocolate by default */
    --header-text-color: #FFFFFF;
    --accent: #D81B60;
    --border-radius: 12px;
    --box-shadow: 0 4px 15px -3px rgba(62, 39, 35, 0.1), 0 2px 6px -2px rgba(62, 39, 35, 0.05);
    /* Chocolate tinted shadow */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --surface-color: #1E1E1E;
    --text-color: #E0E0E0;
    --text-light: #B0B0B0;
    --secondary-color: #F8BBD0;
    /* Change Chocolate text to Light Pink for contrast */
    --header-footer-bg: #1A1A1A;
    /* Darker header */
    --box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.5);
    --primary-light: #C2185B;
    /* Darker pink for buttons in dark mode to avoid glare */
    --glass-bg: rgba(30, 30, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* V4.5 Vibrant Background */
body {
    background: linear-gradient(135deg, #FFF5F7 0%, #FCE4EC 50%, #F8BBD0 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* V4.9: Glück Moments (Stories) */
.stories-container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.stories-container::-webkit-scrollbar {
    display: none;
}

.stories-wrapper {
    display: flex;
    gap: 1.2rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.story-item:hover {
    transform: scale(1.05);
}

.story-avatar-wrapper {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    position: relative;
}

.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
}

.story-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Add Story Plus Icon */
.add-story .story-avatar-wrapper {
    background: #eee;
}

.add-icon {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid white;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 98%;
    /* Use full screen width minus small margin */
    margin: 0 auto;
    padding: 0 0.5rem;
}

/* Fix Admin Stats Colors */
.admin-stats-container {
    display: flex;
    gap: 8px;
    margin-right: 15px;
    align-items: center;
}

.stat-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.users-total {
    background-color: #0288D1 !important;
}

/* Blue */
.users-active {
    background-color: #c62828 !important;
}

/* Red */

.stat-circle span {
    color: #FFFFFF !important;
}

.stat-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 1000;
}

.stat-circle:hover .stat-tooltip {
    opacity: 1;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    /* Global Chocolate Color */
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

p,
span,
.nav-links li,
.recipe-card-content,
footer div,
a {
    color: var(--text-color);
    /* Explicitly force chocolate on common elements but avoid global div */
}

/* Main Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    /* Bolder */
    color: var(--secondary-color);
    text-align: center;
    /* Default center for headings as requested */
}

/* Header */
header {
    background-color: var(--header-footer-bg);
    /* Match Footer (Dark Chocolate) */
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: background-color 0.3s ease;
}

/* Header Layout */
.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    /* Scale down for more room */
    font-family: 'Lobster', cursive;
    /* Fun, culinary style */
    color: var(--primary-color);
    text-shadow: 2px 2px 0px #fff, 4px 4px 0px rgba(62, 39, 35, 0.1);
    /* 3D Text Effect */
    transition: transform 0.3s ease;
    display: inline-block;
    margin-left: 0;
}

.logo:hover {
    transform: rotate(-3deg) scale(1.05);
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 0.15rem;
    /* Extreme compact gap */
    list-style: none;
    align-items: center;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    color: var(--secondary-color);
    /* Chocolate text as requested */
    white-space: nowrap;
    font-size: 0.7rem;
    /* Global nav link font size reduction */
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* 3D Buttons */
.btn {
    display: inline-block;
    padding: 0.15rem 0.35rem;
    /* Extreme padding reduction */
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    font-size: 0.62rem;
    /* Extreme font size reduction */
    position: relative;
    top: 0;
}

/* Hide "Close App" on Desktop (PC) as requested */
@media (min-width: 769px) {
    .btn-close-app {
        display: none !important;
    }
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    box-shadow: 0 3px 0 #F06292, 0 6px 4px rgba(62, 39, 35, 0.15);
    /* Smaller shadow for small buttons */
}

.btn-sm:active {
    top: 3px;
    box-shadow: 0 0 0 #F06292, 0 0 0 rgba(0, 0, 0, 0);
}

.btn-primary {
    background-color: var(--primary-light);
    /* Soft Pink */
    color: #3E2723;
    /* Always chocolate text on pink button */
    border: 1px solid rgba(62, 39, 35, 0.1);
    /* Subtle border definition */
    /* 3D Effect: Darker pink shadow */
    box-shadow: 0 4px 0 #F06292, 0 8px 5px rgba(62, 39, 35, 0.15);
}

.btn-primary:active {
    top: 4px;
    box-shadow: 0 0 0 #F06292, 0 0 0 rgba(0, 0, 0, 0);
}

/* Override existing hover since we use active for movement */
.btn-primary:hover {
    background-color: #FFC1E3;
    /* Even lighter pink on hover */
    color: #3E2723;
    filter: brightness(1.05);
    transform: none;
}

/* Outline Button */
.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    /* Force color */
    background: transparent;
    box-shadow: 0 4px 0 rgba(236, 64, 122, 0.3);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white !important;
}

.btn-outline:active {
    top: 4px;
    box-shadow: none;
}

/* Danger Button (Red) */
.btn-danger {
    border: 2px solid #c62828;
    color: #c62828;
    background: white;
    box-shadow: 0 4px 0 rgba(198, 40, 40, 0.3);
}

[data-theme="dark"] .btn-danger {
    background: #2c0b0e;
}

.btn-danger:hover {
    background-color: #FFEBEE;
    color: #b71c1c;
}

[data-theme="dark"] .btn-danger:hover {
    background-color: #441014;
}

.btn-danger:active {
    top: 4px;
    box-shadow: none;
}

/* Recipe Card - Consistent Alignment */
.recipe-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure it fills grid cell height */
    text-align: left;
    /* Default alignment */
    background: var(--surface-color);
}

.recipe-card:hover {
    transform: translateY(-5px);
}

.recipe-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Stretch to fill remaining space */
}

.recipe-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    /* Push to bottom */
    padding-top: 1rem;
}

/* Card Styles Enhancement for Centered Text */
.glass {
    text-align: center;
    /* Center text inside cards */
    background: var(--surface-color);
}

.glass h3 {
    text-align: center;
}

.glass p {
    margin-left: auto;
    margin-right: auto;
}

/* Form Styles Override - Keep forms readable */
form {
    text-align: left;
    /* Reset alignment for forms */
}

label {
    text-align: left;
    color: var(--text-color);
}

input,
textarea,
select {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--text-light);
    border-radius: 8px;
    padding: 10px;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    border-color: #555;
    background-color: #2a2a2a;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, #F8BBD0 0%, #FFFFFF 100%);
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    color: var(--secondary-color);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #3E2723 0%, #121212 100%);
    color: #F8BBD0;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Footer */
footer {
    background-color: var(--header-footer-bg);
    color: var(--header-text-color) !important;
    /* Force white base */
    padding: 1.5rem 0;
    margin-top: 2rem;
    transition: background-color 0.3s ease;
}

/* Force overrides for the global 'chocolate' text rule */
footer p,
footer a,
footer li,
footer span,
footer div,
footer h3,
footer h4 {
    color: rgba(255, 255, 255, 0.95) !important;
    /* Visible white text */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    text-align: center;
    /* Center everything in grid items */
}

/* Center Brand specifically if needed, though parent text-align handles most */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-brand h3 {
    color: var(--primary-light) !important;
    margin-bottom: 0.3rem;
}

.footer-brand p {
    max-width: 250px;
    /* Limit width to keep it compact */
    margin: 0 auto;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links h4 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    /* Visual guide for center */
    padding-bottom: 0.2rem;
    display: inline-block;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.15rem;
    /* Very compact */
    font-size: 0.8rem;
}

.footer-links a:hover {
    color: var(--primary-light) !important;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7) !important;
    /* Slightly dimmer for copyright */
    font-size: 0.8rem;
    margin: 0;
}

/* Hamburger Menu Styles (Default Hidden) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    display: block;
    height: 3px;
    width: 25px;
    background-color: var(--primary-color);
    margin: 3px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Response Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        position: absolute;
        top: 100%;
        /* Below header */
        left: 0;
        background-color: var(--header-footer-bg);
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out forwards;
    }

    .nav-links li {
        margin: 0.5rem 0;
        width: 100%;
        justify-content: center;
        /* Center flex items in li */
    }

    .nav-links a {
        font-size: 1.1rem;
        display: block;
        width: 80%;
        /* Wider touch target */
        margin: 0 auto;
    }

    .menu-toggle {
        display: block;
        /* Show on mobile */
        cursor: pointer;
    }

    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Mobile Buttons Adjustment (V4.2.3) */
    .btn,
    .btn-sm,
    .btn-primary,
    .btn-outline,
    .btn-danger {
        padding: 0.4rem 0.8rem !important;
        /* Force smaller padding */
        font-size: 0.8rem !important;
        /* Force smaller text */
    }

    /* Specific fix for the large WhatsApp button in show.php which has inline styles */
    a[href*="api.whatsapp.com"] {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface-color);
    border-left: 5px solid var(--primary-color);
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    animation: slideIn 0.3s ease-out forwards;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-title {
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-light);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Message Badge */
.msg-badge {
    background-color: #ff5252;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 5px;
    vertical-align: middle;
    display: none;
    /* Hidden by default */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Modal Styles (V2.3) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* Above everything */
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--surface-color);
    padding: 0;
    width: 90%;
    max-width: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.2s ease-out;
}

.modal-header {
    background-color: var(--primary-light);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="dark"] .modal-header {
    background-color: #333;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    line-height: 1;
}

.modal-body {
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    color: var(--text-color);
}

/* User List in Modal */
.user-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

[data-theme="dark"] .user-list li {
    border-color: #333;
}

.user-list li:last-child {
    border-bottom: none;
}

.user-list img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.2rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

/* --- V4.5 Social Feed & Glassmorphism --- */

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(62, 39, 35, 0.08);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feed-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 2rem 1rem;
}

.feed-card {
    overflow: hidden;
    position: relative;
    border: none;
    /* Override standard card borders */
}

.feed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(62, 39, 35, 0.15);
}

.feed-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    gap: 0.8rem;
}

.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    background-color: var(--primary-light);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary-color);
    text-decoration: none;
}

.recipe-meta {
    font-size: 0.75rem;
    color: var(--text-light);
}

.feed-image-container {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.feed-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.feed-card:hover .feed-image {
    transform: scale(1.03);
}

.feed-content {
    padding: 1.2rem 1.5rem;
}

.feed-title {
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
    text-align: left;
    color: var(--secondary-color);
}

.feed-description {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

/* WhatsApp Referral Button */
.btn-whatsapp-share {
    background-color: #25D366;
    color: white !important;
    border-radius: 50px;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp-share:hover {
    background-color: #128C7E;
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
}

.social-stats {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- V4.6 Micro-animations & Challenges --- */

.challenge-banner {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #FF80AB 0%, #EC407A 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.challenge-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.challenge-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
}

.challenge-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* Floating Hearts Particle */
.floating-heart {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    font-size: 1.5rem;
    animation: floatUpAndFade 1.2s ease-out forwards;
}

@keyframes floatUpAndFade {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(1.5);
        opacity: 0;
    }
}

/* Success Pulse */
.btn-success-pulse {
    animation: successPulse 2s infinite;
}

@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(76, 175, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.heart-pulse {
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% {
        scale: 1;
    }

    50% {
        scale: 1.3;
    }

    100% {
        scale: 1;
    }
}

/* --- V4.7 Community Pulse & Focus Mode --- */

.live-badge {
    background: rgba(76, 175, 80, 0.2) !important;
    color: #3E2723 !important;
    /* Force Chocolate Text */
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5rem auto 2rem !important;
    /* Significant top margin to avoid hero overlap */
    width: fit-content;
    border: 2px solid rgba(76, 175, 80, 0.4);
    position: relative;
    z-index: 100;
}

.live-badge span {
    color: #3E2723 !important;
    /* Force chocolate on inner text */
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    animation: successPulse 2s infinite;
}

.chef-showcase {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: nowrap;
    margin: 1.5rem auto 3.5rem;
    max-width: 400px;
    /* Force compact center */
}

.chef-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    transition: transform 0.3s ease;
    width: 80px;
    flex-shrink: 0;
}

.chef-card:hover {
    transform: scale(1.1);
}

.chef-avatar-lg {
    width: 75px !important;
    height: 75px !important;
    min-width: 75px !important;
    min-height: 75px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-light);
    display: block;
}

.chef-name-sm {
    font-size: 0.75rem;
    font-weight: 800;
    color: #3E2723 !important;
    /* Force Chocolate */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Focus Mode */
body.focus-active .hero,
body.focus-active header,
body.focus-active footer,
body.focus-active .challenge-banner,
body.focus-active .feed-actions,
body.focus-active .social-stats,
body.focus-active .admin-stats-container,
body.focus-active .live-badge,
body.focus-active .chef-showcase {
    display: none !important;
}

body.focus-active {
    background: #fff;
    padding-top: 0 !important;
}

body.focus-active .recipe-container {
    padding: 3rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

body.focus-active h1 {
    font-size: 3.2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #000;
}

body.focus-active .instruction-step {
    font-size: 1.6rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    padding: 2.5rem;
    background: #f9f9f9;
    border-radius: 20px;
    border: 1px solid #eee;
    color: #333;
}

/* --- V4.8 Cooking Timers --- */

.timer-trigger {
    background: rgba(236, 64, 122, 0.1);
    color: var(--primary-color);
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 2px dashed var(--primary-color);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.timer-trigger:hover {
    background: var(--primary-color);
    color: white;
}

.cooking-timer-widget {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 1.2rem;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(62, 39, 35, 0.2);
    z-index: 2100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 180px;
    animation: slideInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .cooking-timer-widget {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timer-display {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-color);
    font-family: monospace;
}

.timer-controls {
    display: flex;
    gap: 10px;
}

.timer-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #f44336;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- V4.8.1 Dedicated Timer Badge --- */
.timer-main-container {
    margin: 3rem 0;
    text-align: center;
    padding: 2.5rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.timer-badge-main {
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(236, 64, 122, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 15px;
    border-bottom: 4px solid rgba(0, 0, 0, 0.15);
}

.timer-badge-main:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 25px rgba(236, 64, 122, 0.4);
}

.timer-badge-main:active {
    transform: translateY(0) scale(0.98);
}

.timer-badge-mini {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    background: #FFF9C4;
    color: #FBC02D;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid #FFF176;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.timer-icon-animate {
    font-size: 1.4rem;
    animation: rotateTimer 2s infinite linear;
}

@keyframes rotateTimer {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(10deg);
    }

    75% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 35px rgba(76, 175, 80, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
    }
}

/* V4.9 Story Viewer Modal */
.story-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 3000;
    display: none;
    flex-direction: column;
    color: white;
}

.story-progress-container {
    display: flex;
    gap: 5px;
    padding: 10px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3010;
}

.progress-bar-bg {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: white;
    width: 0%;
}

.story-viewer-header {
    padding: 25px 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 3005;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.story-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar-sm {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid white;
}

.close-story {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.story-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.story-content img,
.story-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ================================================
   V5.1: Hero Recipe Carousel
   ================================================ */

.hero-carousel {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 480px;
    max-height: 680px;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    margin-bottom: -20px;
    z-index: 1;
    background: #1a1a1a;
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-end;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.05) 0%,
        rgba(0,0,0,0.15) 40%,
        rgba(0,0,0,0.75) 100%
    );
}

.carousel-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem 3rem;
    color: white;
    max-width: 650px;
    animation: slideUpIn 0.6s ease both;
}

.carousel-slide.active .carousel-content {
    animation: slideUpIn 0.6s ease both;
}

@keyframes slideUpIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.carousel-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 0.8rem;
}

.carousel-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    margin: 0 0 0.6rem;
    line-height: 1.2;
}

.carousel-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.7rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}

.carousel-author-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.7);
}

.carousel-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.carousel-cta {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(236, 64, 122, 0.4);
}

.carousel-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 64, 122, 0.5);
    color: white;
}

/* Dots */
.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

/* Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev { left: 1.2rem; }
.carousel-next { right: 1.2rem; }

/* Join CTA overlay */
.carousel-join {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-carousel {
        height: 65vh;
        min-height: 380px;
        border-radius: 0 0 24px 24px;
    }
    .carousel-content {
        padding: 1.5rem 1.2rem;
        max-width: 100%;
    }
    .carousel-title {
        font-size: 1.5rem;
    }
    .carousel-desc { display: none; }
    .carousel-arrow { display: none; }
    .carousel-join {
        top: auto;
        bottom: 5rem;
        right: 1rem;
        flex-direction: column;
        align-items: flex-end;
    }
    .carousel-join .btn {
        font-size: 0.85rem !important;
        padding: 0.6rem 1.2rem !important;
    }
}