:root {
    /* Colors */
    --bg-primary: #eeeae4;
    --bg-secondary: #f3f4f6;
    --text-primary: #1F1F1F;
    /* Primary Text */
    --text-secondary: #4B5563;
    /* Secondary Text */
    --text-heading: #111827;
    --accent: #4B5563;
    /* Accent */
    --accent-hover: #374151;
    --border-color: #e5e7eb;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-menu: 'Poppins', sans-serif;
    /* New Menu Font */
    --font-code: 'Fira Code', monospace;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* Global Ad Bar */
.global-ad-bar {
    height: 40px;
    background-color: #050505;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ad-content {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
    padding: 0 15px;
}

.ad-row-main {
    display: flex;
    align-items: center;
    min-width: 0;
}

.ad-title-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.ad-heading {
    font-weight: 700;
    color: #fff;
}

.ad-separator {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}

.ad-text {
    font-weight: 400;
    color: #00E5FF;
}


.ad-row-secondary {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}

.ad-label {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.65rem;
    color: #aaa;
}

.ad-sub-link {
    color: #999;
}

.ad-sub-link:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .global-ad-bar {
        height: auto;
        padding: 6px 0;
    }

    .ad-content {
        flex-direction: column;
        gap: 2px !important;
        width: 100%;
        padding: 0 10px;
        flex-wrap: wrap !important;
    }

    .ad-row-main {
        width: 100%;
        justify-content: center;
        text-align: center;
        display: block;
    }

    .ad-title-link {
        white-space: normal;
        display: block;
    }

    .ad-heading {
        font-size: 0.85rem;
        display: inline;
    }

    .ad-text {
        font-size: 0.85rem;
        display: inline;
    }

    .ad-row-secondary {
        width: 100%;
        justify-content: center;
        display: flex !important;
        align-items: center;
        gap: 10px;
        opacity: 0.8;
    }

    .ad-separator {
        margin: 0 3px;
    }

    .ad-label {
        font-size: 0.6rem;
    }
}





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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Utilities */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
    opacity: 0;
}

.fade-in-delay-1 {
    animation: fadeIn 0.8s ease 0.2s forwards;
    opacity: 0;
}

.fade-in-delay-2 {
    animation: fadeIn 0.8s ease 0.4s forwards;
    opacity: 0;
}

.fade-in-delay-3 {
    animation: fadeIn 0.8s ease 0.6s forwards;
    opacity: 0;
}

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

    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    /* Standard fixed at top */
    padding: 1.5rem;
    background-color: #EEEAE4;
    /* Warm Greige */
    width: 100%;
    z-index: 1000;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
    display: flex;
    justify-content: center;
    /* Center container */
    height: 80px;
    /* Fixed height for stability */
    transition: all 0.3s ease;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Vertically center */
    position: relative;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: #1F1F1F;
    /* Logo Text Color */
    letter-spacing: -0.5px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.logo-sub-lower {
    font-size: 0.6rem;
    color: #7A7A7A;
    /* Lighter Subtitle */
    font-family: var(--font-body);
    margin-top: 4px;
    margin-left: 2px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.5px;
    /* Slightly increased spacing */
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Mobile Menu Button - Left Side Logic */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    background: none;
    border: none;
    cursor: pointer;
    /* Ensure it moves with JS logic but originally might need position relative/absolute if not in flow */
    /* If it's in nav-content (flex), it moves with navbar automatically. */
}

/* Global Utilities */
.hover-underline {
    text-decoration: none;
    position: relative;
}

.hover-underline:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mobile-menu-btn.left {
    display: none;
}


/* Mobile Polish Styles */
@media (max-width: 768px) {

    /* Navbar Adjustment */
    .navbar {
        height: auto;
        min-height: 50px;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .nav-content {
        gap: 0;
        padding-left: 10px !important;
        padding-right: 30px !important;
        /* Increased to 30px as requested */
        justify-content: space-between;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Minimal Logo Fix */
    .logo {
        font-size: 1.2rem;
        /* Restore slightly */
        margin-left: 35px;
        /* Added space for hamburger menu */
        /* Ensure space from hamburger */
        line-height: 1;
        /* Tighten line height */
        align-items: flex-start;
    }

    .logo-sub-lower {
        font-size: 0.4rem;
        margin-top: 2px;
        display: block;
        white-space: nowrap;
        margin-left: 0;
    }

    /* Hero Minimal */
    .hero {
        padding: 0 !important;
        margin-top: -5px !important;
        /* Less negative */
        padding-top: 15px !important;
        /* More breathing room */
        padding-bottom: 15px !important;
    }

    .hero-title {
        font-size: 1.85rem !important;
        /* Significantly larger */
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }

    .hero-desc {
        font-size: 1.1rem !important;
        /* Significantly larger */
        padding: 0;
        /* Remove side padding, use max-width */
        line-height: 1.5;
        max-width: 260px;
        /* Squeeze text to approx 3 lines */
        margin-left: auto;
        margin-right: auto;
    }

    /* Sidebar Single Screen Fit */
    /* Sidebar Single Screen Fit - Redundant block removed/merged below */

    .sidebar-link {
        padding: 5px 12px;
        font-size: 0.8rem;
        min-height: 35px;
    }

    .sidebar-nav {
        gap: 2px;
        overflow-y: auto;
        /* Ensure dynamic fit */
        height: auto;
        max-height: calc(100vh - 150px);
        /* Safety buffer for address bar etc */
        padding-bottom: 20px;
    }

    /* General Page Spacing */
    .main-container,
    .container {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    /* Pages specific gap fix */
    .settings-container,
    .auth-container,
    .main-content,
    .privacy-container,
    .terms-container,
    .contact-container {
        margin-top: 0 !important;
        padding-top: 20px !important;
    }

    .ad-row-secondary .ad-separator {
        margin: 0 3px;
    }

    /* Sidebar Fix for Cut-off */
    .sidebar {
        top: 80px;
        /* Increased to sit below navbar */
        /* Use dvh for dynamic viewport handling on mobile browsers */
        height: calc(100dvh - 80px);
        width: 70%;
        max-width: 260px;
        z-index: 999;
        /* Below navbar (1000) */
        background: var(--bg-primary);

        /* Flexbox for pinned footer */
        display: flex;
        flex-direction: column;
        padding: 0;
        padding-bottom: 5px;
        /* Small bottom buffer */
    }

    .sidebar-nav {
        flex: 1;
        /* Takes remaining space */
        overflow-y: auto;
        /* Nav scrolls if needed */
        min-height: 0;
        padding: 5px 0;
        gap: 0;
    }

    .sidebar-link {
        padding: 8px 12px !important;
        /* Comfortable touch target */
        font-size: 0.85rem !important;
        /* Slightly increased size */
        min-height: 38px;
        display: flex;
        align-items: center;
    }

    .user-profile-section {
        padding: 10px;
        /* Reduced size */
        margin-top: auto;
        /* Pinned to bottom */
        flex-shrink: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        /* Slight separation */
    }

    /* Navbar Toggle Alignment Fix */
    /* Navbar Toggle Alignment Fix - CORRECTED SELECTOR */
    /* Navbar Toggle Alignment Fix */
    /* Navbar Toggle Alignment Fix */
    /* DISPLAY GLOBALLY on mobile */
    .menu-toggle-btn {
        display: block !important;
        position: fixed;
        /* Fixed to viewport */
        left: 10px;
        /* Consistent left alignment */
        top: 15px;
        /* Consistent top alignment, JS will override if Ad Bar exists */
        z-index: 1200;
        /* Higher than sidebar (1100/999) */
        padding: 5px;
        background: transparent !important;
        border: none !important;
        color: var(--text-primary);
        font-size: 1.5rem;
    }

    /* Reduce specific button sizes on mobile if they exist in navbar */
    .navbar .logout-btn-red,
    .navbar .btn-primary,
    .navbar .btn-signup {
        padding: 4px 10px;
        /* Smaller */
        font-size: 0.75rem;
    }
}

/* Auth Links */
/* Auth Links & Buttons */
.auth-links-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #CCC;
}

.btn-signup,
.btn-primary {
    background-color: #2C2C2C;
    /* Charcoal */
    color: white !important;
    padding: 8px 20px;
    border-radius: 4px;
    transition: var(--transition);
    font-weight: 500;
    border: none;
}

.btn-signup:hover,
.btn-primary:hover {
    background-color: black;
    transform: translateY(-1px);
}

/* Search Container */
.search-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    position: relative;
    z-index: 100;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    border-bottom: 1px solid var(--text-secondary);
    transition: var(--transition);
}

.search-wrapper:focus-within {
    border-bottom-color: var(--text-primary);
}

.search-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 10px 10px 10px 30px;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
}

.search-input::placeholder {
    color: #666;
}

/* Footer UI */
.footer {
    background-color: #E6E2DC;
    /* Slightly darker than ivory */
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: #1F1F1F;
}

.footer-sub {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    margin-left: 5px;
    color: #7A7A7A;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: #7A7A7A;
}

.footer-links a:hover {
    color: #1F1F1F;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #999;
}

/* Modal Polish */
.modal-content {
    border-radius: 8px;
    overflow: hidden;
    max-width: 900px;
    width: 90%;
    /* display: flex;  -- handled in cards.css/media query usually, sticking to minimal changes */
}

.prompt-box {
    background-color: #fcfcfc;
    padding: 1.25rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    /* Only bottom margin to prevent floating feel */
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
    max-height: 250px;
    overflow-y: auto;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.prompt-text {
    white-space: pre-wrap;
    /* Ensure text wraps */
    word-break: break-word;
}


.copy-btn {
    width: 100%;
    background-color: #2C2C2C;
    color: white;
    padding: 12px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.copy-btn:hover {
    background-color: black;
}

.modal-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.meta-stats {
    display: flex;
    gap: 1.5rem;
}

/* Mobile Menu Fix */
.mobile-menu-btn {
    color: var(--text-primary) !important;
    /* Ensure visible */
}

/* Fix dropdown hover only */
/* Category Dropdown */
.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-primary);
    min-width: 180px;
    box-shadow: var(--shadow-md);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    z-index: 100;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.dropdown-content a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background-color: var(--accent);
    color: white;
}

/* Auth Links */
.user-greeting {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sleek Red Logout Button */
.logout-btn-red {
    background-color: transparent;
    border: 1px solid #d32f2f;
    color: #d32f2f;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn-red:hover {
    background-color: #d32f2f;
    color: white;
}

/* Mobile Logout */
.btn-mobile-logout {
    display: block;
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    background-color: #d32f2f;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    border-radius: 4px;
}

/* Hero Section */
.hero {
    padding: 100px 0 60px;
    text-align: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-heading);
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 0.5rem;
}

/* Card Styles */
/* ... existing card styles ... */

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: auto;
    /* Push content down */
    width: 100%;
}

.card-type-badge {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
}

/* Ensure actions align right if needed, but flex-between handles it */


.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-heading);
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.divider {
    width: 1px;
    height: 40px;
    background-color: var(--border-color);
}

/* Loaders */
.grid-loader,
.loading-more {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
    width: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
}

.spinner.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

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

.loading-more {
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Navbar Links */
.nav-item {
    font-family: var(--font-menu);
    font-weight: 500;
    font-size: 1rem;
    color: #4B4B4B;
    /* Link Color */
    position: relative;
    padding: 5px 0;
}

.nav-item:hover,
.nav-item.active {
    color: #8B6F4E;
    /* Hover/Active Color */
}

/* User Greeting */
.user-greeting {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1F1F1F;
    /* Dark text */
}

/* Signup Button in Navbar */
.btn-signup {
    background-color: #1F1F1F;
    color: white !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-signup:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* Navbar Adjustment (will be handled by JS dynamically, but default here) */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #EEEAE4;
    /* Requested Warm Greige */
    z-index: 1000;
    border-bottom: 1px solid #D8D3CC;
    /* Subtle divider */
    padding: 0.8rem 0;
    transition: var(--transition);
    transition: top 0.3s ease;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
    visibility: hidden;
}

.toast.show {
    bottom: 30px;
    opacity: 1;
    visibility: visible;
}

/* Logout Button (Red) */
.logout-btn-red {
    background-color: transparent;
    border: 1px solid #d32f2f;
    color: #d32f2f;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn-red:hover {
    background-color: #d32f2f;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide navbar items on mobile */
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Shift logo to give space for hamburger */
    .logo {
        margin-left: 50px;
    }

    .menu-toggle-btn {
        position: fixed;
        top: 60px;
        /* Adjusted to be below 40px ad bar, centered in 72px navbar */
        left: 15px;
        z-index: 2002;
    }

    .hero {
        padding: 130px 0 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-desc {
        font-size: 1.1rem;
    }
}

/* Sidebar Styles (Main Site) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: #EEEAE4;
    z-index: 2001;
    /* Above navbar */
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #E6E2DC;
    border-bottom: 1px solid var(--border-color);
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Push footer to bottom */
    padding: 1rem 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding-top: 15px;
    /* Reduced padding - sidebar already positions below navbar */
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-link .sidebar-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    margin-right: 0;
    /* Handled by flex gap */
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border-left: 3px solid var(--accent);
}

.sidebar-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 15px 20px;
}

.sidebar-footer {
    padding: 0;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.user-profile-section {
    background-color: #2A2A2A;
    /* Lighter black as requested */
    padding: 1.5rem;
    color: white;
}

/* User Profile in Sidebar */
.user-profile-display {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    color: white;
    /* Ensure text is white */
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.user-info {
    flex: 1;
}

.user-profile-section .user-name {
    color: white !important;
}

.user-profile-section .user-role {
    color: rgba(255, 255, 255, 0.7) !important;
}

.user-profile-section .logout-icon {
    color: #ff4444;
    /* Keep logout red but visible */
}

/* Ensure images show */
.prompt-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.guest-view {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.btn-sidebar-auth {
    text-align: center;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.btn-sidebar-auth:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-sidebar-auth.primary {
    background-color: #1F1F1F;
    color: white;
    border: none;
}

.btn-sidebar-auth.primary:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* Toggle Btn (Hamburger) */
.menu-toggle-btn {
    position: fixed;
    top: 18px;
    /* Align with Logo */
    left: 20px;
    z-index: 2002;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-primary);
    cursor: pointer;
    background-color: rgba(238, 234, 228, 0.8);
    /* Semi-transparent background */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.menu-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Navbar Adjustments */
.navbar {
    padding-left: 60px;
    /* Make space for hamburger */
}

/* Favorites Heart */
/* Favorites Heart - Pill Shape */
.heart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    width: auto;
    /* Auto width for pill */
    height: 32px;
    border-radius: 20px;
    /* Pill shape */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    /* Horizontal padding */
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.heart-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
}

.heart-btn.active {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.heart-btn.active i {
    color: #ef4444;
}

.heart-btn i {
    font-size: 0.9rem;
}

.like-count {
    font-size: 0.85rem;
    font-weight: 600;
    padding-left: 2px;
}

/* Navbar Text Size Match */
.nav-item {
    font-size: 1rem;
    /* Consistent size */
}

/* Admin Table Alignment Fix */
.admin-table th,
.admin-table td {
    vertical-align: middle;
    text-align: left;
    padding: 1rem;
}

/* Ensure mobile menu legacy styles don't conflict */
@media (max-width: 768px) {
    .navbar {
        padding-left: 0;
        /* On mobile, maybe center logo? User said "left side menu... at left side". 
           We can keep hamburger fixed top-left. */
        justify-content: center;
    }

    .menu-toggle-btn {
        top: 15px;
        left: 15px;
    }

    .nav-links {
        display: none;
    }

    /* Hide top links on mobile */
}

/* Hero margin adjustment - removed extra margin since body has dynamic padding from JS */
.hero {
    margin-top: 0;
}

/* Mobile Menu Overlay */
/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    /* Sleek width as planned */
    height: 100vh;
    background-color: var(--bg-primary);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 0;
    /* Reset padding, will enforce in children */
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.close-mobile-menu {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.mobile-links a {
    display: block;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .footer-content {
        text-align: center;
    }
}

/* ================================
   SEARCH RECOMMENDATIONS DROPDOWN
   ================================ */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-bottom: 1px solid var(--text-secondary);
    transition: var(--transition);
}

.search-wrapper:focus-within {
    border-bottom-color: var(--text-primary);
}

.search-recommendations {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.search-recommendations.active {
    display: block;
    animation: fadeUp 0.15s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

.recommendations-loading {
    display: none;
    justify-content: center;
    padding: 1.5rem;
}

.recommendations-loading.active {
    display: flex;
}

.recommendations-content {
    padding: 4px 0;
}

.recommendation-group {
    padding: 0;
}

.recommendation-group:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.recommendation-group-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 8px 12px 4px;
    margin: 0;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.recommendation-item:hover,
.recommendation-item.selected {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Minimal recommendation - no icons */
.recommendation-text {
    flex: 1;
    min-width: 0;
}

.recommendation-title {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommendation-title .highlight {
    font-weight: 600;
    color: var(--text-primary);
    background: none;
}

.recommendation-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.recommendation-thumb {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

/* User Avatar Fix */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--text-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    /* Prevent squashing in flex container */
}

.no-recommendations {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Hide icon containers */
.recommendation-icon {
    display: none;
}

/* ================================
   FILTER BAR - iOS STYLE
   ================================ */
.filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    padding: 0 1rem;
    position: relative;
    z-index: 50;
}

/* iOS-style Segmented Control */
.filter-segmented {
    display: flex;
    position: relative;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 3px;
}

.segmented-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.segment {
    position: relative;
    z-index: 1;
    padding: 8px 20px;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.segment.active {
    color: var(--text-primary);
}

.segment:hover:not(.active) {
    color: var(--text-primary);
}

/* Mobile Type Dropdown - Hidden on Desktop */
.mobile-type-dropdown {
    display: none;
}

/* Filter Dropdowns - Outline Style */
.filter-dropdown {
    position: relative;
}

.filter-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #2C2C2C;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: #2C2C2C;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-dropdown-btn:hover {
    background: rgba(44, 44, 44, 0.05);
    border-color: #000;
}

.filter-dropdown-btn svg {
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.filter-dropdown.active .filter-dropdown-btn svg {
    transform: rotate(180deg);
}

.filter-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 140px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 10000;
    overflow: hidden;
}

.filter-dropdown.active .filter-dropdown-content {
    display: block;
    animation: dropDown 0.15s ease-out;
}

/* Hover dropdown on desktop */
@media (hover: hover) and (pointer: fine) {
    .filter-dropdown:hover .filter-dropdown-content {
        display: block;
        animation: dropDown 0.15s ease-out;
    }

    .filter-dropdown:hover .filter-dropdown-btn svg {
        transform: rotate(180deg);
    }
}

@keyframes dropDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.filter-dropdown-content a {
    display: block;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: background 0.15s ease;
}

.filter-dropdown-content a:hover {
    background: rgba(0, 0, 0, 0.04);
}

.filter-dropdown-content a.active {
    background: var(--text-primary);
    color: white;
}

/* ================================
   ENHANCED NO RESULTS
   ================================ */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 400px;
    margin: 2rem auto;
}

.no-results-icon {
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.no-results-icon i {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.no-results h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-results>p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.no-results-suggestions {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.no-results-suggestions p {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.no-results-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.no-results-suggestions li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.no-results-suggestions li::before {
    content: "•";
    color: var(--text-secondary);
    margin-right: 8px;
}

.no-results-suggestions a {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: underline;
}

.no-results-suggestions a:hover {
    color: var(--accent);
}

.btn-clear-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-search:hover {
    background: #333;
    transform: translateY(-1px);
}

/* ================================
   MOBILE RESPONSIVE
   ================================ */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    /* Hide segmented control on mobile */
    .filter-segmented {
        display: none;
    }

    /* Show mobile type dropdown */
    .mobile-type-dropdown {
        display: block;
    }

    .filter-dropdown-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .filter-dropdown-content {
        left: 0;
        right: auto;
        transform: none;
        min-width: 120px;
    }

    .search-recommendations {
        left: -10px;
        right: -10px;
        width: calc(100% + 20px);
    }
}

/* ================================
   FAVORITES EMPTY STATE
   ================================ */
.favorites-empty-state {
    column-span: all;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    text-align: center;
    padding: 2rem;
}

.favorites-empty-state h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 1.25rem 0;
}

.browse-prompts-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #2C2C2C;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.browse-prompts-btn:hover {
    background: #3D3D3D;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    /* Changed to white */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: none;
    /* Hidden by default, shown via JS */
}

.cookie-banner.visible {
    transform: translateY(0);
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.cookie-text p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 700px;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-btn.accept {
    background-color: #1a1a1a;
    color: white;
    border: 1px solid #1a1a1a;
}

.cookie-btn.accept:hover {
    background-color: #333;
    border-color: #333;
    transform: translateY(-1px);
}

.cookie-btn.decline {
    background-color: transparent;
    color: #1a1a1a;
    border: 1px solid #2C2C2C;
}

.cookie-btn.decline:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .cookie-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
        text-align: center;
    }
}

/* Logout Confirmation Modal */
.logout-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logout-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.logout-modal {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.logout-modal-backdrop.active .logout-modal {
    transform: scale(1);
}

.logout-title {
    font-family: var(--font-body);
    /* Changed to Inter sans-serif */
    font-size: 1.25rem;
    font-weight: 600;
    /* Added weight for heading feel */
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.logout-subtext {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.logout-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.logout-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.logout-btn.confirm {
    background: #1a1a1a;
    color: white;
    border: 1px solid #1a1a1a;
}

.logout-btn.confirm:hover {
    background: #333;
    transform: translateY(-1px);
}

.logout-btn.cancel {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #ddd;
}

.logout-btn.cancel:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* Mobile Navbar Sign Up Button */
@media (max-width: 768px) {
    .nav-links {
        display: flex !important;
    }

    .auth-links-container {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
    }

    /* Hide specific non-mobile elements */
    .user-greeting,
    .nav-item[href="/admin"] {
        display: none !important;
    }

    .nav-content {
        justify-content: space-between;
    }

    /* Ensure Signup Button is visible and styled compact */
    .btn-signup {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}

/* Sticky Footer Fix Global */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Sticky Footer & Mobile View Fix */
html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100vw;
}

main,
.main-content,
.my-prompts-container,
.submit-container,
.json-info-container,
.settings-container {
    flex: 1 0 auto;
    width: 100%;
}

.footer {
    flex-shrink: 0;
    margin-top: auto;
    width: 100%;
}

/* Standardized Container Padding (Global) */
.settings-container,
.auth-container,
.main-content,
.privacy-container,
.terms-container,
.contact-container,
.admin-main,
.my-prompts-container,
.submit-container,
.json-info-container,
.advertise-layout {
    padding-top: 40px;
}