:root {
    --bg-color: #1a1a1a;
    --sidebar-red: #b90b2a;
    --hover-red: #8a081e;
    --text-white: #fff;
    --text-hover: #ccc;
    --caption-grey: #999;
    --shadow-red: rgba(185, 11, 42, 0.5);
}

html {
    scroll-behavior: smooth;
}

a,
button,
img,
video {
    transition: all 0.1s ease-in-out;
}

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: Oswald, sans-serif;
    line-height: 1.6;
    position: relative;
    text-align: center;
}

.container,
body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 0;
}

.container {
    box-sizing: border-box;
    display: flex;
    width: 100%;
}

@media (min-width: 481px) {
    @keyframes neonPulse {
        0% {
            box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(82, 153, 82, 0.3);
        }
        50% {
            box-shadow: 2px 0 15px rgba(0, 0, 0, 0.7), 0 0 25px rgba(185, 11, 42, 0.5);
        }
        to {
            box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(82, 153, 82, 0.3);
        }
    }
    .mobile .mobile-only {
        display: none;
    }
    body .sticky-header p {
        display: block;
    }
    body .sticky-header:has(#latest-btn[aria-label*="Bobo collections"]) p,
    body .sticky-header:has(#latest-btn[aria-label*="Bobo videos"]) p {
        display: none;
    }
    body .sticky-header:has(#latest-btn[aria-label*="Bobo collections"]) .button-group,
    body .sticky-header:has(#latest-btn[aria-label*="Bobo videos"]) .button-group {
        padding-top: 25px;
    }
    body #search-container {
        display: none;
        width: 100%;
    }
    body #search-container:not(.hidden) {
        display: flex;
    }
    .search-line {
        display: none !important;
    }
    .sticky-header {
        background-color: var(--bg-color);
        box-shadow: none;
        flex-direction: column;
        padding: 0;
        position: static;
        width: 100%;
        z-index: 1000;
    }
    .button-group,
    .sticky-header {
        align-items: center;
        display: flex;
        margin: 0;
        min-width: 600px;
    }
    .button-group {
        gap: 15px;
        justify-content: center;
    }
    body:has(#latest-btn[aria-label*="Bobo collections"]) .sticky-header #collection-filter {
        display: flex;
        margin: 10px auto;
        width: auto;
    }
    body:has(#latest-btn[aria-label*="Bobo collections"]) .button-group {
        min-width: 400px;
    }
    body:has(#latest-btn[aria-label*="Bobo collections"]) .button-group .red-button {
        box-sizing: border-box;
        font-size: 1.2em;
        justify-content: center;
        padding: 12px 24px;
        text-align: center;
        width: 150px;
    }
    #gallery {
        contain-intrinsic-size: 180px 180px;
        content-visibility: auto;
        display: grid;
        gap: 15px;
        grid-template-columns: repeat(5, 1fr);
        justify-items: center;
        margin-top: 20px;
        padding: 20px;
    }
    #gallery img,
    #gallery video {
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        height: 180px;
        max-width: 180px;
        object-fit: cover;
        object-position: center;
        position: relative;
        transform: translateZ(0);
        transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, opacity 0.3s ease-in-out;
        width: 180px;
        will-change: transform, opacity;
        z-index: 3;
    }
    @media (min-width: 2560px) and (max-aspect-ratio: 7/3) {
        #gallery {
            contain-intrinsic-size: 250px 250px;
            grid-template-columns: repeat(7, 1fr);
        }
        #gallery img,
        #gallery video {
            height: 250px;
            max-width: 250px;
            width: 250px;
        }
    }
    @media (min-width: 3840px) and (max-aspect-ratio: 32/9) {
        #gallery {
            contain-intrinsic-size: 250px 250px;
            grid-template-columns: repeat(9, 1fr);
        }
        #gallery img,
        #gallery video {
            height: 250px;
            max-width: 250px;
            width: 250px;
        }
    }
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-white);
    cursor: pointer;
    display: none;
    font-size: 1.5em;
    left: 10px;
    padding: 10px;
    position: absolute;
    top: 10px;
    transition: outline 0.3s ease-in-out;
}

.menu-toggle:focus {
    outline: 2px solid var(--text-white);
    outline-offset: 2px;
}

main {
    flex: 1;
    margin-left: 220px;
    padding: 20px;
}

.header-content {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
    padding: 0;
    width: 100%;
}

main h1 {
    font-size: 2.5em;
    letter-spacing: 1px;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

main p {
    font-size: 1.1em;
    letter-spacing: 0.5px;
    line-height: 1.8;
    margin: 0;
    transition: text-shadow 0.3s ease-in-out;
}

main a {
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s ease-in-out, text-shadow 0.3s ease-in-out;
}

main a:focus,
main a:hover {
    color: var(--text-hover);
    text-decoration: underline;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#gallery img:focus,
#gallery .media-item:hover img,
#gallery .media-item:focus-within img,
#gallery video:focus,
#gallery .media-item:hover video,
#gallery .media-item:focus-within video {
    box-shadow: 0 6px 12px var(--shadow-red);
    opacity: 0.9;
    outline: none;
    transform: scale(1.05);
}

#gallery video {
    display: none;
}

#gallery.crashing .media-item {
    animation: marketCrash 0.3s ease-out forwards;
}

#gallery.crashing .media-item,
.fade-in {
    transform: translateZ(0);
    will-change: transform, opacity;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.loading-spinner {
    animation: spin 1s linear infinite;
    border-top: 3px solid var(--caption-grey);
    border: 3px solid var(--caption-grey);
    border-radius: 50%;
    border-top-color: var(--sidebar-red);
    display: inline-block;
    height: 20px;
    vertical-align: middle;
    width: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(1turn);
    }
}

#dump-collections-btn,
#dump-it,
#dump-pics-btn,
#dump-videos-btn,
#latest-btn,
#random-meme-btn,
#search-btn {
    background-color: var(--sidebar-red);
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: var(--text-white);
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2em;
    margin: 0;
    overflow: hidden;
    padding: 12px 24px;
    position: relative;
    transform: translateZ(0);
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    will-change: transform, box-shadow;
}

#dump-collections-btn img,
#dump-it img,
#dump-pics-btn img,
#dump-videos-btn img,
#latest-btn img,
#random-meme-btn img,
#search-btn img {
    margin-left: 10px;
    transition: transform 0.2s ease-in-out;
    vertical-align: middle;
    width: 45px;
}

#dump-collections-btn:focus img,
#dump-collections-btn:hover img,
#dump-it:focus img,
#dump-it:hover img,
#dump-pics-btn:focus img,
#dump-pics-btn:hover img,
#dump-videos-btn:focus img,
#dump-videos-btn:hover img,
#latest-btn:focus img,
#latest-btn:hover img,
#random-meme-btn:focus img,
#random-meme-btn:hover img,
#search-btn:focus img,
#search-btn:hover img {
    transform: scale(1.1);
}

.pulse {
    animation: pulse 0.1s ease-in-out;
    transform: translateZ(0);
    will-change: transform;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    to {
        transform: scale(1);
    }
}

.media-item {
    margin-bottom: 20px;
    padding: 10px;
    position: relative;
    text-align: center;
}

.media-caption {
    color: var(--caption-grey);
    font-size: 0.9em;
    margin-top: 5px;
    text-align: center;
    word-wrap: break-word;
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin-left: auto;
    margin-right: auto;
    max-width: 180px;
    padding: 5px;
}

.download-btn {
    background-color: var(--sidebar-red);
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: var(--text-white);
    cursor: pointer;
    font-family: Oswald, sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    margin-top: 10px;
    padding: 10px 18px;
    transform: translateZ(0);
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    will-change: transform, box-shadow, background-color;
}

.download-btn:focus,
.download-btn:hover {
    background-color: var(--hover-red);
    box-shadow: 0 4px 8px var(--shadow-red);
    outline: 2px solid var(--text-white);
    outline-offset: 2px;
}

.button-container {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    max-width: 512px;
    width: 100%;
}

.meme-viewer-content {
    justify-content: center;
    margin: 0 auto;
    max-width: 1200px;
    min-height: calc(100vh - 120px);
    padding: 20px;
    text-align: center;
}

.meme-viewer,
.meme-viewer-content {
    align-items: center;
    display: flex;
    flex-direction: column;
}

.meme-viewer {
    max-width: 800px;
    overflow: visible;
    width: 100%;
}

.meme-viewer img,
.meme-viewer video {
    border: 2px solid var(--sidebar-red);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: block;
    margin: 20px auto;
    max-height: 100%;
    max-width: 100%;
    transform: translateZ(0);
    transition: transform 0.05s ease-in-out, box-shadow 0.1s ease-in-out;
    will-change: transform, box-shadow;
}

.meme-viewer img:hover,
.meme-viewer video:hover {
    box-shadow: 0 6px 12px var(--shadow-red);
    transform: scale(1.02);
}

.meme-viewer .media-caption {
    color: var(--caption-grey);
    font-size: 0.85em;
    letter-spacing: 0.5px;
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin-top: 10px;
    padding: 8px;
}

.button-group {
    align-items: center;
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 0;
}

#search-btn {
    background-color: var(--sidebar-red);
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: var(--text-white);
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2em;
    margin: 0;
    overflow: hidden;
    padding: 12px 24px;
    position: relative;
    transform: translateZ(0);
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    will-change: transform, box-shadow, background-color;
}

#search-btn:focus,
#search-btn:hover {
    background-color: var(--hover-red);
    box-shadow: 0 6px 12px var(--shadow-red);
    outline: 2px solid var(--text-white);
    outline-offset: 2px;
}

#search-btn img {
    margin-left: 10px;
    transition: transform 0.3s ease-in-out;
    vertical-align: middle;
    width: 45px;
}

#search-btn:focus img,
#search-btn:hover img {
    transform: scale(1.1);
}

.search-btn-active {
    box-shadow: 0 6px 12px var(--shadow-red);
    transform: scale(1.05);
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

#search-container {
    align-items: center;
    display: flex;
    gap: 8px;
    height: auto;
    justify-content: center;
    margin: 20px auto;
    max-width: 600px;
    padding: 0;
    position: static;
    text-align: center;
    width: 100%;
    z-index: 1001;
}

#search-input {
    background-color: var(--text-white);
    border: 2px solid var(--sidebar-red);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: var(--bg-color);
    font-family: Oswald, sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    margin: 0 5px;
    max-width: 100%;
    padding: 10px 30px 10px 15px;
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    width: 300px;
}

#search-input:focus {
    border-color: var(--hover-red);
    box-shadow: 0 4px 8px var(--shadow-red);
    outline: none;
}

#search-input::placeholder {
    color: var(--caption-grey);
    opacity: 0.8;
}

#tags-btn {
    background-color: var(--text-white);
    border: 2px solid var(--sidebar-red);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: var(--bg-color);
    cursor: pointer;
    display: none;
    font-family: Oswald, sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    margin: 0;
    padding: 10px;
    transform: translateZ(0);
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    width: 80px;
    will-change: transform, box-shadow, border-color;
}

#tags-btn:focus,
#tags-btn:hover {
    border-color: var(--hover-red);
    box-shadow: 0 4px 8px var(--shadow-red);
    outline: none;
}

#tags-menu {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 2px solid var(--sidebar-red);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    display: none;
    left: 0;
    padding: 15px;
    position: absolute;
    top: 100%;
    width: 480px;
    z-index: 1002;
}

.tags-columns {
    display: flex;
    gap: 6px;
    justify-content: space-between;
}

.tags-column {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tags-column li {
    margin: 5px 0;
}

.tags-column .tag-option {
    background: none;
    border: none;
    color: var(--text-white);
    cursor: pointer;
    font-family: Oswald, sans-serif;
    font-size: 0.85em;
    padding: 8px;
    text-align: left;
    transform: translateZ(0);
    transition: background-color 0.3s ease-in-out;
    width: 100%;
    will-change: background-color;
}

.tags-column .tag-option:focus,
.tags-column .tag-option:hover {
    background-color: var(--hover-red);
    outline: none;
}

#tags-menu .close-tags-btn {
    background: none;
    border: none;
    color: var(--sidebar-red);
    cursor: pointer;
    font-size: 1.2em;
    height: 20px;
    line-height: 20px;
    padding: 0;
    position: absolute;
    right: 5px;
    text-align: center;
    top: 5px;
    width: 20px;
}

#tags-menu .close-tags-btn:hover {
    color: var(--hover-red);
}

.search-line {
    background-color: var(--sidebar-red);
    box-shadow: 0 0 8px rgba(82, 153, 82, 0.3);
    height: 6px;
    margin: 10px auto;
    max-width: 400px;
    width: 100%;
}

.search-active {
    animation: searchPop 0.3s ease-out;
    transform: translateZ(0);
    will-change: transform, opacity;
}

@keyframes searchPop {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.search-input-container {
    max-width: 450px;
    position: relative;
    width: 100%;
    width: 450px;
}

.clear-search-btn {
    background: none;
    border: none;
    color: var(--sidebar-red);
    cursor: pointer;
    display: none;
    font-size: 1.2em;
    height: 20px;
    line-height: 20px;
    margin: 0 5px;
    padding: 0;
    position: absolute;
    right: 10px;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
}

.clear-search-btn:hover {
    color: var(--hover-red);
}

.back-to-top-btn {
    background-color: var(--sidebar-red);
    border: none;
    border-radius: 8px;
    bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: var(--text-white);
    cursor: pointer;
    font-family: Impact, sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    position: fixed;
    right: 20px;
    transform: translateZ(0);
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    will-change: transform, box-shadow, background-color;
    z-index: 1000;
}

.back-to-top-btn:focus,
.back-to-top-btn:hover {
    background-color: var(--hover-red);
    box-shadow: 0 4px 8px var(--shadow-red);
    outline: none;
}

.back-to-top-btn.hidden,
.menu-btn {
    display: none;
}

.menu-btn {
    background-color: var(--sidebar-red);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: var(--text-white);
    cursor: pointer;
    font-family: Impact, sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    position: static;
    transform: translateZ(0);
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    will-change: transform, box-shadow, background-color;
    z-index: 1001;
}

.menu-btn:focus,
.menu-btn:hover {
    background-color: var(--hover-red);
    box-shadow: 0 4px 8px var(--shadow-red);
    outline: none;
}

#submitBtn {
    width: 100%;
    padding: 14px;
    background-color: #dc2626; /* Red */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#submitBtn:hover {
    background-color: #b91c1c; /* Darker red on hover */
}

#submitBtn:active {
    background-color: #991b1b;
}

.form-image svg rect {
    stroke: #dc2626;
    fill: none;
}

.latest-btn-mobile,
.random-meme-btn-mobile {
    background-color: var(--sidebar-red);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: var(--text-white);
    cursor: pointer;
    display: none;
    font-family: 'Space Grotesk', Impact, sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    transform: translateZ(0);
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    will-change: transform, box-shadow, background-color;
    z-index: 1001;
}

.latest-btn-mobile:focus,
.latest-btn-mobile:hover,
.random-meme-btn-mobile:focus,
.random-meme-btn-mobile:hover {
    background-color: var(--hover-red);
    box-shadow: 0 6px 12px var(--shadow-red);
    outline: none;
}

.magnify-btn,
.magnify-btn-mobile {
    align-items: center;
    background-color: var(--sidebar-red);
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    height: 45px;
    justify-content: center;
    padding: 12px;
    transform: translateZ(0);
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    width: 45px;
    will-change: transform, box-shadow, background-color;
}

.magnify-btn-mobile:focus,
.magnify-btn-mobile:hover,
.magnify-btn:focus,
.magnify-btn:hover {
    background-color: var(--hover-red);
    box-shadow: 0 6px 12px var(--shadow-red);
    outline: 2px solid var(--text-white);
    outline-offset: 2px;
}

.magnify-icon {
    height: 24px;
    width: 24px;
}

.button-footer {
    display: none;
}

.council-content {
    margin: 25px auto 0;
    max-width: 1200px;
    padding: 20px;
}

.widget-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.market-cap-widget,
.stats-widget {
    background: #2a2a2a;
    border: 2px solid var(--sidebar-red);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 400px;
    justify-content: space-between;
    max-width: 400px;
    padding: 15px;
    position: relative;
    text-align: center;
    transition: box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
    width: 100%;
    z-index: 1;
}

.market-cap-widget:focus-within,
.market-cap-widget:hover,
.stats-widget:focus-within,
.stats-widget:hover {
    border-color: var(--hover-red);
    box-shadow: 0 0 15px var(--shadow-red);
}

.market-cap-widget h2,
.stats-widget h2 {
    color: #fff;
    font-family: Impact, sans-serif;
    font-size: 1.5em;
    margin: 0 0 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.market-cap-widget p {
    color: #999;
    font-family: Oswald, sans-serif;
    font-size: 1.2em;
    margin: 0 0 10px;
}

.market-cap-widget img {
    display: block;
    flex-grow: 1;
    height: auto;
    margin: 10px auto;
    max-width: 72%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

#scoreboard-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 5px;
    justify-content: flex-start;
}

#scoreboard-content p {
    color: #fff;
    font-family: Oswald, sans-serif;
    font-size: 1.1em;
    margin: 0;
}

#scoreboard-content p strong {
    color: var(--sidebar-red);
}

#scoreboard-content .holder-memes-row {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 5px;
}

#scoreboard-content p.holder-memes {
    font-size: 0.9em;
}

#dextools-widget {
    background: #000;
    border: none;
    border-radius: 4px;
    box-sizing: border-box;
    flex-shrink: 0;
    height: 300px;
    margin: 20px auto 0;
    max-width: 100%;
    width: 500px;
}

.gain {
    color: #0f0;
}

.gain,
.loss {
    font-weight: 700;
    margin-left: 10px;
}

.loss {
    color: red;
}

.council-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    position: relative;
    text-align: center;
    z-index: 2;
}

.council-links p {
    width: 100%;
}

.council-links .address-text,
.council-links p {
    color: var(--sidebar-red);
    margin-top: 20px;
    text-align: center;
}

.council-links .address-text {
    line-height: 1.4;
}

.council-links .target-text {
    color: var(--text-white);
    line-height: 1.4;
    margin-top: 0;
    text-align: center;
}

.council-links .target-text a {
    color: var(--text-white);
    text-decoration: underline;
    transition: color 0.3s ease-in-out, text-shadow 0.3s ease-in-out;
}

.council-links .target-text a:focus,
.council-links .target-text a:hover {
    color: var(--text-hover);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.council-btn {
    background-color: var(--sidebar-red);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: var(--text-white);
    font-family: Impact, sans-serif;
    font-size: 1.1em;
    padding: 12px 24px;
    text-decoration: none;
    transform: translateZ(0);
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    will-change: transform, box-shadow, background-color;
}

.council-btn:focus,
.council-btn:hover {
    background-color: var(--hover-red);
    box-shadow: 0 6px 12px var(--shadow-red);
    outline: none;
}

.play-button {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: none;
    font-size: 20px;
    height: 40px;
    left: 50%;
    outline: none;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease-in-out;
    width: 40px;
    z-index: 10;
}

.play-button:focus {
    outline: 2px solid var(--text-white);
    outline-offset: 2px;
}

.media-item:focus-within .play-button,
.media-item:hover .play-button {
    display: block;
}

.download-counter {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    bottom: 10px;
    color: var(--text-white);
    font-size: 0.7em;
    opacity: 0;
    padding: 2px 6px;
    position: fixed;
    right: 10px;
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}

.social-btn {
    align-items: center;
    background-color: #000;
    border-radius: 4px;
    display: inline-flex;
    height: 1.4em;
    justify-content: center;
    margin: 0 10px;
    overflow: hidden;
    padding: 0;
    text-decoration: none;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    vertical-align: middle;
    width: 5.6em;
}

.social-btn:focus,
.social-btn:hover {
    box-shadow: 0 4px 8px var(--shadow-red);
    outline: none;
    transform: scale(1.1);
}

.social-icon {
    display: block;
    height: 60%;
    max-height: 48px;
    max-width: 48px;
    object-fit: contain;
    width: 60%;
}

.target-text {
    gap: 6px;
    justify-content: center;
}

.red-button,
.target-text {
    align-items: center;
    display: flex;
}

.red-button {
    background-color: var(--sidebar-red);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: var(--text-white);
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2em;
    gap: 5px;
    margin: 0 5px;
    overflow: hidden;
    padding: 12px 24px;
    position: relative;
    transform: translateZ(0);
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    will-change: transform, box-shadow, background-color;
}

.red-button:focus,
.red-button:hover {
    background-color: var(--hover-red);
    box-shadow: 0 6px 12px var(--shadow-red);
    outline: 2px solid var(--text-white);
    outline-offset: 2px;
}

.red-button img {
    transition: transform 0.3s ease-in-out;
    vertical-align: middle;
    width: 45px;
}

.red-button:focus img,
.red-button:hover img {
    transform: scale(1.1);
}

.toggle-media-btn {
    padding: 12px 24px;
}

.toggle-videos-gifs-btn {
    box-sizing: border-box;
    justify-content: space-between;
    padding: 12px 24px;
    transform: translateZ(0);
    width: 150px;
    will-change: transform, box-shadow, background-color;
}

.overlay {
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    touch-action: none;
    width: 100%;
    z-index: 1049;
}

.keyboard-trigger {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
    z-index: -1;
}

@media (min-width: 481px) {
    .sticky-header {
        background-color: var(--bg-color);
        box-shadow: none;
        flex-direction: column;
        padding: 0;
        position: static;
        width: 100%;
        z-index: 1000;
    }
    .button-group,
    .sticky-header {
        align-items: center;
        display: flex;
        margin: 0;
        min-width: 600px;
    }
    .button-group {
        gap: 15px;
        justify-content: center;
    }
    body .sticky-header:has(#latest-btn[aria-label*="Bobo collections"]) p,
    body .sticky-header:has(#latest-btn[aria-label*="Bobo memes"]) p,
    body .sticky-header:has(#latest-btn[aria-label*="Bobo videos"]) p {
        display: none;
    }
    body .sticky-header:has(#latest-btn[aria-label*="Bobo collections"]) .button-group,
    body .sticky-header:has(#latest-btn[aria-label*="Bobo memes"]) .button-group,
    body .sticky-header:has(#latest-btn[aria-label*="Bobo videos"]) .button-group {
        padding-top: 25px;
    }
}

@media (max-width: 1024px) {
    body {
        background-color: var(--bg-color);
        box-sizing: border-box;
        margin: 0 !important;
        overflow-x: hidden;
        padding: 0 !important;
        position: relative;
        width: 100%;
    }
    .red-bar {
        display: none;
    }
    .container {
        box-sizing: border-box;
        display: block;
        margin: 0 !important;
        min-height: auto;
        padding: 0 !important;
        position: relative;
        width: 100%;
    }
    .overlay.active {
        background-color: rgba(0, 0, 0, 0.5);
        cursor: pointer;
        display: block;
        height: 100%;
        left: 0;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1049 !important;
    }
    main {
        background: transparent;
        box-sizing: border-box;
        margin: 0 !important;
        min-height: 100vh;
        overflow-y: auto !important;
        padding: 0 0 70px !important;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    body:has(.council-content) main {
        height: auto;
        overflow-y: auto;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) main {
        height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .container {
        height: 100vh;
        overflow: hidden;
    }
    .latest-btn-mobile,
    .menu-btn,
    .random-meme-btn-mobile,
    .top-btn-mobile {
        background-color: var(--sidebar-red);
        display: block !important;
        opacity: 0.9;
        pointer-events: auto !important;
    }
    .header-content {
        gap: 0 !important;
    }
    .header-content,
    .sticky-header {
        margin: 0 !important;
        padding: 0 !important;
    }
    .sticky-header {
        align-items: center;
        background-color: var(--bg-color);
        box-shadow: none;
        display: flex;
        flex-direction: column;
        position: static;
        position: relative;
        width: 100%;
        z-index: 1001;
    }
    .sticky-header h1 {
        display: none;
    }
    .sticky-header #search-line {
        background-color: var(--sidebar-red);
        box-shadow: 0 0 12px rgba(185, 11, 42, 0.6), 0 0 20px rgba(185, 11, 42, 0.4);
        height: 6px;
        left: 0;
        margin: 0 auto;
        max-width: 100%;
        position: fixed;
        right: 0;
        top: 0;
        transform: scale(1.5, 1.2);
        transform-origin: center;
        width: 100%;
        z-index: 1002;
    }
    body:has(#latest-btn[aria-label*="Bobo pics"]) .sticky-header p {
        display: none;
    }
    .sticky-header p {
        display: none;
    }
    .sticky-header .button-group {
        display: none !important;
    }
    .button-group #dump-it,
    .button-group #dump-pics-btn,
    .button-group #dump-videos-btn,
    .button-group #latest-btn,
    .button-group #random-meme-btn,
    .button-group #search-btn,
    .button-group #toggle-media-btn {
        display: none;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container {
        align-items: center;
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        height: auto;
        justify-content: center;
        left: 50%;
        margin: 0;
        max-width: 400px;
        opacity: 1 !important;
        padding: 0;
        position: absolute;
        top: 6px !important;
        transform: translateX(-50%);
        transition: top 0.2s ease-out;
        width: 100%;
        z-index: 1000;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container.active {
        animation: dropDown 0.2s ease-out forwards;
        display: flex;
        top: 6px;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container:not(.active) {
        animation: closeUp 0.2s ease-in forwards;
        display: none;
        top: -40px;
    }
    @keyframes dropDown {
        0% {
            opacity: 0;
            top: -40px;
        }
        to {
            opacity: 1;
            top: 6px;
        }
    }
    @keyframes closeUp {
        0% {
            opacity: 1;
            top: 6px;
        }
        to {
            opacity: 0;
            top: -40px;
        }
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])):not(:has(#latest-btn[aria-label*="Bobo Council"])) .gallery-wrapper {
        margin-top: 48px !important;
        max-height: calc(100vh - 98px);
        min-height: calc(100vh - 98px);
    }
    body:has(#latest-btn[aria-label*="Bobo collections"]) .sticky-header #collection-filter {
        display: block !important;
        margin: 30px auto 10px !important;
        padding: 0 !important;
        position: static !important;
        width: 65vw !important;
        z-index: 1001 !important;
    }
    #search-input:not(:focus) {
        background-color: var(--bg-color);
        opacity: 0.8;
    }
    #search-input {
        background-color: var(--bg-color);
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 0 5px var(--shadow-red);
        color: var(--text-white);
        display: block;
        font-family: Oswald, sans-serif;
        height: 35px;
        margin: 0;
        padding: 4px 30px 4px 12px;
        transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 100%;
    }
    #search-input:focus {
        border-color: var(--hover-red);
        box-shadow: 0 4px 8px var(--shadow-red);
        outline: none;
    }
    #search-input::placeholder {
        color: var(--text-white);
        opacity: 0.6;
    }
    #search-line {
        height: 6px;
        margin-top: -25px;
        max-width: 100%;
        transform: scale(1.5, 1.2);
        transform-origin: center;
    }
    .new-collection-select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-color: var(--bg-color);
        background-image: url('data:image/svg+xml;utf8,<svg fill="%23529952" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
        background-position: right 10px center;
        background-repeat: no-repeat;
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 0 5px var(--shadow-red);
        box-sizing: border-box;
        color: var(--text-white);
        font-family: Oswald, sans-serif;
        font-size: 0.9em;
        margin: 5px auto;
        max-width: 350px;
        padding: 8px 12px;
        transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 100%;
    }
    .new-collection-select:focus,
    .new-collection-select:hover {
        border-color: var(--hover-red);
        box-shadow: 0 4px 8px var(--shadow-red);
        outline: none;
    }
    .new-collection-select option {
        background-color: var(--bg-color);
        color: var(--text-white);
        font-family: Oswald, sans-serif;
    }
    .sticky-header:has(#latest-btn[aria-label*="Bobo Council"]) #search-container {
        display: none;
    }
    .sticky-header:has(#latest-btn[aria-label*="Bobo Council"])~.gallery-wrapper {
        margin-top: 106px !important;
    }
    .gallery-wrapper:after,
    .gallery-wrapper:before {
        display: none !important;
    }
    #gallery {
        box-sizing: border-box;
        column-gap: 6px;
        contain-intrinsic-size: 140px 140px;
        content-visibility: auto;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        justify-items: center;
        margin: 0 !important;
        max-width: 100%;
        overflow-x: hidden;
        padding: 5px !important;
        row-gap: 15px;
        width: 100%;
    }
    #gallery.blurred {
        filter: blur(5px);
        opacity: 0.5;
        pointer-events: auto;
    }
    #gallery .media-item {
        box-sizing: border-box;
        height: auto;
        margin: 0;
        padding: 0;
        width: 100%;
    }
    #gallery img,
    #gallery video {
        border: 2px solid var(--sidebar-red);
        border-radius: 4px;
        display: block;
        height: 140px !important;
        object-fit: cover;
        transform: translateZ(0);
        width: 140px !important;
        will-change: transform, opacity;
    }
    .media-caption {
        display: none;
    }
    .council-content {
        background: transparent;
        height: auto;
        margin-top: 80px;
        min-height: auto;
    }
    main.blurred {
        opacity: 0.5;
        pointer-events: none;
    }
    .back-to-top-btn {
        background-color: var(--sidebar-red);
        border: none;
        border-radius: 8px;
        bottom: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        color: var(--text-white);
        cursor: pointer;
        display: block !important;
        font-family: Impact, sans-serif;
        font-size: 0.85em;
        letter-spacing: 0.5px;
        padding: 10px 20px;
        pointer-events: auto !important;
        position: fixed;
        right: 20px;
        transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        z-index: 1000;
    }
    .back-to-top-btn:focus,
    .back-to-top-btn:hover {
        background-color: var(--hover-red);
        box-shadow: 0 4px 8px var(--shadow-red);
        outline: none;
    }
    .back-to-top-btn.hidden {
        display: none;
    }
    .button-footer {
        align-items: center;
        bottom: 20px;
        display: flex;
        gap: 6px;
        justify-content: center;
        left: 50%;
        pointer-events: auto !important;
        position: fixed;
        transform: translateX(-50%);
        transition: opacity 0.3s ease-in-out;
        z-index: 1001;
    }
    .button-footer .top-btn-mobile {
        background-color: var(--sidebar-red);
        border: none;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        display: block;
        height: 30px;
        padding: 5px;
        pointer-events: auto !important;
        transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 30px;
    }
    .button-footer .top-btn-mobile:active,
    .button-footer .top-btn-mobile:focus,
    .button-footer .top-btn-mobile:hover {
        background-color: var(--hover-red);
        box-shadow: 0 6px 12px var(--shadow-red);
        outline: none;
    }
    .button-footer .top-btn-mobile.active {
        background-color: var(--hover-red);
        box-shadow: 0 6px 12px var(--shadow-red);
    }
    .button-footer .top-btn-mobile:not(.active) {
        background-color: var(--sidebar-red);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    .button-footer .latest-btn-mobile {
        height: 40px;
        width: 80px;
    }
    .button-footer .menu-btn {
        background-color: var(--sidebar-red);
        border: none;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        color: var(--text-white);
        cursor: pointer;
        display: block !important;
        font-family: Impact, sans-serif;
        font-size: 0.85em;
        letter-spacing: 0.5px;
        height: 40px;
        padding: 10px 20px;
        pointer-events: auto !important;
        text-align: center;
        text-transform: uppercase;
        transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 80px;
        z-index: 1001;
    }
    .button-footer .menu-btn:focus,
    .button-footer .menu-btn:hover {
        background-color: var(--hover-red);
        box-shadow: 0 6px 12px var(--shadow-red);
        outline: none;
    }
    .button-footer .random-meme-btn-mobile {
        height: 40px;
        width: 90px;
    }
    .button-footer .magnify-btn-mobile {
        display: block;
        height: 30px;
        padding: 5px;
        width: 30px;
    }
    .magnify-btn {
        display: none !important;
    }
    .menu-toggle {
        display: none;
    }
    main {
        margin-left: 0;
        padding: 10px;
    }
    .container {
        flex-direction: column;
    }
    .meme-viewer-content {
        min-height: calc(100vh - 60px);
        padding-bottom: 60px;
    }
    .meme-viewer img,
    .meme-viewer video {
        margin: 10px auto;
        max-height: 300px;
        max-width: 300px;
    }
    .header-content {
        gap: 6px;
    }
    h1 {
        font-size: 1.5em;
    }
    .button-group {
        align-items: center;
        flex-direction: row;
        gap: 15px;
        justify-content: center;
        margin-top: 20px;
        padding: 0;
        width: 100%;
    }
    #dump-collections-btn img,
    #dump-it img,
    #dump-pics-btn img,
    #dump-videos-btn img,
    #latest-btn img,
    #random-meme-btn img,
    #search-btn img {
        height: auto;
        margin-left: 8px;
        width: 40px;
    }
    #search-input {
        font-size: 0.9em;
        max-width: 350px;
        padding: 4px 12px;
    }
    #tags-btn {
        background-color: var(--bg-color);
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 0 5px var(--shadow-red);
        color: var(--text-white);
        cursor: pointer;
        display: block !important;
        font-family: Oswald, sans-serif;
        font-size: 0.8em;
        height: 35px;
        padding: 4px 8px;
        transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 60px;
        z-index: 1001;
    }
    #tags-btn:focus,
    #tags-btn:hover {
        border-color: var(--hover-red);
        box-shadow: 0 4px 8px var(--shadow-red);
        outline: none;
    }
}

@media (max-width: 480px) {
    body {
        background-color: var(--bg-color);
        box-sizing: border-box;
        margin: 0 !important;
        overflow-x: hidden;
        padding: 0 !important;
    }
    .container {
        box-sizing: border-box;
        display: block;
        margin: 0 !important;
        min-height: auto;
        padding: 0 !important;
        position: relative;
        width: 100%;
    }
    .overlay.active {
        background-color: rgba(0, 0, 0, 0.5);
        cursor: pointer;
        display: block;
        height: 100%;
        left: 0;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1049 !important;
    }
    main {
        background: transparent;
        box-sizing: border-box;
        margin: 0 !important;
        min-height: 100vh;
        padding: 0 0 70px !important;
        width: 100%;
    }
    body:has(.council-content) main {
        height: auto;
        overflow-y: auto;
    }
    .latest-btn-mobile,
    .menu-btn,
    .random-meme-btn-mobile {
        background-color: var(--sidebar-red);
        display: block;
        opacity: 0.9;
    }
    .header-content {
        gap: 0 !important;
    }
    .header-content,
    .sticky-header {
        margin: 0 !important;
        padding: 0 !important;
    }
    .sticky-header {
        background-color: var(--bg-color);
        box-shadow: none;
        position: static;
        position: relative;
        width: 100%;
        z-index: 1001;
    }
    .sticky-header h1 {
        display: none;
    }
    .sticky-header #search-line {
        background-color: var(--sidebar-red);
        box-shadow: 0 0 12px rgba(185, 11, 42, 0.6), 0 0 20px rgba(185, 11, 42, 0.4);
        height: 6px;
        left: 0;
        margin: 0 auto;
        max-width: 100%;
        position: fixed;
        right: 0;
        top: 0;
        transform: scale(1.5, 1.2);
        transform-origin: center;
        width: 100%;
        z-index: 1002;
    }
    .sticky-header p {
        display: none;
    }
    .sticky-header .button-group {
        display: none !important;
    }
    .button-group #dump-it,
    .button-group #dump-pics-btn,
    .button-group #dump-videos-btn,
    .button-group #latest-btn,
    .button-group #random-meme-btn,
    .button-group #search-btn,
    .button-group #toggle-media-btn {
        display: none;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container {
        align-items: center;
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        height: auto;
        justify-content: center;
        left: 50%;
        margin: 0;
        max-width: 300px;
        opacity: 1 !important;
        padding: 0;
        position: absolute;
        top: 6px !important;
        transform: translateX(-50%);
        transition: top 0.2s ease-out;
        width: 100%;
        z-index: 1000;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container.active {
        animation: dropDown 0.2s ease-out forwards;
        display: flex;
        top: 6px;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container:not(.active) {
        animation: closeUp 0.2s ease-in forwards;
        display: none;
        top: -40px;
    }
    @keyframes dropDown {
        0% {
            opacity: 0;
            top: -40px;
        }
        to {
            opacity: 1;
            top: 6px;
        }
    }
    @keyframes closeUp {
        0% {
            opacity: 1;
            top: 6px;
        }
        to {
            opacity: 0;
            top: -40px;
        }
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])):not(:has(#latest-btn[aria-label*="Bobo Council"])) .gallery-wrapper {
        margin-top: 48px !important;
        max-height: calc(100vh - 98px);
        min-height: calc(100vh - 98px);
    }
    body:has(#latest-btn[aria-label*="Bobo collections"]) .sticky-header #collection-filter {
        display: block !important;
        margin: 30px auto 10px !important;
        padding: 0 !important;
        position: static !important;
        width: 65vw !important;
        z-index: 1001 !important;
    }
    #search-input:not(:focus) {
        background-color: var(--bg-color);
        opacity: 0.8;
    }
    #search-input {
        background-color: var(--bg-color);
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 0 5px var(--shadow-red);
        color: var(--text-white);
        display: block;
        font-family: Oswald, sans-serif;
        height: 30px;
        margin: 0;
        padding: 4px 30px 4px 12px;
        transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 100%;
    }
    #search-input:focus {
        border-color: var(--hover-red);
        box-shadow: 0 4px 8px var(--shadow-red);
        outline: none;
    }
    #search-input::placeholder {
        color: var(--text-white);
        opacity: 0.6;
    }
    #search-line {
        height: 6px;
        margin-top: -25px;
        max-width: 100%;
        transform: scale(1.5, 1.2);
        transform-origin: center;
    }
    .new-collection-select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-color: var(--bg-color);
        background-image: url('data:image/svg+xml;utf8,<svg fill="%23529952" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
        background-position: right 10px center;
        background-repeat: no-repeat;
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 0 5px var(--shadow-red);
        box-sizing: border-box;
        color: var(--text-white);
        font-family: Oswald, sans-serif;
        font-size: 0.9em;
        margin: 5px auto;
        max-width: 250px;
        padding: 8px 12px;
        transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 100%;
    }
    .new-collection-select:focus,
    .new-collection-select:hover {
        border-color: var(--hover-red);
        box-shadow: 0 4px 8px var(--shadow-red);
        outline: none;
    }
    .new-collection-select option {
        background-color: var(--bg-color);
        color: var(--text-white);
        font-family: Oswald, sans-serif;
    }
    .sticky-header:has(#latest-btn[aria-label*="Bobo Council"]) #search-container {
        display: none;
    }
    .sticky-header:has(#latest-btn[aria-label*="Bobo Council"])~.gallery-wrapper {
        margin-top: 106px !important;
    }
    .gallery-wrapper:after,
    .gallery-wrapper:before {
        display: none !important;
    }
    #gallery {
        box-sizing: border-box;
        column-gap: 8px;
        contain-intrinsic-size: 110px 110px;
        content-visibility: auto;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        margin: 0 !important;
        max-width: 100%;
        padding: 5px !important;
        row-gap: 12px;
        width: 100%;
    }
    #gallery.blurred {
        filter: blur(5px);
        opacity: 0.5;
        pointer-events: auto;
    }
    #gallery .media-item {
        box-sizing: border-box;
        height: auto;
        margin: 0;
        padding: 0;
        width: 100%;
    }
    #gallery img,
    #gallery video {
        border: 2px solid var(--sidebar-red);
        border-radius: 4px;
        display: block;
        height: 110px !important;
        object-fit: cover;
        transform: translateZ(0);
        width: 110px !important;
        will-change: transform, opacity;
    }
    .media-caption {
        display: none;
    }
    .council-content {
        background: transparent;
        height: auto;
        margin-top: 80px;
        min-height: auto;
    }
    main.blurred {
        opacity: 0.5;
        pointer-events: none;
    }
    .back-to-top-btn {
        display: none !important;
    }
    .button-footer {
        align-items: center;
        bottom: 20px;
        display: flex;
        gap: 6px;
        justify-content: center;
        left: 50%;
        position: fixed;
        transform: translateX(-50%);
        transition: opacity 0.3s ease-in-out;
        z-index: 1001;
    }
    .button-footer .top-btn-mobile {
        background-color: var(--sidebar-red);
        border: none;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        display: block;
        height: 30px;
        padding: 5px;
        transform: translateZ(0);
        transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 30px;
        will-change: transform, box-shadow, background-color;
    }
    .button-footer .top-btn-mobile:active,
    .button-footer .top-btn-mobile:focus,
    .button-footer .top-btn-mobile:hover {
        background-color: var(--hover-red);
        box-shadow: 0 6px 12px var(--shadow-red);
        outline: none;
    }
    .button-footer .top-btn-mobile.active {
        background-color: var(--hover-red);
        box-shadow: 0 6px 12px var(--shadow-red);
    }
    .button-footer .top-btn-mobile:not(.active) {
        background-color: var(--sidebar-red);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    .button-footer .latest-btn-mobile,
    .button-footer .menu-btn {
        height: 40px;
        width: 80px;
    }
    .button-footer .random-meme-btn-mobile {
        height: 40px;
        width: 90px;
    }
    .button-footer .magnify-btn-mobile {
        display: block;
        height: 30px;
        padding: 5px;
        width: 30px;
    }
    .magnify-btn {
        display: none !important;
    }
    .menu-toggle {
        display: none;
    }
    main {
        margin-left: 0;
        padding: 10px;
    }
    .container {
        flex-direction: column;
    }
    .meme-viewer-content {
        min-height: calc(100vh - 60px);
        padding-bottom: 60px;
    }
    .meme-viewer img,
    .meme-viewer video {
        margin: 10px auto;
        max-height: 200px;
        max-width: 200px;
        transform: translateZ(0);
        will-change: transform, box-shadow;
    }
    .header-content {
        gap: 6px;
    }
    h1 {
        font-size: 1.5em;
    }
    .button-group {
        align-items: center;
        flex-direction: row;
        gap: 15px;
        justify-content: center;
        margin-top: 20px;
        padding: 0;
        width: 100%;
    }
    #dump-collections-btn img,
    #dump-it img,
    #dump-pics-btn img,
    #dump-videos-btn img,
    #latest-btn img,
    #random-meme-btn img,
    #search-btn img {
        height: auto;
        margin-left: 8px;
        width: 40px;
    }
    #search-input {
        font-size: 0.8em;
        max-width: 250px;
        padding: 4px 12px;
    }
    #tags-btn {
        background-color: var(--bg-color);
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 0 5px var(--shadow-red);
        color: var(--text-white);
        cursor: pointer;
        display: block !important;
        font-family: Oswald, sans-serif;
        font-size: 0.7em;
        height: 30px;
        padding: 4px 8px;
        transform: translateZ(0);
        transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 50px;
        will-change: transform, box-shadow, border-color;
        z-index: 1001;
    }
    #tags-btn:focus,
    #tags-btn:hover {
        border-color: var(--hover-red);
        box-shadow: 0 4px 8px var(--shadow-red);
        outline: none;
    }
    #toggle-videos-gifs-btn-mobile {
        align-items: center;
        background-color: var(--bg-color);
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 0 5px var(--shadow-red);
        box-sizing: border-box;
        color: var(--text-white);
        cursor: pointer;
        display: block !important;
        display: flex;
        font-family: Oswald, sans-serif;
        font-size: 0.7em;
        height: 30px;
        justify-content: space-between;
        padding: 4px 8px;
        transform: translateZ(0);
        transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 50px;
        will-change: transform, box-shadow, background-color;
        z-index: 1001;
    }
    #toggle-videos-gifs-btn-mobile:focus,
    #toggle-videos-gifs-btn-mobile:hover {
        border-color: var(--hover-red);
        box-shadow: 0 4px 8px var(--shadow-red);
        outline: none;
    }
    #toggle-videos-gifs-btn-mobile img {
        height: 16px;
        margin-left: 4px;
        width: 16px;
    }
    #tags-menu {
        background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
        display: none;
        height: auto;
        left: 0;
        max-width: 360px;
        padding: 15px;
        position: absolute;
        top: 100%;
        width: 100%;
        z-index: 1002;
    }
    .tags-columns {
        display: flex;
        gap: 5px;
        justify-content: space-between;
    }
    .tags-column {
        flex: 1;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .tags-column li {
        margin: 5px 0;
    }
    .tags-column .tag-option {
        background: none;
        border: none;
        color: var(--text-white);
        cursor: pointer;
        font-family: Oswald, sans-serif;
        font-size: 0.65em;
        padding: 6px;
        text-align: center;
        transform: translateZ(0);
        transition: background-color 0.3s ease-in-out;
        width: 100%;
        will-change: background-color;
    }
    .tags-column .tag-option:focus,
    .tags-column .tag-option:hover {
        background-color: var(--hover-red);
        outline: none;
    }
    #tags-menu .close-tags-btn {
        background: none;
        border: none;
        color: var(--sidebar-red);
        cursor: pointer;
        font-size: 1.2em;
        height: 20px;
        line-height: 20px;
        padding: 0;
        position: absolute;
        right: 5px;
        text-align: center;
        top: 5px;
        transform: translateZ(0);
        width: 20px;
        will-change: color;
    }
    #tags-menu .close-tags-btn:hover {
        color: var(--hover-red);
    }
    .market-cap-widget,
    .stats-widget {
        height: auto;
        max-width: 100%;
    }
    .council-links {
        align-items: center;
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 6px;
    }
    .council-links p {
        text-align: center;
    }
    .council-links .button-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .council-btn {
        font-size: 0.8em;
        max-width: 100px;
        padding: 8px 16px;
        white-space: nowrap;
    }
    .market-cap-widget {
        display: none !important;
    }
    #scoreboard-content .holder-memes-row {
        flex-direction: column;
        gap: 5px;
    }
    #scoreboard-content p.holder-memes {
        display: block;
    }
    #dextools-widget {
        display: none !important;
    }
    .mobile-only {
        display: block;
    }
    .bobo-of-the-day h2 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    .bobo-of-the-day-img {
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-sizing: border-box;
        display: block;
        height: auto !important;
        margin: 0 auto;
        max-height: 150px !important;
        max-width: 100% !important;
        object-fit: contain;
        transform: translateZ(0);
        width: 150px !important;
        will-change: transform, opacity;
    }
    .bobo-of-the-day {
        margin-top: 15px;
        max-width: 150px;
        overflow: hidden;
    }
    .bobo-of-the-day,
    .stats-widget {
        height: auto;
        text-align: center;
        width: 100%;
    }
    .stats-widget {
        background: #2a2a2a;
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        max-width: 400px;
        padding: 15px;
        position: relative;
        transition: box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
        z-index: 1;
    }
    @media (min-width: 481px) {
        .bobo-of-the-day-img {
            height: auto !important;
            max-height: 200px !important;
            max-width: 100% !important;
            width: 200px !important;
        }
        .bobo-of-the-day {
            max-width: 200px;
        }
    }
    #search-container {
        display: block;
        margin: 10px auto 0;
        text-align: center;
    }
    .media-item {
        padding: 5px;
    }
    .media-caption {
        font-size: 0.8em;
        margin: 3px 0 0;
        max-width: 200px;
        padding: 3px;
    }
    .play-button {
        font-size: 14px;
        height: 28px;
        padding: 0;
        width: 28px;
    }
    .social-btn {
        height: 1.2em;
        margin: 0 5px;
        width: 4.8em;
    }
    .social-icon {
        max-height: 42px;
        max-width: 42px;
    }
    .target-text {
        gap: 5px;
    }
    .sticky-header {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    #toggle-media-btn-mobile.random-meme-btn-mobile {
        background-color: var(--sidebar-red);
        border: none;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        color: var(--text-white);
        cursor: pointer;
        font-family: Impact, sans-serif;
        font-size: 0.85em;
        letter-spacing: 0.5px;
        height: 40px;
        padding: 10px 20px;
        text-align: center;
        text-transform: uppercase;
        transform: translateZ(0);
        transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        width: 90px;
        will-change: transform, box-shadow, background-color;
        z-index: 1001;
    }
    #toggle-media-btn-mobile.random-meme-btn-mobile:focus,
    #toggle-media-btn-mobile.random-meme-btn-mobile:hover {
        background-color: var(--hover-red);
        box-shadow: 0 6px 12px var(--shadow-red);
        outline: none;
    }
    .clear-search-btn {
        display: block !important;
        right: 10px;
    }
    #collection-select {
        background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
        background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
        background-position: right 15px center;
        background-repeat: no-repeat;
        border: 2px solid hsla(0, 0%, 100%, 0.2);
        border-radius: 20px;
        box-shadow: 0 0 15px rgba(82, 153, 82, 0.3), inset 0 0 5px hsla(0, 0%, 100%, 0.1);
        color: var(--text-white);
        font-size: 1.3em;
        font-weight: 600;
        height: 50px;
        margin: 0 !important;
        padding: 8px 30px;
        transition: box-shadow 0.3s ease-in-out;
        width: 65vw !important;
    }
    #collection-select:focus,
    #collection-select:hover {
        box-shadow: 0 0 20px rgba(185, 11, 42, 0.5), inset 0 0 8px hsla(0, 0%, 100%, 0.2);
        outline: none;
    }
    #collection-select option {
        background: rgba(185, 11, 42, 0.6);
        color: var(--text-white);
        font-size: 1.3em;
    }
    .keyboard-trigger {
        pointer-events: auto;
    }
    .chrome-extension-btn {
        margin: 10px auto;
        max-width: 300px;
        width: 60%;
    }
    .chrome-extension-img {
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        display: block;
        height: auto;
        transform: translateZ(0);
        width: 100%;
        will-change: transform, opacity;
    }
}

@media (max-width: 768px) {
    #gallery {
        contain-intrinsic-size: 150px 150px;
        content-visibility: auto;
        grid-template-columns: repeat(3, 1fr);
    }
    #gallery img,
    #gallery video {
        height: 150px;
        max-width: 150px;
        transform: translateZ(0);
        width: 150px;
        will-change: transform, opacity;
    }
    /* Wider phones: keep same gaps as narrow phones, just fill columns fully */
    @media (min-width: 390px) and (max-width: 768px) {
        #gallery img,
        #gallery video {
            width: 100% !important;
            max-width: 100% !important;
            height: auto !important;
            aspect-ratio: 1 / 1 !important;
        }
    }
    .market-cap-widget,
    .stats-widget {
        box-sizing: border-box;
        height: auto;
        max-width: 100%;
        overflow: hidden;
        padding: 15px;
    }
    .council-links {
        align-items: center;
        flex-direction: row !important;
    }
    .council-links p {
        text-align: center;
    }
    #scoreboard-content .holder-memes-row {
        flex-direction: column;
        gap: 5px;
    }
    #scoreboard-content p.holder-memes {
        display: block;
    }
    .download-counter {
        bottom: 5px;
        font-size: 0.6em;
        right: 5px;
    }
    .bobo-of-the-day {
        margin-top: 15px;
        max-width: 100%;
        overflow: hidden;
        text-align: center;
    }
}

body:has(.meme-viewer-content) .overlay.active {
    pointer-events: all !important;
    z-index: 1049 !important;
}

#sentinel {
    clear: both;
    height: 1px;
    position: relative;
    width: 100%;
    z-index: 1;
}

#collection-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23529952" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-position: right 15px center;
    background-repeat: no-repeat;
    border: 2px solid var(--sidebar-red);
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(82, 153, 82, 0.3), inset 0 0 5px hsla(0, 0%, 100%, 0.1);
    color: var(--text-white);
    cursor: pointer;
    font-family: Oswald, sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    max-width: 400px;
    padding: 10px 40px 10px 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
    width: 100%;
}

#collection-select:focus,
#collection-select:hover {
    border-color: var(--hover-red);
    box-shadow: 0 0 20px rgba(185, 11, 42, 0.5), inset 0 0 8px hsla(0, 0%, 100%, 0.2);
    outline: none;
}

#collection-select option {
    background: rgba(185, 11, 42, 0.6);
    color: var(--text-white);
    font-family: Oswald, sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    padding: 10px;
}

@media (max-width: 480px) {
    #collection-select {
        background-image: url('data:image/svg+xml;utf8,<svg fill="%23529952" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
        background-position: right 15px center;
        background-repeat: no-repeat;
        border-radius: 20px;
        font-size: 1.3em;
        font-weight: 600;
        height: 50px;
        max-width: 65vw;
        padding: 8px 30px 8px 12px;
        width: 65vw !important;
    }
    #collection-select option {
        font-size: 1.3em;
    }
}

@media (max-width: 1024px) {
    .rss-ticker-wrapper {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    #collection-select {
        background-image: url('data:image/svg+xml;utf8,<svg fill="%23529952" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
        background-position: right 15px center;
        background-repeat: no-repeat;
        border-radius: 20px;
        font-size: 1.3em;
        font-weight: 600;
        height: 50px;
        max-width: 400px;
        padding: 8px 30px 8px 12px;
        width: 65vw !important;
    }
    #collection-select option {
        font-size: 1.3em;
    }
    .button-footer {
        align-items: center;
        bottom: 20px;
        display: flex;
        gap: 6px;
        justify-content: center;
        left: 50%;
        pointer-events: auto;
        position: fixed;
        transform: translateX(-50%);
        z-index: 1001;
    }
    .button-footer .menu-btn,
    .button-footer .top-btn-mobile {
        cursor: pointer;
        pointer-events: auto;
    }
    main {
        height: calc(100vh - 60px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .stats-widget {
        max-width: 100%;
        overflow: hidden;
        padding: 15px;
    }
    .bobo-of-the-day {
        align-items: center;
        display: flex;
        flex-direction: column;
        margin-top: 15px;
        position: relative;
    }
    .bobo-of-the-day h2 {
        font-size: 2.5em;
        margin-bottom: 10px;
        position: relative;
    }
    .bobo-of-the-day h2:before {
        background-color: var(--sidebar-red);
        content: "";
        height: 2px;
        left: 50%;
        position: absolute;
        top: -10px;
        transform: translateX(-50%);
        width: 50%;
    }
    .bobo-of-the-day-img {
        height: auto !important;
        max-height: 300px !important;
        max-width: 100% !important;
        transform: translateZ(0);
        width: 300px !important;
        will-change: transform, opacity;
    }
    .widget-container {
        align-items: center;
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .market-cap-widget {
        box-sizing: border-box;
        margin-bottom: 15px;
        max-width: 600px;
        overflow: hidden;
        width: 100%;
    }
    .market-cap-widget img {
        display: block !important;
        height: auto !important;
        margin: 10px auto !important;
        max-height: 200px !important;
        max-width: 100% !important;
        transform: translateZ(0);
        width: auto !important;
        will-change: transform, opacity;
    }
    .stats-widget {
        box-sizing: border-box;
        margin-top: 15px;
        max-width: 600px;
        width: 100%;
    }
    .holder-memes-row p,
    .scoreboard-content p {
        font-size: 0.85em;
        white-space: normal;
        word-break: break-word;
    }
    .holder-memes-row {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .chrome-extension-btn {
        display: block;
        margin: 15px auto;
        max-width: 500px;
        width: 80%;
    }
    .chrome-extension-img {
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        display: block;
        height: auto;
        transform: translateZ(0);
        width: 100%;
        will-change: transform, opacity;
    }
    .council-links {
        margin-top: 20px;
    }
    .council-btn {
        font-size: 0.99em;
        padding: 10.8px 21.6px;
    }
}

@media (min-width: 1025px) {
    .council-content {
        align-items: center !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .council-content .chrome-extension-btn {
        display: block !important;
        margin: 10px auto 20px !important;
        max-width: 400px !important;
        width: 80% !important;
    }
    .council-content .chrome-extension-img {
        border: 2px solid var(--sidebar-red) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
        display: block !important;
        height: auto !important;
        transform: translateZ(0);
        width: 100% !important;
        will-change: transform, opacity;
    }
    .council-content .chrome-extension-btn:hover {
        box-shadow: 0 4px 8px var(--shadow-red) !important;
        transform: scale(1.05) !important;
    }
    .council-content .council-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        margin: 0 auto 10px !important;
    }
    .council-content .council-btn {
        font-size: 0.99em;
        margin: 0 !important;
        padding: 10.8px 21.6px;
    }
    .council-content .council-contracts {
        margin: 10px 0 !important;
        text-align: center !important;
    }
    .council-content .widget-container {
        align-items: flex-start !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 20px !important;
        justify-content: center !important;
        margin: 20px 0 !important;
        max-width: 1200px !important;
        width: 100% !important;
    }
    .council-content .market-cap-widget,
    .council-content .stats-widget {
        box-sizing: border-box !important;
        flex: 1 1 400px !important;
        max-width: 500px !important;
        min-width: 400px !important;
        overflow: hidden !important;
        padding: 15px !important;
    }
    .council-content .market-cap-widget img {
        display: block !important;
        height: auto !important;
        margin: 10px auto !important;
        max-height: 200px !important;
        max-width: 100% !important;
        transform: translateZ(0);
        width: auto !important;
        will-change: transform, opacity;
    }
    .council-content .bobo-of-the-day {
        align-items: center !important;
        display: flex !important;
        flex-direction: column !important;
        margin-top: 15px !important;
    }
    .council-content .bobo-of-the-day h2 {
        margin-bottom: 5px !important;
    }
    .council-content .bobo-of-the-day-img {
        height: auto !important;
        margin: 0 auto !important;
        max-height: 200px !important;
        max-width: 100% !important;
        transform: translateZ(0);
        width: 200px !important;
        will-change: transform, opacity;
    }
    .council-content .council-social-links {
        align-items: center !important;
        display: flex !important;
        flex-direction: column !important;
        margin-top: 20px !important;
    }
    .council-content .target-text {
        display: flex !important;
        gap: 10px !important;
        justify-content: center !important;
        margin-top: 10px !important;
    }
}

.council-links .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

@media (max-width: 480px) {
    .council-links .button-row {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 1024px) {
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container {
        align-items: center;
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        height: auto;
        justify-content: center;
        left: 48%;
        margin: 0;
        max-width: 300px;
        opacity: 1 !important;
        padding: 0;
        position: absolute;
        top: 6px;
        transform: translateX(calc(-50% - 15px));
        transition: top 0.2s ease-out;
        width: 90%;
        z-index: 1000;
    }
}

@media (max-width: 1024px) {
    .clear-search-btn {
        right: 999px;
    }
}

@media (min-width: 1025px) {
    .sticky-header {
        background-color: var(--bg-color);
        box-shadow: none;
        flex-direction: column;
        margin: 0;
        padding: 0;
        position: static;
        width: 100%;
        z-index: 1000;
    }
    .button-group,
    .sticky-header {
        align-items: center;
        display: flex;
        min-width: 600px;
    }
    .button-group {
        gap: 15px;
        justify-content: center;
        margin: 10px 0 0;
    }
    #search-container.active,
    #search-container:not(.hidden) {
        align-items: center;
        display: flex !important;
        gap: 6px;
        justify-content: center;
        margin: 30px auto;
        max-width: 600px;
        padding: 0;
        position: static;
        width: 100%;
        z-index: 1001;
    }
    #search-container.active #tags-btn,
    #search-container:not(.hidden) #tags-btn {
        display: block !important;
        margin: 0;
    }
    #search-container.active .search-input-container .clear-search-btn,
    #search-container:not(.hidden) .search-input-container .clear-search-btn {
        display: block !important;
        margin: 0 !important;
        right: 12px !important;
    }
    #search-input {
        background-color: var(--text-white);
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        color: var(--bg-color);
        font-size: 0.85em;
        letter-spacing: 0.5px;
        padding: 10px 40px 10px 15px;
        width: 400px;
    }
    .clear-search-btn {
        right: 8px !important;
    }
}

@media (max-width: 480px) {
    .clear-search-btn {
        background: none;
        border: none;
        color: var(--sidebar-red);
        cursor: pointer;
        display: block !important;
        font-size: 1.2em;
        height: 20px;
        line-height: 20px;
        margin: 0;
        padding: 0;
        position: absolute;
        right: 10px;
        text-align: center;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
    }
    #search-input {
        padding-right: 40px;
    }
    .search-input-container {
        max-width: 250px;
        position: relative;
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .clear-search-btn {
        background: none;
        border: none;
        color: var(--sidebar-red);
        cursor: pointer;
        display: block !important;
        font-size: 1.2em;
        height: 20px;
        line-height: 20px;
        margin: 0;
        padding: 0;
        position: absolute;
        right: 20px;
        text-align: center;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
    }
    #search-input {
        padding-right: 60px;
    }
    .search-input-container {
        max-width: 350px;
        position: relative;
        width: 100%;
    }
}

@keyframes ghostlyFade {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.notification-badge {
    background: none;
    border-radius: 0;
    box-shadow: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    height: auto;
    line-height: normal;
    min-width: auto;
    padding: 0;
    text-align: center;
}

#dump-collections-btn:active,
#dump-it:active,
#dump-pics-btn:active,
#dump-videos-btn:active,
#latest-btn:active,
#random-meme-btn:active,
#search-btn:active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}

@media (min-width: 1025px) {
    #dump-collections-btn:active,
    #dump-it:active,
    #dump-pics-btn:active,
    #dump-videos-btn:active,
    #latest-btn:active,
    #random-meme-btn:active,
    #search-btn:active {
        background-color: var(--hover-red);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        outline: none;
        transform: scale(0.95);
    }
    #gallery.no-animations .media-item,
    #gallery.no-animations img,
    #gallery.no-animations video {
        animation: none !important;
        transition: none !important;
    }
    #gallery img,
    #gallery video {
        transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out, opacity 0.1s ease-in-out;
    }
    #gallery img:active,
    #gallery video:active {
        transition: none;
    }
    #gallery.crashing .media-item {
        animation: marketCrash 0.2s ease-out forwards;
    }
    @keyframes marketCrash {
        0% {
            opacity: 0;
            transform: translateY(-50px);
        }
        70% {
            opacity: 1;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    .fade-in {
        animation: fadeIn 0.3s ease-in;
    }
    @keyframes fadeIn {
        0% {
            opacity: 0;
            transform: translateY(5px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.media-item.loading {
    filter: brightness(0.8);
    opacity: 0.7;
    transition: opacity 0.02s ease-in-out, filter 0.02s ease-in-out;
}

body.loading {
    overflow: hidden;
    visibility: hidden;
}

body {
    overflow: auto;
    visibility: visible;
}

#gallery.no-animations .media-item,
#gallery.no-animations img,
#gallery.no-animations video {
    animation: none !important;
    transition: none !important;
}

#gallery img,
#gallery video {
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out, opacity 0.1s ease-in-out;
}

#gallery img:active,
#gallery video:active {
    transition: none;
}

#gallery.crashing .media-item {
    animation: marketCrash 0.2s ease-out forwards;
}

@keyframes marketCrash {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    70% {
        opacity: 1;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

@media (max-width: 480px) {
    @supports (-webkit-overflow-scrolling: touch) {
        main {
            overflow-x: hidden;
            overscroll-behavior-x: none;
            touch-action: pan-y;
            -webkit-overflow-scrolling: touch;
        }
    }
}

/* Ensure meme viewer container allows scrolling if needed */

#meme-viewer-container.active {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background: rgba(185, 11, 42, 0.6);
    z-index: 9999;
    overflow-y: auto;
}

/* Center the meme viewer content vertically */

.meme-viewer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Allow meme viewer to adjust to image size */

.meme-viewer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    width: auto;
    height: auto;
}

/* Safety constraints for images, but allow dynamic resizing */

.meme-viewer img,
.meme-viewer video {
    max-height: 600px !important;
    max-width: 800px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border: 5px solid #b90b2a;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
    margin: 10px auto;
    transition: transform 0.3s ease-in-out;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

/* Ensure buttons are visible and centered below the image */

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

/* Responsive adjustments */

@media (min-width: 481px) and (max-width: 1024px) {
    .meme-viewer img,
    .meme-viewer video {
        max-height: 300px !important;
        max-width: 400px !important;
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 480px) {
    .meme-viewer img,
    .meme-viewer video {
        max-height: 300px !important;
        max-width: 400px !important;
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }
    .meme-viewer-content {
        min-height: calc(100vh - 60px);
        padding-bottom: 60px;
    }
    .button-container {
        flex-direction: column;
        gap: 6px;
    }
}

/* Ensure header remains below the meme viewer */

.sticky-header,
.header-content,
.button-group {
    z-index: 1000;
}

/* Ensure gallery container doesnâ€™t interfere */

#gallery-container.active {
    display: block !important;
    position: relative;
    z-index: 1;
}

/* Ensure meme viewer container is positioned correctly */

#meme-viewer-container.active {
    display: block !important;
    width: 100%;
    min-height: 100vh;
    background: rgba(185, 11, 42, 0.6);
    z-index: 9999;
    overflow-y: auto;
}

/* Center the meme viewer content vertically */

.meme-viewer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Allow meme viewer to adjust to image size */

.meme-viewer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    width: auto;
    height: auto;
}

/* Safety constraints for images, but allow dynamic resizing */

.meme-viewer img,
.meme-viewer video {
    max-height: 600px !important;
    max-width: 800px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border: 5px solid #b90b2a;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
    margin: 10px auto;
    transition: transform 0.3s ease-in-out;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

/* Ensure buttons are visible and centered below the image */

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

/* Responsive adjustments */

@media (min-width: 481px) and (max-width: 1024px) {
    .meme-viewer img,
    .meme-viewer video {
        max-height: 300px !important;
        max-width: 400px !important;
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 480px) {
    #meme-viewer-container.active {
        position: fixed !important;
        /* Override dynamic position set by JS */
        top: 0 !important;
        left: 0 !important;
        height: 100dvh;
        /* Use dynamic viewport height for mobile */
        min-height: 100vh;
    }
    .meme-viewer img,
    .meme-viewer video {
        max-height: 300px !important;
        max-width: 400px !important;
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }
    .meme-viewer-content {
        min-height: calc(100dvh - 60px);
        padding-bottom: 60px;
    }
    .button-container {
        flex-direction: column;
        gap: 6px;
    }
}

/* Ensure header remains below the meme viewer */

.sticky-header,
.header-content,
.button-group {
    z-index: 1000;
}

/* Ensure gallery container doesnâ€™t interfere */

#gallery-container.active {
    display: block !important;
    position: relative;
    z-index: 1;
}

/* Ensure meme viewer container allows scrolling if needed */

#meme-viewer-container.active {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background: rgba(185, 11, 42, 0.6);
    z-index: 9999;
    overflow-y: auto;
}

/* Center the meme viewer content vertically */

.meme-viewer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Allow meme viewer to adjust to image size */

.meme-viewer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    width: auto;
    height: auto;
}

/* Safety constraints for images, but allow dynamic resizing */

.meme-viewer img,
.meme-viewer video {
    max-height: 600px !important;
    max-width: 800px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border: 5px solid #b90b2a;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
    margin: 10px auto;
    transition: transform 0.3s ease-in-out;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

/* Ensure buttons are visible and centered below the image */

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

/* Responsive adjustments */

@media (min-width: 481px) and (max-width: 1024px) {
    .meme-viewer img,
    .meme-viewer video {
        max-height: 300px !important;
        max-width: 400px !important;
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 480px) {
    .meme-viewer img,
    .meme-viewer video {
        max-height: 300px !important;
        max-width: 400px !important;
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }
    .meme-viewer-content {
        min-height: calc(100vh - 60px);
        padding-bottom: 60px;
    }
    .button-container {
        flex-direction: column;
        gap: 6px;
    }
}

/* Ensure header remains below the meme viewer */

.sticky-header,
.header-content,
.button-group {
    z-index: 1000;
}

/* Ensure gallery container doesnâ€™t interfere */

#gallery-container.active {
    display: block !important;
    position: relative;
    z-index: 1;
}

/* Ensure meme viewer container is positioned correctly */

#meme-viewer-container.active {
    display: block !important;
    width: 100%;
    min-height: 100vh;
    background: rgba(185, 11, 42, 0.6);
    z-index: 9999;
    overflow-y: auto;
}

/* Center the meme viewer content vertically */

.meme-viewer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Allow meme viewer to adjust to image size */

.meme-viewer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    width: auto;
    height: auto;
}

/* Safety constraints for images, but allow dynamic resizing */

.meme-viewer img,
.meme-viewer video {
    max-height: 600px !important;
    max-width: 800px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border: 5px solid #b90b2a;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
    margin: 10px auto;
    transition: transform 0.3s ease-in-out;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

/* Ensure buttons are visible and centered below the image */

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

/* Responsive adjustments */

@media (min-width: 481px) and (max-width: 1024px) {
    .meme-viewer img,
    .meme-viewer video {
        max-height: 300px !important;
        max-width: 400px !important;
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 480px) {
    #meme-viewer-container.active {
        position: fixed !important;
        /* Override dynamic position set by JS */
        top: 0 !important;
        left: 0 !important;
        height: 100dvh;
        /* Use dynamic viewport height for mobile */
        min-height: 100vh;
    }
    .meme-viewer img,
    .meme-viewer video {
        max-height: 300px !important;
        max-width: 400px !important;
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }
    .meme-viewer-content {
        min-height: calc(100dvh - 60px);
        padding-bottom: 60px;
    }
    .button-container {
        flex-direction: column;
        gap: 6px;
    }
}

/* Ensure header remains below the meme viewer */

.sticky-header,
.header-content,
.button-group {
    z-index: 1000;
}

/* Ensure gallery container doesnâ€™t interfere */

#gallery-container.active {
    display: block !important;
    position: relative;
    z-index: 1;
}

/* Global scroll lock when meme viewer is active */

body.meme-viewer-active {
    overflow: hidden !important;
    height: 100vh !important;
}

/* Ensure meme viewer container is fixed and full-screen */

#meme-viewer-container.active {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: rgba(185, 11, 42, 0.6);
    z-index: 9999;
    overflow: hidden !important;
}

/* Center the meme viewer content vertically */

.meme-viewer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Allow meme viewer to adjust to image size */

.meme-viewer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    width: auto;
    height: auto;
}

/* Safety constraints for images, but allow dynamic resizing */

.meme-viewer img,
.meme-viewer video {
    max-height: 600px !important;
    max-width: 800px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border: 5px solid #b90b2a;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
    margin: 10px auto;
    transition: transform 0.3s ease-in-out;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

/* Ensure buttons are visible and centered below the image */

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

/* Responsive adjustments */

@media (min-width: 481px) and (max-width: 1024px) {
    .meme-viewer img,
    .meme-viewer video {
        max-height: 300px !important;
        max-width: 400px !important;
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 480px) {
    #meme-viewer-container.active {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100dvh !important;
        min-height: 100vh;
    }
    .meme-viewer img,
    .meme-viewer video {
        max-height: 300px !important;
        max-width: 400px !important;
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    }
    .meme-viewer-content {
        min-height: calc(100dvh - 60px);
        padding-bottom: 60px;
    }
    .button-container {
        flex-direction: column;
        gap: 6px;
    }
}

/* Ensure header remains below the meme viewer */

.sticky-header,
.header-content,
.button-group {
    z-index: 1000;
}

/* Ensure gallery container doesnâ€™t interfere */

#gallery-container.active {
    display: block !important;
    position: relative;
    z-index: 1;
}

@media (max-width:768px) {
    #gallery {
        contain-intrinsic-size: 150px 150px;
        content-visibility: auto;
        grid-template-columns: repeat(3, 1fr);
    }
    #gallery img,
    #gallery video {
        height: 150px;
        max-width: 150px;
        transform: translateZ(0);
        width: 150px;
        will-change: transform, opacity;
    }
    /* ... */
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toast {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: var(--text-white);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    border: 2px solid var(--sidebar-red);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-red), inset 0 0 5px rgba(82, 153, 82, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 350px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.info {
    border-color: var(--sidebar-red);
}

.toast.success {
    border-color: #00cc00;
    box-shadow: 0 4px 12px rgba(0, 204, 0, 0.5), inset 0 0 5px rgba(0, 204, 0, 0.3);
}

.toast.error {
    border-color: #ff3333;
    box-shadow: 0 4px 12px rgba(255, 51, 51, 0.5), inset 0 0 5px rgba(255, 51, 51, 0.3);
}

.toast-icon {
    font-size: 1.2em;
}

.iphone-save-instructions {
    color: var(--text-white);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    text-align: center;
    margin-top: 10px;
    display: none;
}

@media only screen and (max-width: 480px) {
    .toast-container {
        bottom: 70px;
        right: 10px;
        left: 10px;
    }
    .toast {
        font-size: 0.9em;
        padding: 10px 15px;
        max-width: 100%;
    }
    .toast-icon {
        font-size: 0.85em;
        letter-spacing: 0.5px;
    }
    .iphone-save-instructions {
        font-size: 0.9em;
    }
}

/* Override sidebar z-index */

/* Meme viewer styles */

.meme-viewer-content {
    justify-content: center;
    margin: 0 auto;
    max-width: 1200px;
    min-height: calc(100vh - 120px);
    padding: 20px;
    text-align: center;
}

.meme-viewer {
    align-items: center;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    overflow: visible;
    width: 100%;
    background: rgba(185, 11, 42, 0.6);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(82, 153, 82, 0.3);
}

.meme-viewer img,
.meme-viewer video {
    border: 5px solid #b90b2a;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
    box-sizing: border-box;
    display: block;
    margin: 20px auto;
    max-height: 100%;
    max-width: 100%;
    transform: translateZ(0);
    transition: transform 0.05s ease-in-out, box-shadow 0.1s ease-in-out;
    will-change: transform, box-shadow;
}

.meme-viewer img:hover,
.meme-viewer video:hover {
    box-shadow: 0 6px 12px rgba(185, 11, 42, 0.5);
    transform: scale(1.02);
}

.meme-viewer .media-caption {
    color: #fff;
    font-size: 1.2em;
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin-top: 10px;
    padding: 8px;
}

.loading-spinner {
    border: 4px solid #1a1a1a;
    border-top: 4px solid #b90b2a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.iphone-save-instructions {
    display: none;
    color: #fff;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    margin-top: 10px;
    text-align: center;
}

@media (max-width: 480px) {
    .meme-viewer {
        background: rgba(185, 11, 42, 0.6);
        padding: 15px;
        border-radius: 10px;
        box-shadow: 0 0 15px rgba(82, 153, 82, 0.3);
    }
    .meme-viewer img,
    .meme-viewer video {
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
        margin: 10px auto;
        max-height: 300px;
        max-width: 300px;
        transform: translateZ(0);
        will-change: transform, box-shadow;
    }
}

/* Override sidebar z-index for all views */

/* Meme viewer styles */

#meme-viewer-container {
    background: #000 !important;
}

.meme-viewer-content {
    justify-content: center;
    margin: 0 auto;
    max-width: 1200px;
    min-height: calc(100vh - 120px);
    padding: 20px;
    text-align: center;
    background: #000;
}

.meme-viewer {
    align-items: center;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    overflow: visible;
    width: 100%;
    background: rgba(185, 11, 42, 0.6);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(82, 153, 82, 0.3);
    z-index: 2000;
    /* Ensure it's below sidebar but above other elements */
}

.meme-viewer img,
.meme-viewer video {
    border: 5px solid #b90b2a;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
    box-sizing: border-box;
    display: block;
    margin: 20px auto;
    max-height: 100%;
    max-width: 100%;
    transform: translateZ(0);
    transition: transform 0.05s ease-in-out, box-shadow 0.1s ease-in-out;
    will-change: transform, box-shadow;
}

.meme-viewer img:hover,
.meme-viewer video:hover {
    box-shadow: 0 6px 12px rgba(185, 11, 42, 0.5);
    transform: scale(1.02);
}

.meme-viewer .media-caption {
    color: #fff;
    font-size: 1.2em;
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin-top: 10px;
    padding: 8px;
}

.loading-spinner {
    border: 4px solid #1a1a1a;
    border-top: 4px solid #b90b2a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.iphone-save-instructions {
    display: none;
    color: #fff;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    margin-top: 10px;
    text-align: center;
}

@media (max-width: 480px) {
    .meme-viewer {
        background: rgba(185, 11, 42, 0.6);
        padding: 15px;
        border-radius: 10px;
        box-shadow: 0 0 15px rgba(82, 153, 82, 0.3);
    }
    .meme-viewer img,
    .meme-viewer video {
        border: 3px solid #b90b2a;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
        margin: 10px auto;
        max-height: 300px;
        max-width: 300px;
        transform: translateZ(0);
        will-change: transform, box-shadow;
    }
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.video-play-overlay svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 1024px) {
    .video-play-overlay {
        width: 32px;
        height: 32px;
    }
    .video-play-overlay svg {
        width: 16px;
        height: 16px;
    }
}

@media (min-width:1025px) {
    .gallery-download-btn {
        background-color: var(--sidebar-red);
        border: none;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        color: var(--text-white);
        cursor: pointer;
        font-family: Oswald, sans-serif;
        font-size: 0.9em;
        padding: 8px 12px;
        position: absolute;
        bottom: 10px;
        left: 10px;
        transform: translateZ(0);
        transition: none;
        will-change: display;
        z-index: 5;
    }
    .gallery-download-btn:hover,
    .gallery-download-btn:focus {
        background-color: var(--hover-red);
        box-shadow: 0 4px 8px var(--shadow-red);
        outline: none;
    }
    .media-item {
        position: relative;
        /* Ensure positioning context for download button */
    }
}

@media (max-width:1024px) {
    .button-footer {
        transition: opacity 0.3s ease-in-out;
    }
    .gallery-wrapper.blurred {
        filter: blur(5px);
        opacity: 0.5;
        pointer-events: none;
    }
    .button-footer.blurred {
        filter: blur(5px);
        opacity: 0.5;
        pointer-events: none;
    }
    #search-container.blurred {
        filter: blur(5px);
        opacity: 0.5;
        pointer-events: none;
    }
    .overlay.active {
        background-color: rgba(0, 0, 0, 0.5);
        display: block;
        height: 100%;
        left: 0;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1049;
        pointer-events: auto;
    }
}

.gallery-download-btn:hover,
.gallery-download-btn:focus {
    background-color: var(--hover-red);
    box-shadow: 0 2px 4px var(--shadow-red);
    outline: none;
}

.media-item {
    position: relative;
    /* Ensure positioning context for download button and caption */
}

.media-caption {
    display: none;
    /* Hidden by default, shown on hover */
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--caption-grey);
    font-size: 0.9em;
    padding: 5px;
    text-align: center;
    word-wrap: break-word;
    letter-spacing: 0.5px;
    line-height: 1.4;
    z-index: 4;
}

@media (min-width:1025px) {
    .gallery-download-btn {
        background-color: var(--sidebar-red);
        border: none;
        border-radius: 4px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        padding: 4px;
        position: absolute;
        bottom: 32px;
        left: 19px;
        transform: translateZ(0);
        transition: none;
        will-change: display;
        z-index: 5;
        opacity: 0.8;
    }
    .gallery-download-btn:hover,
    .gallery-download-btn:focus {
        background-color: var(--hover-red);
        box-shadow: 0 2px 4px var(--shadow-red);
        outline: none;
    }
    .media-item {
        position: relative;
    }
    .media-caption {
        display: none;
        position: absolute;
        bottom: -26px;
        left: 0;
        right: 0;
        background-color: transparent;
        color: var(--caption-grey);
        font-size: 0.9em;
        padding: 5px;
        text-align: center;
        word-wrap: break-word;
        letter-spacing: 0.5px;
        line-height: 1.4;
        z-index: 4;
    }
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

#gallery {
    overflow-x: hidden;
    touch-action: pan-y pinch-zoom;
    transform-origin: center;
}

@media (max-width: 1024px) {
    .standalone-sidebar .menu-toggle {
        display: block !important;
        background-color: var(--sidebar-red) !important;
        color: var(--text-white) !important;
        border: 2px solid var(--hover-red) !important;
        border-radius: 5px !important;
        cursor: pointer !important;
        font-size: 1.5em !important;
        padding: 8px 12px !important;
        position: fixed !important;
        top: 10px !important;
        top: calc(10px + env(safe-area-inset-top)) !important;
        /* Account for safe areas */
        left: 10px !important;
        left: calc(10px + env(safe-area-inset-left)) !important;
        z-index: 10002 !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        width: 40px !important;
        height: 40px !important;
        line-height: 1 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
        transition: background-color 0.3s ease-in-out !important;
    }
    .standalone-sidebar .menu-toggle:hover,
    .standalone-sidebar .menu-toggle:focus {
        background-color: var(--hover-red) !important;
        outline: 2px solid var(--text-white) !important;
        outline-offset: 2px !important;
    }
    /* Prevent content overlap with menu button */
    .meme-viewer-content.standalone {
        padding-left: 0 !important;
        padding-top: 60px !important;
        /* Space for menu button */
    }
}

/* Toast notification styles */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    /* Semi-transparent black background */
    color: var(--text-white);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 350px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.download-started {
    border: 2px solid var(--sidebar-red);
    box-shadow: 0 4px 12px var(--shadow-red);
}

.toast.download-complete {
    border: 2px solid #00cc00;
    /* Changed border to green */
    box-shadow: 0 4px 12px rgba(0, 204, 0, 0.5);
}

@media (max-width: 480px) {
    .toast-container {
        bottom: 70px;
        right: 10px;
        left: 10px;
    }
    .toast {
        font-size: 0.9em;
        padding: 10px 15px;
        max-width: 100%;
    }
}

@media (min-width: 1025px) {
    #tags-menu {
        background: var(--bg-color);
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        padding: 10px;
        max-width: 600px;
        width: 100%;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        pointer-events: auto;
    }
    .tag-option {
        background: var(--sidebar-red);
        color: var(--text-white);
        border: none;
        border-radius: 5px;
        padding: 8px 12px;
        margin: 5px;
        cursor: pointer;
        font-family: 'Oswald', sans-serif;
        font-size: 0.85em;
        letter-spacing: 0.5px;
        pointer-events: auto;
    }
    .tag-option:hover {
        background: var(--hover-red);
    }
    .tags-columns {
        display: flex;
        justify-content: space-between;
    }
    .tags-column {
        flex: 1;
        margin: 0 5px;
    }
}

.caption-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    display: none;
    z-index: 10;
    white-space: nowrap;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

#gallery {
    overflow-x: hidden;
    touch-action: pan-y pinch-zoom;
    transform-origin: center;
}

@media (max-width: 1024px) {
    .standalone-sidebar .menu-toggle {
        display: block !important;
        background-color: var(--sidebar-red) !important;
        color: var(--text-white) !important;
        border: 2px solid var(--hover-red) !important;
        border-radius: 5px !important;
        cursor: pointer !important;
        font-size: 1.5em !important;
        padding: 8px 12px !important;
        position: fixed !important;
        top: 10px !important;
        top: calc(10px + env(safe-area-inset-top)) !important;
        /* Account for safe areas */
        left: 10px !important;
        left: calc(10px + env(safe-area-inset-left)) !important;
        z-index: 10002 !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        width: 40px !important;
        height: 40px !important;
        line-height: 1 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
        transition: background-color 0.3s ease-in-out !important;
    }
    .standalone-sidebar .menu-toggle:hover,
    .standalone-sidebar .menu-toggle:focus {
        background-color: var(--hover-red) !important;
        outline: 2px solid var(--text-white) !important;
        outline-offset: 2px !important;
    }
    /* Prevent content overlap with menu button */
    .meme-viewer-content.standalone {
        padding-left: 0 !important;
        padding-top: 60px !important;
        /* Space for menu button */
    }
    /* Position toast at top for mobile/tablet */
    .toast-container.top-position {
        bottom: auto;
        top: 70px;
        /* Below the menu button (40px height + padding) */
        right: 10px;
        left: 10px;
    }
    .toast-container.top-position .toast {
        transform: translateY(-20px);
        /* Fade in from above */
    }
    .toast-container.top-position .toast.show {
        transform: translateY(0);
        /* Fade to position */
    }
}

/* Toast notification styles */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    /* Semi-transparent black background */
    color: var(--text-white);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 350px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.download-started {
    border: 2px solid var(--sidebar-red);
    box-shadow: 0 4px 12px var(--shadow-red);
}

.toast.download-complete {
    border: 2px solid #00cc00;
    /* Changed border to green */
    box-shadow: 0 4px 12px rgba(0, 204, 0, 0.5);
}

@media (max-width: 480px) {
    .toast-container {
        bottom: 70px;
        right: 10px;
        left: 10px;
    }
    .toast {
        font-size: 0.9em;
        padding: 10px 15px;
        max-width: 100%;
    }
    /* Ensure top positioning takes precedence on smaller mobile devices */
    .toast-container.top-position {
        bottom: auto;
        top: 70px;
        right: 10px;
        left: 10px;
    }
}

@media (min-width: 1025px) {
    #tags-menu {
        background: var(--bg-color);
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        padding: 10px;
        max-width: 600px;
        width: 100%;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        pointer-events: auto;
    }
    .tag-option {
        background: var(--sidebar-red);
        color: var(--text-white);
        border: none;
        border-radius: 5px;
        padding: 8px 12px;
        margin: 5px;
        cursor: pointer;
        font-family: 'Oswald', sans-serif;
        font-size: 0.85em;
        letter-spacing: 0.5px;
        pointer-events: auto;
    }
    .tag-option:hover {
        background: var(--hover-red);
    }
    .tags-columns {
        display: flex;
        justify-content: space-between;
    }
    .tags-column {
        flex: 1;
        margin: 0 5px;
    }
}

.caption-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    display: none;
    z-index: 10;
    white-space: nowrap;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

#gallery {
    overflow-x: hidden;
    touch-action: pan-y pinch-zoom;
    transform-origin: center;
}

@media (max-width: 1024px) {
    .standalone-sidebar .menu-toggle {
        display: block !important;
        background-color: var(--sidebar-red) !important;
        color: var(--text-white) !important;
        border: 2px solid var(--hover-red) !important;
        border-radius: 5px !important;
        cursor: pointer !important;
        font-size: 1.5em !important;
        padding: 8px 12px !important;
        position: fixed !important;
        top: 10px !important;
        top: calc(10px + env(safe-area-inset-top)) !important;
        /* Account for safe areas */
        left: 10px !important;
        left: calc(10px + env(safe-area-inset-left)) !important;
        z-index: 10002 !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        width: 40px !important;
        height: 40px !important;
        line-height: 1 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
        transition: background-color 0.3s ease-in-out !important;
    }
    .standalone-sidebar .menu-toggle:hover,
    .standalone-sidebar .menu-toggle:focus {
        background-color: var(--hover-red) !important;
        outline: 2px solid var(--text-white) !important;
        outline-offset: 2px !important;
    }
    /* Prevent content overlap with menu button */
    .meme-viewer-content.standalone {
        padding-left: 0 !important;
        padding-top: 60px !important;
        /* Space for menu button */
    }
    /* Position toast at top for mobile/tablet */
    .toast-container.top-position {
        bottom: auto;
        top: 70px;
        /* Below the menu button (40px height + padding) */
        right: 10px;
        left: 10px;
    }
    .toast-container.top-position .toast {
        transform: translateY(-20px);
        /* Fade in from above */
    }
    .toast-container.top-position .toast.show {
        transform: translateY(0);
        /* Fade to position */
    }
}

/* Toast notification styles */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    /* Semi-transparent black background */
    color: var(--text-white);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 350px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.download-started {
    border: 2px solid var(--sidebar-red);
    box-shadow: 0 4px 12px var(--shadow-red);
}

.toast.download-complete {
    border: 2px solid #00cc00;
    /* Changed border to green */
    box-shadow: 0 4px 12px rgba(0, 204, 0, 0.5);
}

@media (max-width: 480px) {
    .toast-container {
        bottom: 70px;
        right: 10px;
        left: 10px;
    }
    .toast {
        font-size: 0.9em;
        padding: 10px 15px;
        max-width: 100%;
    }
    /* Ensure top positioning takes precedence on smaller mobile devices */
    .toast-container.top-position {
        bottom: auto;
        top: 70px;
        right: 10px;
        left: 10px;
    }
}

@media (min-width: 1025px) {
    #tags-menu {
        background: var(--bg-color);
        border: 2px solid var(--sidebar-red);
        border-radius: 8px;
        padding: 10px;
        max-width: 600px;
        width: 100%;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        pointer-events: auto;
    }
    .tag-option {
        background: var(--sidebar-red);
        color: var(--text-white);
        border: none;
        border-radius: 5px;
        padding: 8px 12px;
        margin: 5px;
        cursor: pointer;
        font-family: 'Oswald', sans-serif;
        font-size: 0.85em;
        letter-spacing: 0.5px;
        pointer-events: auto;
    }
    .tag-option:hover {
        background: var(--hover-red);
    }
    .tags-columns {
        display: flex;
        justify-content: space-between;
    }
    .tags-column {
        flex: 1;
        margin: 0 5px;
    }
    /* Always show captions on desktop without animation */
    .caption-tooltip {
        display: block !important;
        bottom: -35px;
        /* Adjusted spacing */
        font-size: 12px;
        /* Smaller font for subtlety */
        color: #b0b0b0;
        /* Softer gray for less contrast */
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
        /* Softer shadow for readability */
        opacity: 0.6;
        /* Even less opaque to be less distracting */
    }
}

.caption-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    display: none;
    z-index: 10;
    white-space: nowrap;
}

/* Remove borders and effects in full-screen mode */

:fullscreen,
:-webkit-full-screen,
:-moz-full-screen {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: 100% !important;
    background: #000 !important;
}

/* Ensure video-specific styles are applied in full-screen */

.meme-viewer video:fullscreen,
.meme-viewer video:-webkit-full-screen,
.meme-viewer video:-moz-full-screen {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: 100% !important;
    background: #000 !important;
}

/* Meme viewer container for both injected and standalone */

#meme-viewer-container.active,
.meme-viewer-content.standalone {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    background: #000 !important;
    z-index: 9999 !important;
    overflow-y: auto !important;
}

/* Center meme viewer content */

.meme-viewer-content,
.meme-viewer-content.standalone {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: calc(100dvh - 60px) !important;
    padding: 60px 10px 60px !important;
    box-sizing: border-box !important;
    background: #000 !important;
}

/* Meme viewer grey container */

.meme-viewer {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 800px !important;
    background: #1a1a1a !important;
    padding: 15px !important;
    border-radius: 10px !important;
    box-shadow: 0 0 15px rgba(82, 153, 82, 0.3) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Media constraints */

.meme-viewer img,
.meme-viewer video {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border: 3px solid #b90b2a !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7) !important;
    margin: 0 auto !important;
    transform: translateZ(0) !important;
    will-change: transform, box-shadow !important;
}

/* Caption */

.meme-viewer .media-caption {
    color: #fff !important;
    font-size: 1.2em !important;
    font-family: 'Oswald', sans-serif !important;
    text-transform: uppercase !important;
    text-shadow: 0 0 5px rgba(185, 11, 42, 0.7) !important;
    margin: 10px 0 !important;
    text-align: center !important;
}

/* Button container */

.button-container {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 15px !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* Desktop-specific adjustments */

@media (min-width: 1025px) {
    #meme-viewer-container.active {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        background: #000 !important;
    }
    .meme-viewer-content {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 20px !important;
        background: #000 !important;
    }
    .meme-viewer-content.standalone {
        position: static !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 20px !important;
        background: #000 !important;
        min-height: 100vh !important;
    }
    .meme-viewer {
        width: 100%;
        max-width: 800px;
        margin: 0 auto !important;
        background: #1a1a1a !important;
        padding: 20px !important;
        border-radius: 15px !important;
        box-shadow: 0 0 20px rgba(82, 153, 82, 0.3) !important;
    }
    .meme-viewer img,
    .meme-viewer video {
        max-width: 800px;
        max-height: 600px;
    }
    .button-container {
        flex-direction: row !important;
    }
}

/* Mobile-specific adjustments */

@media (max-width: 1024px) {
    #meme-viewer-container.active,
    .meme-viewer-content.standalone {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        background: #000 !important;
    }
    .meme-viewer-content {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
        align-items: center !important;
        background: #000 !important;
    }
    .meme-viewer {
        max-height: calc(100dvh - 150px) !important;
        overflow: hidden !important;
        background: #1a1a1a !important;
    }
}

@media (max-width: 480px) {
    .meme-viewer img,
    .meme-viewer video {
        max-width: calc(100% - 20px);
    }
    .meme-viewer {
        padding: 10px !important;
        background: #1a1a1a !important;
    }
}

/* Override styles to ensure consistent red border wrapping in injected viewer */

#media-container .media-item video {
    width: auto !important;
    max-width: 100% !important;
    border: 2px solid #b90b2a !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    margin: 20px auto !important;
    display: block !important;
}

/* Ensure the container doesnâ€™t interfere with video dimensions */

#media-container .media-item {
    width: auto !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

/* Remove border in full-screen mode for both standalone and injected viewers */

video:-webkit-full-screen,
video:fullscreen {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Additional browser-specific full-screen selectors */

video:-moz-full-screen,
video:-ms-fullscreen,
video:full-screen {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Ensure consistent border wrapping for both images and videos in injected and standalone viewers */

#media-container .media-item img,
#media-container .media-item video,
.meme-viewer-content .media-item img,
.meme-viewer-content .media-item video {
    width: auto !important;
    max-width: 100% !important;
    border: 2px solid #b90b2a !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    margin: 20px auto !important;
    display: block !important;
}

/* Ensure the container doesnâ€™t interfere with media dimensions */

#media-container .media-item,
.meme-viewer-content .media-item {
    width: auto !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

/* Remove border in full-screen mode for both standalone and injected viewers */

video:-webkit-full-screen,
video:fullscreen,
img:-webkit-full-screen,
img:fullscreen {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Additional browser-specific full-screen selectors */

video:-moz-full-screen,
video:-ms-fullscreen,
video:full-screen,
img:-moz-full-screen,
img:-ms-fullscreen,
img:full-screen {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Ensure consistent border wrapping for both images and videos in injected and standalone viewers */

#media-container .media-item img,
#media-container .media-item video,
.meme-viewer-content .media-item img,
.meme-viewer-content .media-item video {
    width: auto !important;
    max-width: 100% !important;
    border: 2px solid #b90b2a !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    margin: 20px auto !important;
    display: block !important;
}

/* Ensure the container doesnâ€™t interfere with media dimensions */

#media-container .media-item,
.meme-viewer-content .media-item {
    width: auto !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

/* Remove border in full-screen mode with higher specificity */

.meme-viewer-content .media-item video:-webkit-full-screen,
.meme-viewer-content .media-item video:fullscreen,
.meme-viewer-content .media-item img:-webkit-full-screen,
.meme-viewer-content .media-item img:fullscreen,
#media-container .media-item video:-webkit-full-screen,
#media-container .media-item video:fullscreen,
#media-container .media-item img:-webkit-full-screen,
#media-container .media-item img:fullscreen {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Additional browser-specific full-screen selectors */

.meme-viewer-content .media-item video:-moz-full-screen,
.meme-viewer-content .media-item video:-ms-fullscreen,
.meme-viewer-content .media-item video:full-screen,
.meme-viewer-content .media-item img:-moz-full-screen,
.meme-viewer-content .media-item img:-ms-fullscreen,
.meme-viewer-content .media-item img:full-screen,
#media-container .media-item video:-moz-full-screen,
#media-container .media-item video:-ms-fullscreen,
#media-container .media-item video:full-screen,
#media-container .media-item img:-moz-full-screen,
#media-container .media-item img:-ms-fullscreen,
#media-container .media-item img:full-screen {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Override rules for slideshow in about.html to ensure centering and border removal */

.slideshow-container .slideshow-slide {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.slideshow-container .slideshow-slide.active {
    display: flex !important;
}

.slideshow-container .slideshow-slide img,
.slideshow-container .slideshow-slide .video-container {
    border: 0 !important;
    border-color: transparent !important;
}

/* Override rules for slideshow in about.html to ensure correct visibility and transitions */

.slideshow-container .slideshow-slide {
    display: none !important;
    opacity: 0 !important;
    transform: scale(0.95) !important;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out !important;
}

.slideshow-container .slideshow-slide.active {
    display: flex !important;
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* Ensure Videos button and search bar are properly positioned on bobo-videos.html */

body:has(>div.container>main>header>div.sticky-header>div#search-container) #videos-btn,
body:has(>div.container>main>header>div.sticky-header>div#search-container) .search-input-container {
    position: static !important;
    /* Override any absolute positioning */
    margin: 0 auto !important;
    /* Ensure consistent centering */
    width: auto !important;
    /* Prevent width constraints from causing overlap */
}

/* Ensure search-input-container behaves as a block element within flex */

body:has(>div.container>main>header>div.sticky-header>div#search-container) .search-input-container {
    display: block !important;
}

/* Ensure search-controls maintains proper spacing and horizontal layout */

body:has(>div.container>main>header>div.sticky-header>div#search-container) .search-controls {
    display: flex !important;
    flex-direction: row !important;
    /* Restore side-by-side layout */
    gap: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    left: -25px;
    /* Maintain the 25px left shift from previous adjustments */
}

/* Mobile adjustments for Videos button */

@media (max-width: 1024px) {
    body:has(>div.container>main>header>div.sticky-header>div#search-container) #videos-btn {
        transform: scale(1) !important;
        /* Set scale to 1 on mobile/tablet */
        transform-origin: center !important;
    }
}

/* Hide clear search button on mobile/tablet */

@media (max-width: 1024px) {
    .clear-search-btn {
        display: none !important;
        /* Hide the red X button on mobile/tablet */
    }
}

/* Fix search container positioning and z-index */

#search-container {
    z-index: 1002 !important;
    /* Higher than .button-footer (1000) */
}

/* Simplify mobile positioning for search container */

@media (max-width: 1024px) {
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container {
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%) !important;
        /* Remove complex calc */
        margin: 0 auto;
        max-width: 300px;
        width: 90%;
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        justify-content: center;
        z-index: 1002 !important;
    }
    #search-container.active {
        animation: dropDown 0.2s ease-out forwards;
        display: flex !important;
        top: 6px;
    }
    #search-container:not(.active) {
        animation: closeUp 0.2s ease-in forwards;
        display: none !important;
        top: -40px;
    }
}

/* Remove left shift from search-controls */

.search-controls {
    left: 0 !important;
    /* Prevent misalignment */
}

/* Style manual search button */

#manual-search-btn {
    background-color: var(--sidebar-red);
    border: none;
    border-radius: 8px;
    color: var(--text-white);
    font-family: 'Oswald', sans-serif;
    font-size: 0.8em;
    padding: 4px 8px;
    cursor: pointer;
    position: absolute;
    right: 30px;
    /* After clear button */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1003;
}

#manual-search-btn:hover,
#manual-search-btn:focus {
    background-color: var(--hover-red);
    outline: none;
}

/* Adjust search input and clear button for manual button */

@media (max-width: 480px) {
    .search-input-container {
        max-width: 250px;
        width: 100%;
        position: relative;
    }
    #search-input {
        padding-right: 50px;
        /* Space for clear and manual buttons */
    }
    .clear-search-btn {
        right: 30px;
        /* Shift left for manual button */
    }
    #manual-search-btn {
        right: 10px;
    }
}

/* Ensure button-footer has lower z-index */

.button-footer {
    z-index: 1000 !important;
}

/* Ensure search-controls positioning is respected and consistent */

.search-controls {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
    width: auto;
}

/* Remove any forced left override and allow HTML style to take effect */

.search-controls {
    left: unset !important;
}

/* Ensure search container is centered without affecting search-controls */

@media (max-width: 1024px) {
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container {
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%) !important;
        margin: 0 auto;
        max-width: 300px;
        width: 90%;
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        justify-content: center;
        z-index: 1002 !important;
    }
    #search-container.active {
        animation: dropDown 0.2s ease-out forwards;
        display: flex !important;
        top: 6px;
    }
    #search-container:not(.active) {
        animation: closeUp 0.2s ease-in forwards;
        display: none !important;
        top: -40px;
    }
}

/* Ensure buttons and search input are properly sized and aligned */

#tags-btn,
#videos-btn {
    width: auto;
    min-width: 60px;
    padding: 4px 8px;
    font-size: 0.8em;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    #tags-btn,
    #videos-btn {
        min-width: 50px;
        font-size: 0.7em;
        height: 30px;
        padding: 4px 8px;
    }
    #search-input {
        max-width: 250px;
        width: 100%;
        padding-right: 40px;
    }
    .search-input-container {
        max-width: 250px;
        width: 100%;
    }
}

@media (min-width: 481px) and (max-width: 1024px) {
    #tags-btn,
    #videos-btn {
        min-width: 60px;
        font-size: 0.8em;
        height: 35px;
        padding: 4px 8px;
    }
    #search-input {
        max-width: 350px;
        width: 100%;
        padding-right: 60px;
    }
    .search-input-container {
        max-width: 350px;
        width: 100%;
    }
}

/* Adjust only the placeholder text to prevent clipping */

#search-input::placeholder {
    font-size: 0.7em;
    /* Reduce font size to fit the placeholder text */
    color: var(--caption-grey);
    opacity: 0.8;
}

/* Ensure the input field itself isn't causing the issue */

#search-input {
    padding-right: 40px;
    /* Ensure space for buttons like clear-search-btn */
}

/* Mobile-specific adjustments (max-width: 480px) */

@media (max-width: 480px) {
    #search-input::placeholder {
        font-size: 0.65em;
        /* Further reduce for mobile to fit "Search 5000+ Bobo Memes" */
    }
    #search-input {
        padding-right: 40px;
        /* Maintain space for buttons */
        max-width: 250px;
        /* Keep the existing width */
    }
}

/* Tablet adjustments (min-width: 481px and max-width: 1024px) */

@media (min-width: 481px) and (max-width: 1024px) {
    #search-input::placeholder {
        font-size: 0.7em;
    }
    #search-input {
        padding-right: 60px;
        max-width: 350px;
    }
}

/* Desktop adjustments (min-width: 1025px) */

@media (min-width: 1025px) {
    #search-input::placeholder {
        font-size: 0.9em;
    }
    #search-input {
        padding-right: 40px;
        width: 400px;
    }
}

/* Fix for desktop standalone sidebar */

@media (min-width: 1025px) {
    .standalone-sidebar {
        pointer-events: auto !important;
    }
}

/* ============================================
   TOPNAV - DESKTOP ONLY
   ============================================ */

@media (min-width: 1025px) {
    .topnav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100vw !important;
        height: 58px;
        background: #0e0e0e;
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        flex-wrap: nowrap;
        padding: 0 28px;
        border-bottom: 1px solid rgba(185, 11, 42, 0.4);
        z-index: 9999 !important;
        animation: none;
        box-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
        border-right: none;
        border-image: none;
        box-sizing: border-box;
    }
    .topnav .menu-toggle {
        display: none !important;
    }
    .topnav-logo {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        margin-left: 32px;
        margin-right: 16px;
        gap: 6px;
        text-decoration: none;
    }
    .topnav-logotype {
        height: 26px;
        width: auto;
        object-fit: contain;
        display: block;
        filter: invert(1) brightness(2);
    }
    .topnav-logo-img {
        height: 52px;
        width: 52px;
        object-fit: contain;
        display: block;
        filter: drop-shadow(0 1px 4px rgba(185, 11, 42, 0.35));
    }
    /* Spacer: takes all remaining space, pushes right group flush right */
    .topnav-spacer {
        flex: 1 1 auto;
        min-width: 0;
    }
    .topnav-primary,
    .topnav-secondary {
        display: flex;
        align-items: center;
        gap: 0;
        list-style: none;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
    }
    .topnav-secondary {
        margin-right: 32px;
    }
    .topnav-divider-grey {
        width: 1px;
        height: 16px;
        background: rgba(255, 255, 255, 0.15);
        margin: 0 14px;
        flex-shrink: 0;
        display: inline-block;
    }
    .topnav-primary li,
    .topnav-secondary li {
        list-style: none;
        margin: 0;
    }
    .topnav-primary li a,
    .topnav-secondary li a,
    .topnav-more-btn {
        color: rgba(255, 255, 255, 0.6);
        text-decoration: none;
        font-family: Oswald, sans-serif;
        font-size: 0.82em;
        font-weight: 500;
        letter-spacing: 1.5px;
        padding: 6px 14px;
        border-radius: 4px;
        transition: color 0.15s;
        white-space: nowrap;
        text-transform: uppercase;
        cursor: pointer;
        background: none;
        border: none;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    .topnav-primary li a:hover,
    .topnav-secondary li a:hover,
    .topnav-primary li a[aria-current="page"],
    .topnav-more-btn:hover,
    .topnav-more-btn.open {
        color: var(--text-white);
    }
    .topnav-more-btn svg {
        opacity: 0.5;
        transition: transform 0.2s;
    }
    .topnav-more-btn.open svg {
        transform: rotate(180deg);
        opacity: 1;
    }
    .topnav-divider {
        width: 1px;
        height: 24px;
        background: rgba(185, 11, 42, 0.6);
        margin: 0 16px;
        flex-shrink: 0;
    }
    .topnav-more {
        position: relative;
        list-style: none;
    }
    .topnav-dropdown {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: #161616;
        border: 1px solid rgba(185, 11, 42, 0.35);
        border-radius: 8px;
        padding: 8px;
        width: 260px;
        display: flex;
        flex-direction: column;
        gap: 2px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-6px);
        transition: opacity 0.15s, transform 0.15s;
        z-index: 10000 !important;
    }
    .topnav-dropdown.open {
        opacity: 1;
        pointer-events: all;
        transform: translateY(0);
    }
    .topnav-dd-label {
        font-size: 0.68em;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: rgba(185, 11, 42, 0.8);
        padding: 8px 12px 4px;
        font-weight: 500;
        text-align: left;
    }
    .topnav-dd-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2px;
    }
    .topnav-dd-logo {
        width: 20px;
        height: 20px;
        object-fit: contain;
        border-radius: 4px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.06);
    }
    .topnav-dd-item {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 8px 12px;
        border-radius: 5px;
        color: rgba(255, 255, 255, 0.65);
        font-size: 0.8em;
        letter-spacing: 1px;
        text-transform: uppercase;
        cursor: pointer;
        transition: background 0.1s, color 0.1s;
        text-decoration: none;
    }
    a.topnav-dd-item:hover {
        background: rgba(185, 11, 42, 0.18);
        color: var(--text-white);
    }
    .topnav-dd-item.coming-soon {
        color: rgba(255, 255, 255, 0.3);
        cursor: default;
    }
    .topnav-dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        flex-shrink: 0;
        background: var(--sidebar-red);
        display: inline-block;
    }
    .topnav-dd-divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.06);
        margin: 6px 0;
    }
    /* Page title in center of topnav */
    .topnav-page-title {
        color: rgba(255, 255, 255, 0.9);
        font-family: Impact, sans-serif;
        font-size: 1.85em;
        font-weight: 400;
        letter-spacing: 3px;
        text-transform: uppercase;
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0 20px;
        user-select: none;
        text-shadow: 0 0 16px rgba(185, 11, 42, 0.5);
    }
    /* Title group: absolutely centered, independent of left/right group widths */
    .topnav-center {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        align-items: center;
        pointer-events: none;
    }
    /* Hide h1 on desktop â€” page title is in the nav */
    main h1,
    .sticky-header h1 {
        display: none !important;
    }
    /* Red glow line disabled */
    .sticky-header::after {
        display: none !important;
        content: none !important;
    }
    /* Desktop footer search bar */
    .footer-search-bar {
        position: fixed;
        bottom: 90px;
        left: 50%;
        transform: translateX(-50%);
        background: #161616;
        border: 1px solid rgba(185, 11, 42, 0.4);
        border-radius: 10px;
        padding: 10px 14px;
        display: flex;
        align-items: center;
        gap: 6px;
        z-index: 9998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
        transform: translateX(-50%) translateY(10px);
        min-width: 320px;
    }
    .footer-search-bar.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
    #footer-tags-funnel-btn {
        background: none;
        border: none;
        color: var(--sidebar-red);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 32px;
        width: 32px;
        padding: 0;
        flex-shrink: 0;
        border-radius: 6px;
        transition: background 0.2s, color 0.2s;
    }
    #footer-tags-funnel-btn:hover {
        background: rgba(185, 11, 42, 0.15);
        color: #fff;
    }
    #footer-tags-funnel-btn svg {
        pointer-events: none;
    }
    #footer-search-input {
        background: #222;
        border: 1px solid rgba(185, 11, 42, 0.3);
        border-radius: 6px;
        color: #fff;
        font-family: Oswald, sans-serif;
        font-size: 0.9em;
        letter-spacing: 1px;
        outline: none;
        padding: 7px 12px;
        flex: 1;
    }
    #footer-search-input:focus {
        border-color: rgba(185, 11, 42, 0.8);
    }
    .footer-tags-btn {
        background: rgba(185, 11, 42, 0.2);
        border: 1px solid rgba(185, 11, 42, 0.4);
        border-radius: 6px;
        color: rgba(255, 255, 255, 0.7);
        cursor: pointer;
        font-family: Oswald, sans-serif;
        font-size: 0.8em;
        letter-spacing: 1.5px;
        padding: 7px 14px;
        text-transform: uppercase;
        transition: background 0.15s, color 0.15s;
        white-space: nowrap;
    }
    .footer-tags-btn:hover {
        background: rgba(185, 11, 42, 0.4);
        color: #fff;
    }
    /* Tags menu opened from footer: fixed center overlay */
    #tags-menu.footer-tags-open {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 99999 !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
    .magnify-btn-desktop {
        background: rgba(255, 255, 255, 0.06);
        border: 2px solid rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        cursor: pointer;
        padding: 10px;
        transition: background 0.15s, border-color 0.15s;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .magnify-btn-desktop:hover {
        background: rgba(185, 11, 42, 0.2);
        border-color: rgba(185, 11, 42, 0.6);
    }
    .magnify-btn-desktop .magnify-icon {
        width: 28px;
        height: 28px;
        object-fit: contain;
    }
    /* Main content sits below the fixed topnav instead of beside a sidebar */
    main {
        margin-left: 0;
        margin-top: 58px;
    }
    /* Tighten header spacing on desktop */
    .header-content {
        padding-top: 16px !important;
        gap: 12px !important;
    }
    .sticky-header {
        padding-top: 0 !important;
    }
    #gallery {
        grid-template-columns: repeat(6, minmax(180px, 1fr)) !important;
    }
    /* Search button visible on desktop */
    #search-btn {
        display: inline-flex !important;
    }
    /* Sticky header fades out on scroll */
    .sticky-header {
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    }
    .sticky-header.scrolled-away {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
    }
    /* Desktop floating footer */
    .button-footer {
        display: flex !important;
        align-items: center;
        bottom: 28px;
        gap: 12px;
        justify-content: center;
        left: 50%;
        position: fixed;
        transform: translateX(-50%);
        z-index: 9998;
        opacity: 1 !important;
        pointer-events: auto !important;
        transition: filter 0.6s ease;
        background: rgba(14, 14, 14, 0.55);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(185, 11, 42, 0.25);
        border-radius: 12px;
        padding: 8px 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
    .button-footer.desktop-visible {
        opacity: 1 !important;
        pointer-events: auto !important;
        transition: opacity 0.15s ease !important;
        animation: none !important;
    }
    .button-footer .menu-btn {
        display: none !important;
    }
    .button-footer .top-btn-mobile,
    .button-footer .latest-btn-mobile,
    .button-footer .random-meme-btn-mobile,
    .button-footer .magnify-btn-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* Hide on mobile */

/* Make Invest Like Bobo image 40% larger */

.stats-widget img {
    max-width: 392px !important;
}

@media (max-width: 1024px) {
    .stats-widget img {
        max-width: 308px !important;
    }
}

@media (max-width: 480px) {
    .stats-widget img {
        max-width: 252px !important;
    }
}

/* * BOBO COUNCIL IMAGE SIZING OVERRIDES 
 * -----------------------------------
 * These rules override the fixed dimensions set earlier in the <style> block 
 * to allow the 'Invest like Bobo' image to display larger. 
 */

/* 1. Allow the stats/image widgets to grow taller (desktop/general) */

.market-cap-widget,
.stats-widget {
    /* Override max-height: 400px !important; */
    max-height: none !important;
    height: auto !important;
}

/* 2. Maximize the image size (desktop/general) */

.stats-widget img {
    /* Override max-width: 280px !important; */
    max-width: 100% !important;
}

/* 3. Mobile overrides: Maximize image size on smaller screens */

@media (max-width: 1024px) {
    .stats-widget img {
        /* Override max-width: 220px !important; */
        max-width: 100% !important;
        max-height: none !important;
    }
    /* Optional: If the widget is too small, increase its padding or min-height */
    .market-cap-widget,
    .stats-widget {
        min-height: 250px !important;
        /* Adjust if the image is still too small due to container size */
    }
}

/* ========================================
   EXTREME BRUTE FORCE MODAL OVERFLOW FIX
   This is a highly aggressive fix targeting the 
   modal content container to force scrolling.
   ======================================== */

.roadmap-modal-content {
    /* 1. Force the container to respect the maximum viewport height */
    max-height: 85vh !important;
    /* 2. Force scrolling on the container if the content exceeds max-height */
    overflow-y: auto !important;
    /* 3. Ensure no minimum height is interfering */
    min-height: 0 !important;
    /* 4. Improve touch scrolling on mobile */
    -webkit-overflow-scrolling: touch !important;
    /* 5. Ensure it is displayed as a block element */
    display: block !important;
}

/* 6. Target the immediate text paragraphs/divs and prevent them 
      from expanding the parent if they have fixed heights/margins */

.roadmap-content,
.roadmap-modal-content>div,
.roadmap-modal-content p {
    box-sizing: border-box !important;
    max-height: 100% !important;
    height: auto !important;
    overflow-y: visible !important;
}

/* 7. Final, general fallback to ensure the parent container (the overlay) 
      doesn't cause the body to scroll */

.roadmap-modal {
    max-height: 100vh !important;
    overflow-y: auto !important;
    /* Allow the overlay to scroll if needed */
    overflow-x: hidden !important;
}

/* ========================================
   ULTRA-AGGRESSIVE GLOBAL MODAL CONTAINMENT FIX
   Forcibly ensures the modal fits the screen and manages its own scroll.
   ======================================== */

.roadmap-modal {
    height: 100vh !important;
    /* Force the overlay to use exactly 100% of the viewport height */
    overflow-y: hidden !important;
    /* Stop the overlay from scrolling the entire body */
    align-items: center !important;
    /* Ensure content is centered vertically */
}

.roadmap-modal-content {
    /* Force the modal box to respect the new 100vh limit, minus margin/padding/header */
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
    /* Force content inside the box to scroll */
    min-height: 0 !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
}

.video-wrapper {
    max-width: 1280px;
    margin: 0 auto;
}

.video-wrapper .video-js {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
    max-height: 720px;
}

/* Responsive sizing */

@media (max-width: 1400px) {
    .video-wrapper {
        max-width: 960px;
    }
    .video-wrapper .video-js {
        max-height: 540px;
    }
}

@media (max-width: 768px) {
    .video-wrapper {
        max-width: 100%;
        padding: 0 10px;
    }
    .video-wrapper .video-js {
        max-height: auto;
    }
}

.bobo-show-container .video-wrapper {
    width: 100%;
    max-width: 100%;
}

.bobo-show-container .video-js {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
}

/* Override Video.js default dimensions */

.video-js.vjs-fluid,
.video-js.vjs-16-9,
.video-js.vjs-4-3 {
    width: 100% !important;
    height: auto !important;
    padding-top: 0 !important;
}

@media only screen and (max-width: 767px) {
    /* Target the container with extremely high specificity */
    body div.council-content div.bobo-show-container {
        display: flex !important;
        flex-direction: column !important;
        order: 1 !important;
        margin-top: 20px !important;
        /* Force centering and prevent overflow */
        width: 100% !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 10px !important;
        /* Safety gutter */
        padding-right: 10px !important;
        /* Safety gutter */
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
    }
    /* Target the Video Wrapper and VideoJS element specifically */
    div.bobo-show-container .video-wrapper,
    div.bobo-show-container .video-js {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box !important;
    }
    /* Ensure the video-js internal component doesn't force a width */
    .video-js.vjs-fluid {
        padding-top: 56.25% !important;
        /* Forces 16:9 Aspect Ratio */
        width: 100% !important;
    }
    /* Fix the status bar to ensure it doesn't push the width out */
    div.bobo-show-container .bobo-status-bar {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        /* Allows items to wrap if screen is too narrow */
        justify-content: space-between !important;
        box-sizing: border-box !important;
    }
    /* Target the first status-item (Status: LIVE) */
    .bobo-status-bar .status-item:nth-child(1) {
        display: none !important;
    }
    /* Target the second status-item (Bobo Chat) */
    .bobo-status-bar .status-item:nth-child(2) {
        display: none !important;
    }
    /* Ensure the remaining "Current Phase" item centers itself */
    .bobo-status-bar .status-item:nth-child(3) {
        width: 100% !important;
        text-align: center !important;
    }
    /* Completely remove the entire status bar area on mobile */
    div.bobo-show-container .bobo-status-bar {
        display: none !important;
    }
}

/* Hide the CSS pseudo-element when JS link is active */

/* Mobile sidebar link styling */

/* ========================================
   FIX: body has position:relative + overflow-x:hidden
   which creates a containing block for fixed elements on some browsers.
   ======================================== */

body:has(.sticker-modal.active),
body:has(.bobros-modal.active) {
    position: static !important;
}

.sticker-modal.active,
.bobros-modal.active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
}

/* ============================================
   DESKTOP SCROLL EFFECTS
   ============================================ */

@media (min-width: 1025px) {
    /* Topnav blurs on scroll */
    .topnav {
        transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease !important;
    }
    .topnav.scrolled {
        background: rgba(14, 14, 14, 0.72) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        box-shadow: 0 2px 24px rgba(0, 0, 0, 0.7) !important;
    }
    /* Footer container: hidden by default, flex when scrolled */
    .button-footer {
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transition: filter 0.6s ease !important;
    }
    /* Glow: 24hr intro pulse */
    .button-footer.dock-glow {
        animation: dockNeonPulse 1.2s ease-in-out infinite alternate !important;
    }
    @keyframes dockNeonPulse {
        from {
            filter: drop-shadow(0 0 10px rgba(185, 11, 42, 1)) drop-shadow(0 0 25px rgba(185, 11, 42, 0.65));
        }
        to {
            filter: drop-shadow(0 0 28px rgba(185, 11, 42, 1)) drop-shadow(0 0 55px rgba(185, 11, 42, 1));
        }
    }
    /* Legacy state classes â€” all kept visible */
    .button-footer.desktop-pulse,
    .button-footer.desktop-resting,
    .button-footer.desktop-gone,
    .button-footer.desktop-visible {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    /* Hover handled by JS mouseenter/mouseleave only */
    @keyframes footerPulseIn {
        0% {
            opacity: 0;
            box-shadow: none;
        }
        15% {
            opacity: 1;
            box-shadow: 0 0 20px rgba(185, 11, 42, 0.8), 0 0 40px rgba(185, 11, 42, 0.4);
        }
        40% {
            opacity: 1;
            box-shadow: 0 0 10px rgba(185, 11, 42, 0.3);
        }
        65% {
            opacity: 1;
            box-shadow: 0 0 20px rgba(185, 11, 42, 0.8), 0 0 40px rgba(185, 11, 42, 0.4);
        }
        100% {
            opacity: 0.3;
            box-shadow: none;
        }
    }
    .button-footer .top-btn-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 48px !important;
        width: 48px !important;
        padding: 10px !important;
        background-color: var(--sidebar-red) !important;
        border-radius: 12px !important;
        border: none !important;
    }
    .button-footer .top-btn-mobile svg {
        width: 22px !important;
        height: 22px !important;
    }
    .button-footer .top-btn-mobile svg path {
        fill: #ffffff !important;
    }
    .button-footer .latest-btn-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 48px !important;
        width: auto !important;
        padding: 10px 22px !important;
        font-size: 1.05em !important;
    }
    .button-footer .random-meme-btn-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 48px !important;
        width: auto !important;
        padding: 10px 22px !important;
        font-size: 0.85em !important;
    }
    .button-footer .magnify-btn-desktop {
        height: 48px !important;
        width: 48px !important;
        padding: 10px !important;
        border-radius: 12px !important;
    }
    .button-footer .menu-btn {
        display: none !important;
    }
}

/* â”€â”€ Hide top button group on desktop â”€â”€ */

@media (min-width: 1025px) {
    .sticky-header .button-group {
        display: none !important;
    }
}

/* â•â• DESKTOP DOCK: stealth/visible/glow states â•â• */

@media (min-width: 1025px) {
    .button-footer.dock-stealth {
        opacity: 0.3 !important;
        transition: opacity 0.6s ease !important;
    }
    .button-footer.dock-visible {
        opacity: 1 !important;
        transition: opacity 0.15s ease !important;
    }
    .button-footer.dock-glow {
        opacity: 1 !important;
        animation: dockNeonPulse2 1.2s ease-in-out infinite alternate !important;
        transition: none !important;
    }
    @keyframes dockNeonPulse2 {
        from {
            filter: drop-shadow(0 0 8px rgba(185, 11, 42, 0.8)) drop-shadow(0 0 20px rgba(185, 11, 42, 0.5));
        }
        to {
            filter: drop-shadow(0 0 24px rgba(185, 11, 42, 1)) drop-shadow(0 0 48px rgba(185, 11, 42, 0.9));
        }
    }
    .FIXME-SELECTOR-1:hover {
        background-color: var(--hover-red) !important;
        outline: none !important;
    }
}

/* â•â• FEELS MODAL â•â• */

.feels-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.feels-modal.active {
    display: flex;
}

.feels-modal-content {
    background: #1a1a1a;
    border: 1px solid var(--sidebar-red);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    max-width: 560px;
    width: 90%;
    padding: 40px;
    position: relative;
}

.feels-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(185, 11, 42, 0.3);
}

.feels-modal-title {
    color: #fff;
    font-family: Impact, sans-serif;
    font-size: 2em;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    text-align: center;
    flex: 1;
}

.modal-divider-feels {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--sidebar-red), transparent);
    margin: 16px auto;
    border-radius: 2px;
}

.feels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.feels-option {
    background: rgba(185, 11, 42, 0.08);
    border: 2px solid rgba(185, 11, 42, 0.35);
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05em;
    font-weight: 400;
    padding: 14px 8px;
    text-align: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.feels-option:hover,
.feels-option:focus {
    background: rgba(185, 11, 42, 0.25);
    border-color: var(--sidebar-red);
    box-shadow: 0 0 10px rgba(185, 11, 42, 0.4);
    color: #fff;
    outline: none;
}

.feels-option.active-feel {
    background: var(--sidebar-red);
    border-color: var(--sidebar-red);
    color: #fff;
    box-shadow: 0 0 14px rgba(185, 11, 42, 0.6);
}

.feels-hint {
    color: #666;
    font-family: 'Oswald', sans-serif;
    font-size: 0.85em;
    text-align: center;
    margin: 0;
}

@media (min-width: 1025px) {
    /* FIX: Added missing selector here */
    .FIXME-SELECTOR-2 {
        background-color: var(--sidebar-red) !important;
        color: #fff !important;
        font-family: Impact, sans-serif !important;
        font-size: 16px !important;
        letter-spacing: 1px !important;
        padding: 6px 16px !important;
        height: auto !important;
        width: auto !important;
        border: none !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
    /* FIX: Added missing selector and closing bracket here */
    .FIXME-SELECTOR-2:hover {
        background-color: var(--hover-red) !important;
        outline: none !important;
    }
}

/* --- Bobo Memes Red Toggle Design Clean Up --- */

.sticky-header,
.topnav {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.red-nav-active .sticky-header,
body.red-nav-active .topnav {
    background-color: var(--sidebar-red, #b90b2a) !important;
    border-bottom: 2px solid #1a1a1a !important;
}

/* Isolate the center title text with clean dark dividing lines */

body.red-nav-active .topnav-center,
body.red-nav-active .sticky-header h1 {
    border-left: 2px solid #1a1a1a !important;
    border-right: 2px solid #1a1a1a !important;
    padding: 0 30px !important;
    background: #111111 !important;
}

/* Give the nav lists a distinct look so the red acts as structural framing */

body.red-nav-active .topnav-primary,
body.red-nav-active .topnav-secondary {
    background: #161616 !important;
    border-radius: 4px;
    padding: 4px 12px !important;
}

/* FEELS BTN FINAL */

@media (min-width: 1025px) {
    /* FIX: Added missing selector here (likely your feels button class) */
    .FIXME-SELECTOR-3 {
        height: 40px !important;
        width: 90px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
}

/* --- Smart Auto-Hiding Navigation Bar --- */

.topnav {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease !important;
    border-bottom: 1px solid var(--sidebar-red, #b90b2a) !important;
}

/* Slide it completely out of view except for the bottom 6px red boundary border */

.topnav.nav-collapsed {
    transform: translateY(calc(-100% + 1px)) !important;
}

/* Ensure Bobo logo or center text element anchors cleanly at the top of the collapsed sliver if needed */

.topnav.nav-collapsed .topnav-logo-img {
    transform: translateY(12px) scale(0.6);
    transition: transform 0.4s ease;
    cursor: pointer;
}

/* â•â• MORE SIDEBAR â•â• */

.more-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10998;
    backdrop-filter: blur(2px);
}

.more-overlay.active {
    display: block;
}

.more-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    height: 100vh;
    background: #111;
    border-left: 1px solid rgba(185, 11, 42, 0.4);
    z-index: 10999;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 0 0 40px;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.7);
}

.more-sidebar.open {
    transform: translateX(0);
}

.more-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(185, 11, 42, 0.25);
    position: sticky;
    top: 0;
    background: #111;
    z-index: 1;
}

.more-sidebar-title {
    font-family: Impact, sans-serif;
    font-size: 1.6em;
    letter-spacing: 2px;
    color: #fff;
}

.more-sidebar-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.4em;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.more-sidebar-close:hover {
    color: var(--sidebar-red);
}

.more-sidebar-section-label {
    font-size: 0.68em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(185, 11, 42, 0.8);
    padding: 16px 24px 8px;
    font-weight: 500;
}

.more-sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 16px 24px;
}

/* 3x2 cards grid */

.more-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 16px;
}

.more-card {
    position: relative;
    aspect-ratio: 3 / 2;
    border-radius: 8px;
    overflow: hidden;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #5e5e5e47;
    background-position: center;
    text-decoration: none;
    display: block;
    border: 1px solid rgba(185, 11, 42, 0.2);
    transition: border-color 0.2s, transform 0.2s;
}

.more-card:hover {
    border-color: var(--sidebar-red);
    transform: scale(1.03);
}

.more-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.05));
    transition: background 0.2s;
}

.more-card:hover .more-card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
}

.more-card-row {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 10px;
    gap: 8px;
}

.more-card-label {
    color: #fff;
    font-family: Impact, sans-serif;
    font-size: 0.85em;
    letter-spacing: 1px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    text-align: left;
}

.more-card-count {
    color: #e05555;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7em;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    text-align: right;
    white-space: nowrap;
}

/* Bobo Show card */

.more-boboshow-card {
    margin: 0 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(185, 11, 42, 0.35);
    background: rgba(185, 11, 42, 0.6);
}

.more-boboshow-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.more-boboshow-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Shrinks the full banner artwork to fit completely */
    background-color: #000000;
    /* Rich black sidebars */
    transition: opacity 0.5s ease;
}

.more-boboshow-thumb.fade-out .more-boboshow-thumb-img {
    opacity: 0;
}

.more-boboshow-live-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(185, 11, 42, 0.9);
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.75em;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.more-boboshow-embed {
    aspect-ratio: 16/9;
}

.more-boboshow-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.more-boboshow-link {
    display: block;
    padding: 12px 16px;
    color: #ccc;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9em;
    text-decoration: none;
    text-align: center;
    transition: color 0.2s;
}

.more-boboshow-link:hover {
    color: #fff;
}

/* â•â• SIDEBAR CORNER THUMBNAIL FIX â•â• */

.more-card {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: #55555522 !important;
    border: 1px solid #000000 !important;
    /* Sharp black card border */
    overflow: hidden !important;
    transform: translateZ(0);
    /* Forces hardware acceleration rendering to snap clip the border-radius */
}

.more-card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 22%, rgba(0, 0, 0, 0.05) 48%) !important;
}

.more-card-label {
    font-size: 0.85em !important;
    letter-spacing: 0.5px !important;
}

.more-card-count {
    font-size: 0.78em !important;
}

/* Dimensions Hotfix Override */

.more-coin-wrapper {
    margin: 0 16px !important;
    padding: 0 !important;
}

.more-coin-card {
    aspect-ratio: 1280 / 427 !important;
}

.more-coin-img {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0.3 !important;
    /* â† Global opacity (change as needed) */
    /* Optional smooth hover effect */
    transition: opacity 0.3s ease !important;
}

.more-coin-img:hover {
    opacity: 1 !important;
    /* Becomes fully visible on hover */
}

.more-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));
    gap: 13px;
    padding: 10px;
}

.more-card {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

header.header-content,
.sticky-header {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

header.header-content::after,
.sticky-header::after {
    display: none !important;
}

/* 1. Target the button via its class */

.feels-btn {
    font-size: 0;
    /* Hides the original text "Feels" */
}

/* 2. Inject the new text only on the index page */

.theme-red .feels-btn::before {
    content: "Sentiment";
    font-size: 14px;
    /* Restore the font size for the new text */
}

/* 3. Ensure other pages keep the original text */

body:not(.theme-red) .feels-btn {
    font-size: 16px;
    /* Reset font size for non-index pages */
}

/* â”€â”€ MOBILE: hide tags btn from search bar â”€â”€ */

@media (max-width: 1024px) {
    #tags-btn {
        display: none !important;
    }
}

/* â”€â”€ MOBILE: gallery-only scroll via flex layout â”€â”€ */

@media (max-width: 1024px) {
    main {
        display: flex !important;
        flex-direction: column !important;
        height: 100vh !important;
        overflow: hidden !important;
        padding: 0 0 70px !important;
        box-sizing: border-box !important;
    }
    .header-content {
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 1002 !important;
        background-color: var(--bg-color) !important;
    }
    .gallery-wrapper {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        min-height: 0 !important;
    }
}

/* â”€â”€ MOBILE: hide search container when not active â”€â”€ */

@media (max-width: 1024px) {
    #search-container:not(.active) {
        display: none !important;
    }
}

/* â”€â”€ MOBILE: hide up arrow and magnify from footer â”€â”€ */

@media (max-width: 1024px) {
    .button-footer .top-btn-mobile {
        display: none !important;
    }
}

/* â”€â”€ MOBILE: hide desktop top button â”€â”€ */

@media (max-width: 1024px) {
    #top-btn-desktop {
        display: none !important;
    }
}

/* â”€â”€ MOBILE: feels modal fix â”€â”€ */

@media (max-width: 1024px) {
    .feels-modal {
        padding: 12px !important;
        box-sizing: border-box !important;
    }
    .feels-modal-content {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 20px 16px !important;
        overflow-y: auto !important;
        max-height: 85vh !important;
    }
    .feels-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .feels-option {
        padding: 10px 4px !important;
        font-size: 0.9em !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(185, 11, 42, 0.3) !important;
    }
    .curated-liquidation-row {
        grid-column: span 3 !important;
    }
}

/* â”€â”€ MOBILE: hide desktop topnav elements inside the sidebar card â”€â”€ */

@media (max-width: 1024px) {
    .topnav-logo,
    .topnav-primary,
    .topnav-secondary,
    .topnav-spacer,
    .topnav-center,
    .topnav-more,
    .topnav-divider,
    .topnav-divider-grey,
    .topnav-page-title {
        display: none !important;
    }
}

/* --- "MORE" NAV IMAGE BRIGHTNESS ON HOVER --- */

/* Target images within the mobile navigation/more panel */

.mobile-nav-cards .mobile-nav-card,
.mobile-nav-coin img {
    /* Set a muted base brightness, e.g., 80% */
    filter: brightness(80%);
    /* Add a smooth transition */
    transition: filter 0.3s ease-in-out;
}

/* On hover, restore to full brightness */

.mobile-nav-cards .mobile-nav-card:hover,
.mobile-nav-coin:hover img {
    filter: brightness(100%);
}

/* --- "MORE" NAV IMAGE BRIGHTNESS HOVER --- */

.more-card {
    transition: filter 0.3s ease, transform 0.2s ease;
}

.more-card:hover {
    transform: scale(1.05);
}

.more-cards-grid .more-card:nth-child(1):hover {
    box-shadow: 0 0 24px 4px rgba(185, 11, 42, 0.7);
    border-color: rgba(185, 11, 42, 0.9);
}

.more-cards-grid .more-card:nth-child(2):hover {
    box-shadow: 0 0 24px 4px rgba(82, 153, 82, 0.7);
    border-color: rgba(82, 153, 82, 0.9);
}

.more-cards-grid .more-card:nth-child(3):hover {
    box-shadow: 0 0 24px 4px rgba(232, 156, 174, 0.7);
    border-color: rgba(232, 156, 174, 0.9);
}

.more-cards-grid .more-card:nth-child(4):hover {
    box-shadow: 0 0 24px 4px rgba(200, 120, 58, 0.7);
    border-color: rgba(200, 120, 58, 0.9);
}

.more-card-overlay {
    pointer-events: none;
}

/* â”€â”€ MORE SIDEBAR: 2x2 cards grid â”€â”€ */

.more-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
}

.more-card {
    aspect-ratio: 16/9 !important;
}

/* â”€â”€ MORE SIDEBAR: taller cards â”€â”€ */

.more-card {
    aspect-ratio: 4/3 !important;
}

/* â•â• MORE SIDEBAR: Bobo Council Resources (feels-style buttons) â•â• */

.more-resources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 0 16px;
}

.more-resource-btn {
    background: rgba(185, 11, 42, 0.08);
    border: 2px solid rgba(185, 11, 42, 0.35);
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    padding: 12px 8px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-resource-btn:hover,
.more-resource-btn:focus {
    background: rgba(185, 11, 42, 0.25);
    border-color: var(--sidebar-red);
    box-shadow: 0 0 10px rgba(185, 11, 42, 0.4);
    color: #fff;
    outline: none;
}

/* Social icon row */

.more-social-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 16px 0;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    padding: 8px;
}

.more-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s;
}

.more-social-icon:hover {
    background: rgba(185, 11, 42, 0.25);
}

.more-social-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* â•â• MORE SIDEBAR: Resource grid + tracker-btn (feels-style) â•â• */

.more-sidebar .resource-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 0 16px;
}

.more-sidebar .tracker-btn {
    background: rgba(185, 11, 42, 0.08);
    border: 2px solid rgba(185, 11, 42, 0.35);
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    padding: 14px 8px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-sidebar .tracker-btn:hover,
.more-sidebar .tracker-btn:focus {
    background: rgba(185, 11, 42, 0.25);
    border-color: var(--sidebar-red);
    box-shadow: 0 0 10px rgba(185, 11, 42, 0.4);
    color: #fff;
    outline: none;
}

/* Social pill row */

.more-sidebar .social-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 20px 16px 24px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    padding: 8px;
}

.more-sidebar .social-pill a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s;
}

.more-sidebar .social-pill a:hover {
    background: rgba(185, 11, 42, 0.25);
}

.more-sidebar .social-pill img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* â•â• TELEGRAM / MERCH / COLLECTIONS MODALS (ported from bobo-council) â•â• */

.sticker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.sticker-modal.active {
    display: flex;
}

.sticker-modal-content {
    background: linear-gradient(145deg, #2d2d2d, #1f1f1f);
    border: 3px solid var(--sidebar-red);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(185, 11, 42, 0.6);
    width: 95%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.sticker-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--sidebar-red), #ff4d4d, var(--sidebar-red));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.sticker-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.sticker-modal-header h2 {
    color: var(--text-white);
    font-family: Impact, sans-serif;
    font-size: 1.8em;
    margin: 0;
    text-shadow: 0 2px 8px rgba(185, 11, 42, 0.8);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sticker-modal .close-modal {
    background: var(--sidebar-red);
    border: 2px solid var(--hover-red);
    border-radius: 50%;
    color: var(--text-white);
    cursor: pointer;
    font-size: 1.5em;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sticker-modal .close-modal:hover {
    background: var(--hover-red);
    transform: scale(1.1);
}

.sticker-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.sticker-link {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(185, 11, 42, 0.6);
    border-radius: 10px;
    color: var(--text-white);
    font-family: 'Oswald', sans-serif;
    font-size: 0.95em;
    font-weight: 500;
    letter-spacing: 1px;
    padding: 14px 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    text-align: center;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sticker-link:hover {
    background: rgba(185, 11, 42, 0.45);
    border-color: rgba(255, 77, 77, 0.9);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(185, 11, 42, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* â”€â”€ More sidebar: don't blur modals that open on top â”€â”€ */

.more-sidebar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Ensure modals always render above the sidebar */

.sticker-modal,
.bobros-modal,
.roadmap-modal,
.feels-modal,
.contract-addr-modal,
#feels-modal {
    z-index: 99999 !important;
}

/* â•â• Sticker modal: 3-column override (wider modal, longer list) â•â• */

#sticker-modal .sticker-modal-content {
    max-width: 760px;
}

#sticker-modal .sticker-links {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 767px) {
    #sticker-modal .sticker-links {
        grid-template-columns: 1fr 1fr;
    }
}

/* â•â• Equal-width resource buttons â•â• */

.more-sidebar .resource-grid {
    grid-template-columns: 1fr 1fr !important;
}

.more-sidebar .tracker-btn {
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.3;
}

/* â”€â”€ DESKTOP DOCK: match up arrow + magnify to red buttons â”€â”€ */

@media (min-width: 1025px) {
    #top-btn-desktop,
    #magnify-btn-desktop {
        background-color: var(--sidebar-red) !important;
        border: none !important;
    }
    #top-btn-desktop svg path {
        fill: #ffffff !important;
    }
    #magnify-btn-desktop .magnify-icon,
    #magnify-btn-desktop svg {
        filter: brightness(0) invert(1) !important;
    }
}

/* â•â• MOBILE NAV CARD PANEL (slide-down dropdown, no bg image) â•â• */

.mobile-nav-card-panel {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-nav-card-panel {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        background: #161616;
        border-bottom: 1px solid rgba(185, 11, 42, 0.4);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
        z-index: 9997;
        opacity: 0;
        transition: max-height 0.32s ease, opacity 0.25s ease;
        padding: 0 16px;
        box-sizing: border-box;
    }
    .mobile-nav-card-panel.active {
        max-height: 85vh;
        overflow-y: auto;
        opacity: 1;
        padding: 70px 16px 24px;
    }
    .mnav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .mnav-link {
        display: block;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 8px;
        color: #fff;
        font-family: Oswald, sans-serif;
        font-size: 1.1em;
        font-weight: 600;
        padding: 14px 16px;
        text-align: center;
        text-decoration: none;
        transition: background 0.2s, border-color 0.2s;
    }
    .mnav-link:hover,
    .mnav-link.active {
        background: rgba(185, 11, 42, 0.2);
        border-color: var(--sidebar-red);
    }
    .mnav-more-toggle {
        background: var(--sidebar-red);
        border: none;
        border-radius: 8px;
        color: #fff;
        cursor: pointer;
        font-family: Impact, sans-serif;
        font-size: 1.15em;
        letter-spacing: 1px;
        margin-top: 12px;
        padding: 12px 20px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: background 0.2s;
    }
    .mnav-more-toggle:hover {
        background: var(--hover-red);
    }
    .mnav-more-toggle .mnav-chevron {
        transition: transform 0.25s ease;
        font-size: 0.7em;
    }
    .mnav-more-toggle.open .mnav-chevron {
        transform: rotate(180deg);
    }
    .mnav-more-panel {
        display: grid;
        grid-template-rows: 0fr;
        overflow: hidden;
        transition: grid-template-rows 0.3s ease;
        width: 100%;
    }
    .mnav-more-panel.open {
        grid-template-rows: 1fr;
        margin-top: 10px;
    }
    .mnav-more-panel>.mnav-cards-grid {
        min-height: 0;
    }
    .mnav-cards-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        width: 100%;
    }
    .mnav-card {
        position: relative;
        aspect-ratio: 4/3;
        background-size: cover;
        background-position: center;
        border-radius: 8px;
        border: 1px solid rgba(185, 11, 42, 0.4);
        display: flex;
        align-items: flex-end;
        justify-content: center;
        overflow: hidden;
        text-decoration: none;
        transition: border-color 0.2s, transform 0.2s;
    }
    .mnav-card:active {
        border-color: var(--sidebar-red);
        transform: scale(0.97);
    }
    .mnav-card::before {
        content: none;
    }
    .mnav-card-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
        pointer-events: none;
        z-index: 1;
    }
    .mnav-card span {
        position: relative;
        z-index: 2;
    }
    .mnav-card-row {
        position: relative;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        width: 100%;
        padding: 8px 10px;
        gap: 8px;
    }
    .mnav-card-label {
        color: #fff;
        font-family: Impact, sans-serif;
        font-size: 1em;
        letter-spacing: 1px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
        text-align: left;
    }
}

/* Update Bobo Council Resources to a 2-column grid */

.resource-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
}

.resource-grid .tracker-btn {
    width: 100% !important;
    margin: 0 !important;
}

/* â•â• Hide hamburger icon â€” MORE dock button opens mobile nav instead â•â• */

@media (max-width: 1024px) {
    .menu-toggle {
        display: none !important;
    }
}

/* â”€â”€ mnav safety guard removed â”€â”€ */

/* â•â• MOBILE NAV MODAL â•â• */

.mnav-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    z-index: 10000 !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

.mnav-modal.active {
    display: flex !important;
}

.mnav-modal-content {
    background: #1a1a1a !important;
    border: 1px solid var(--sidebar-red) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
    width: 90% !important;
    max-width: 420px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding: 30px !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.mnav-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 24px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid rgba(185, 11, 42, 0.3) !important;
}

.mnav-modal-header h2 {
    color: #fff !important;
    font-family: Impact, sans-serif !important;
    font-size: 1.7em !important;
    margin: 0 !important;
    text-shadow: 0 2px 8px rgba(185, 11, 42, 0.6) !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    flex: 1 !important;
    text-align: center !important;
}

.close-modal {
    background: transparent !important;
    border: none !important;
    color: #999 !important;
    font-size: 1.1em !important;
    cursor: pointer !important;
    padding: 2px 6px !important;
    line-height: 1 !important;
    transition: color 0.2s !important;
}

.close-modal:hover {
    color: var(--sidebar-red) !important;
}

.mnav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-bottom: 8px;
}

.mnav-link {
    display: block;
    background: rgba(185, 11, 42, 0.08);
    border: 2px solid rgba(185, 11, 42, 0.35);
    border-radius: 8px;
    color: #ccc;
    font-family: Oswald, sans-serif;
    font-size: 1.05em;
    font-weight: 600;
    padding: 13px 16px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.mnav-link:hover {
    background: rgba(185, 11, 42, 0.25);
    border-color: var(--sidebar-red);
    color: #fff;
}

.mnav-link.active {
    background: var(--sidebar-red);
    border-color: var(--sidebar-red);
    color: #fff;
}

.mnav-more-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--sidebar-red);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-family: Impact, sans-serif;
    font-size: 1.15em;
    letter-spacing: 1px;
    margin-top: 12px;
    padding: 13px 20px;
    width: 100%;
    transition: background 0.2s;
}

.mnav-more-toggle:hover {
    background: #a00;
}

.mnav-chevron {
    transition: transform 0.25s ease;
    font-size: 0.8em;
    display: inline-block;
}

.mnav-more-toggle.open .mnav-chevron {
    transform: rotate(180deg);
}

.mnav-cards-grid {
    display: grid;
    grid-template-rows: 0fr;
    grid-template-columns: 1fr 1fr;
    gap: 0 10px;
    width: 100%;
    overflow: hidden;
    transition: grid-template-rows 0.3s ease, margin-top 0.3s ease, gap 0.3s ease;
    margin-top: 0;
}

.mnav-cards-grid.open {
    grid-template-rows: 1fr;
    margin-top: 14px;
    gap: 6px;
}

.mnav-cards-grid>* {
    min-height: 0;
    overflow: hidden;
}

.mnav-card {
    position: relative;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: 1px solid rgba(185, 11, 42, 0.4);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.mnav-card:active {
    transform: scale(0.96);
    border-color: var(--sidebar-red);
}

.mnav-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.1));
}

.mnav-card span {
    position: relative;
    color: #fff;
    font-family: Impact, sans-serif;
    font-size: 1em;
    letter-spacing: 1px;
    padding: 8px;
    text-align: center;
    width: 100%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* â”€â”€ mnav: always-visible cards (no accordion) â”€â”€ */

.mnav-cards-always {
    grid-template-rows: 1fr !important;
    margin-top: 16px !important;
    gap: 10px !important;
    overflow: visible !important;
}

.mnav-cards-always .mnav-card {
    visibility: visible !important;
}

/* header: just the close button, no title */

.mnav-modal-header {
    justify-content: flex-end !important;
    border-bottom: none !important;
    margin-bottom: 8px !important;
    padding-bottom: 0 !important;
}

/* hide more-toggle since we removed it */

.mnav-more-toggle {
    display: none !important;
}

/* â•â• mnav redesign v2 â•â• */

.mnav-modal-content {
    padding: 20px !important;
    border-radius: 12px !important;
}

.mnav-modal-header {
    margin-bottom: 12px !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.mnav-link {
    padding: 10px 16px !important;
    font-size: 1em !important;
    letter-spacing: 0.5px !important;
    border-width: 1.5px !important;
}

.mnav-galleries-divider {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 16px 0 14px;
}

.mnav-galleries-divider::before,
.mnav-galleries-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(185, 11, 42, 0.35);
}

.mnav-galleries-divider span {
    color: #666;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.mnav-card {
    aspect-ratio: 1/1 !important;
    border-radius: 10px !important;
    border-width: 1.5px !important;
}

.mnav-cards-always {
    gap: 8px !important;
    margin-top: 0 !important;
}

/* â”€â”€ mnav card borders - solid â”€â”€ */

.mnav-card {
    border: 1.5px solid #b90b2a !important;
}

.mnav-card:hover {
    border-color: #e0102f !important;
}

/* â”€â”€ mnav card overlay - shorter + smaller label â”€â”€ */

.mnav-card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 22%, rgba(0, 0, 0, 0.05) 48%) !important;
}

.mnav-card span {
    font-size: 0.75em !important;
    padding: 6px !important;
    letter-spacing: 1.5px !important;
}

/* â•â• mnav modal: locked to red theme regardless of page brand colors â•â• */

#mnav-modal .mnav-modal-content {
    border-color: #b90b2a !important;
}

#mnav-modal .mnav-link.active {
    background: #b90b2a !important;
    border-color: #b90b2a !important;
    color: #fff !important;
}

#mnav-modal .mnav-link:hover {
    background: rgba(185, 11, 42, 0.25) !important;
    border-color: #b90b2a !important;
    color: #fff !important;
}

#mnav-modal .mnav-galleries-divider::before,
#mnav-modal .mnav-galleries-divider::after {
    background: rgba(185, 11, 42, 0.35) !important;
}

#mnav-modal .mnav-card {
    border-color: #b90b2a !important;
}

/* â•â• blur via backdrop-filter on the overlay â€” no layout shift â•â• */

#mnav-modal {
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    z-index: 99999 !important;
}

/* search-container hard-hide removed: bringing top search bar back */

/* â•â• collapse sticky-header on mobile â€” no ghost space â•â• */

@media (max-width: 1024px) {
    .sticky-header {
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        border: none !important;
        box-shadow: none !important;
    }
    .header-content {
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }
}

/* â•â• mobile: fix topnav pushing gallery down â•â• */

@media (max-width: 1024px) {
    .topnav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9000 !important;
    }
    main {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

/* â•â• mobile: remove gallery-container top margin â•â• */

@media (max-width: 1024px) {
    #gallery-container {
        margin-top: 0 !important;
    }
}

/* â•â• mobile: gallery bottom clearance for search bar + footer â•â• */

@media (max-width: 1024px) {
    #gallery-container {
        padding-bottom: 160px !important;
    }
}

/* â•â• mobile search bar: no auto-focus blink, ghostly styling â•â• */

@media (max-width: 1024px) {
    #footer-search-input {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        color: rgba(255, 255, 255, 0.35) !important;
        font-family: Oswald, sans-serif !important;
        font-size: 0.95em !important;
        font-weight: 400 !important;
        letter-spacing: 0.5px !important;
        outline: none !important;
        padding: 4px 0 !important;
        width: 100% !important;
        caret-color: transparent !important;
    }
    #footer-search-input:focus {
        color: rgba(255, 255, 255, 0.85) !important;
        caret-color: #b90b2a !important;
    }
    #footer-search-input::placeholder {
        color: rgba(255, 255, 255, 0.25) !important;
        font-style: italic !important;
    }
    /* prevent page jumping to input on mobile */
    #footer-search-bar {
        pointer-events: auto !important;
    }
    #footer-search-input:not(:focus) {
        pointer-events: none !important;
    }
    #footer-search-bar:active #footer-search-input,
    #footer-search-bar:focus-within #footer-search-input {
        pointer-events: auto !important;
        caret-color: #b90b2a !important;
        color: rgba(255, 255, 255, 0.85) !important;
    }
}

/* â•â• mobile: frosted glass dock â•â• */

@media (max-width: 1024px) {
    .button-footer {
        background: rgba(18, 18, 18, 0.85) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(185, 11, 42, 0.35) !important;
        border-radius: 20px !important;
        padding: 8px 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-around !important;
        gap: 4px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 94% !important;
        max-width: 480px !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
    }
    .button-footer>button,
    .button-footer>a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        border: none !important;
        border-radius: 12px !important;
        color: rgba(255, 255, 255, 0.55) !important;
        font-family: Oswald, sans-serif !important;
        font-size: 11px !important;
        font-weight: 500 !important;
        letter-spacing: 1.5px !important;
        text-transform: uppercase !important;
        padding: 8px 10px !important;
        min-width: 52px !important;
        cursor: pointer !important;
        transition: color 0.2s, background 0.2s !important;
        box-shadow: none !important;
    }
    .button-footer>button:hover,
    .button-footer>button:active {
        color: #fff !important;
        background: rgba(185, 11, 42, 0.2) !important;
    }
    /* magnify button keeps its icon, hide text */
    #magnify-btn-mobile {
        font-size: 0 !important;
    }
    #magnify-btn-mobile svg {
        display: block !important;
        width: 20px !important;
        height: 20px !important;
    }
}

/* â•â• mobile dock: menu-btn = hamburger icon, no text â•â• */

@media (max-width: 1024px) {
    #menu-btn {
        font-size: 0 !important;
        color: transparent !important;
        align-items: center !important;
        justify-content: center !important;
    }
    #menu-btn::before {
        content: "";
        display: block;
        width: 20px;
        height: 14px;
        margin: 0 auto;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14' viewBox='0 0 20 14'%3E%3Cline x1='0' y1='1' x2='20' y2='1' stroke='rgba(255,255,255,0.55)' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='0' y1='7' x2='20' y2='7' stroke='rgba(255,255,255,0.55)' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='0' y1='13' x2='20' y2='13' stroke='rgba(255,255,255,0.55)' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
    }
}

/* â•â• bobo index: red buttons â•â• */

@media (max-width: 1024px) {
    body.page-bobo .button-footer>button,
    body.page-bobo .button-footer>a {
        color: #fff !important;
        background: rgba(185, 11, 42, 0.75) !important;
        border: 1px solid rgba(185, 11, 42, 0.9) !important;
        border-radius: 12px !important;
    }
    body.page-bobo .button-footer>button:active {
        background: #b90b2a !important;
    }
}

/* hide-magnify-on-mobile removed: icon restored */

/* mobile magnify button hide removed: bringing icon back */

/* â•â• hide desktop magnify on mobile â•â• */

@media (max-width: 1024px) {
    #magnify-btn-desktop {
        display: none !important;
    }
}

/* â•â• FINAL: hide the desktop floating footer-search-bar on mobile (search moved back to top) â•â• */

@media (max-width: 1024px) {
    #footer-search-bar,
    .footer-search-bar {
        display: none !important;
    }
}

/* mobile-top-search-bar removed: reusing existing #search-container instead */

/* â•â• MOBILE: clean restyle of existing #search-container, top-positioned, desktop-matched look â•â• */

@media (max-width: 1024px) {
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container,
    body .sticky-header #search-container,
    #search-container {
        position: fixed !important;
        top: 56px !important;
        left: 16px !important;
        right: 16px !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        background: #161616 !important;
        border: 1px solid rgba(185, 11, 42, 0.4) !important;
        border-radius: 10px !important;
        padding: 8px 10px !important;
        z-index: 1002 !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        height: auto !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container.hidden,
    body .sticky-header #search-container.hidden,
    #search-container.hidden {
        display: none !important;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container.active,
    body .sticky-header #search-container.active,
    #search-container.active {
        display: flex !important;
        opacity: 1 !important;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container:not(.active),
    body .sticky-header #search-container:not(.active) {
        display: none !important;
    }
    #search-container .search-controls {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    #search-container #tags-btn {
        display: none !important;
    }
    #search-container .search-input-container {
        flex: 1 !important;
        position: relative !important;
    }
    #search-container .search-input-container form {
        display: flex !important;
        width: 100% !important;
    }
    #search-container #search-input {
        width: 100% !important;
        background: #222 !important;
        border: 1px solid rgba(185, 11, 42, 0.3) !important;
        border-radius: 6px !important;
        color: #fff !important;
        -webkit-text-fill-color: #fff !important;
        font-family: Oswald, sans-serif !important;
        font-size: 0.85em !important;
        letter-spacing: 0.5px !important;
        outline: none !important;
        padding: 7px 30px 7px 10px !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        opacity: 1 !important;
        height: auto !important;
    }
    #search-container #custom-placeholder {
        display: none !important;
    }
    #search-container .clear-search-btn {
        position: absolute !important;
        right: 6px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.5) !important;
        font-size: 0.8em !important;
    }
}

/* â•â• BOBO THEME: red buttons, white text, red glow â•â• */

@media (max-width: 1024px) {
    body.page-bobo .button-footer>button,
    body.page-bobo .button-footer>a {
        color: #fff !important;
        background: #b90b2a !important;
        border: none !important;
        box-shadow: 0 0 8px rgba(185, 11, 42, 0.5) !important;
    }
    body.page-bobo .button-footer>button:active {
        background: #8a081e !important;
        box-shadow: 0 0 16px rgba(185, 11, 42, 0.9) !important;
    }
    body.page-bobo .button-footer>button:focus,
    body.page-bobo .button-footer>button:focus-visible {
        background: #b90b2a !important;
        color: #fff !important;
        outline: none !important;
    }
    body.page-bobo .button-footer svg,
    body.page-bobo .button-footer svg path,
    body.page-bobo .button-footer svg circle,
    body.page-bobo .button-footer svg line {
        stroke: #fff !important;
        fill: none !important;
    }
}

/* â•â• mobile nav: overlay on gallery cards â•â• */

@media (max-width: 1024px) {
    .mnav-card-overlay {
        display: block !important;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 50px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%) !important;
        inset: unset !important;
    }
}

/* â•â• mnav: Option A â€” outlined inactive, solid red active â•â• */

#mnav-modal .mnav-link {
    background: transparent !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 13px !important;
    padding: 12px !important;
}

#mnav-modal .mnav-link:hover {
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

#mnav-modal .mnav-link.active {
    background: #b90b2a !important;
    border-color: #b90b2a !important;
    color: #fff !important;
}

#mnav-modal .mnav-galleries-divider::before,
#mnav-modal .mnav-galleries-divider::after {
    background: rgba(255, 255, 255, 0.1) !important;
}

#mnav-modal .mnav-galleries-divider span {
    color: #555 !important;
}

/* â•â• more-sidebar: Option B â€” ghost pill with red glow â•â• */

.more-sidebar .tracker-btn {
    background: transparent !important;
    border: 1px solid rgba(185, 11, 42, 0.5) !important;
    border-radius: 20px !important;
    color: #fff !important;
    font-size: 11px !important;
    padding: 10px !important;
    text-align: center !important;
    box-shadow: 0 0 8px rgba(185, 11, 42, 0.2) !important;
    transition: background 0.2s, box-shadow 0.2s !important;
}

.more-sidebar .tracker-btn:hover {
    background: rgba(185, 11, 42, 0.15) !important;
    box-shadow: 0 0 14px rgba(185, 11, 42, 0.5) !important;
    border-color: #b90b2a !important;
}

/* â•â• TRUE FINAL: kill dropDown/closeUp animation fighting our search bar position â•â• */

@media (max-width: 1024px) {
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container.active,
    body .sticky-header #search-container.active,
    #search-container.active {
        animation: none !important;
        position: fixed !important;
        top: 56px !important;
        left: 16px !important;
        right: 16px !important;
        transform: none !important;
        opacity: 1 !important;
    }
    body:not(:has(#latest-btn[aria-label*="Bobo collections"])) .sticky-header #search-container:not(.active),
    body .sticky-header #search-container:not(.active) {
        animation: none !important;
    }
}

/* â•â• NUCLEAR FINAL: guarantee #search-container is visible and positioned, no exceptions â•â• */

@media (max-width: 1024px) {
    html body div.sticky-header div#search-container.active,
    html body #search-container.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: 56px !important;
        left: 16px !important;
        right: 16px !important;
        width: auto !important;
        min-width: 200px !important;
        min-height: 40px !important;
        height: auto !important;
        max-width: none !important;
        transform: none !important;
        margin: 0 !important;
        background: #161616 !important;
        border: 1px solid rgba(185, 11, 42, 0.4) !important;
        border-radius: 10px !important;
        padding: 8px 10px !important;
        z-index: 99999 !important;
        box-sizing: border-box !important;
        animation: none !important;
    }
    html body div.sticky-header div#search-container.active .search-controls,
    html body #search-container.active .search-controls {
        position: static !important;
        left: auto !important;
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        gap: 8px !important;
    }
    html body div.sticky-header div#search-container.active .search-input-container,
    html body #search-container.active .search-input-container {
        position: static !important;
        display: block !important;
        width: 100% !important;
        flex: 1 !important;
    }
    html body div.sticky-header div#search-container.active #search-input,
    html body #search-container.active #search-input {
        display: block !important;
        width: 100% !important;
        min-height: 36px !important;
        background: #222 !important;
        color: #fff !important;
        -webkit-text-fill-color: #fff !important;
        border: 1px solid rgba(185, 11, 42, 0.3) !important;
        border-radius: 6px !important;
        padding: 0 30px 0 12px !important;
        box-sizing: border-box !important;
        font-size: 0.9em !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* â•â• MTB: brand new, conflict-free mobile top search bar wrapper â•â• */

@media (max-width: 1024px) {
    #mtb-wrap {
        position: fixed;
        top: 56px;
        left: 16px;
        right: 16px;
        z-index: 99999;
        display: none;
        background: #161616;
        border: 1px solid rgba(185, 11, 42, 0.4);
        border-radius: 10px;
        padding: 8px 10px;
        box-sizing: border-box;
    }
    #mtb-wrap.mtb-open {
        display: block;
    }
    #mtb-inner {
        width: 100%;
    }
    #mtb-inner {
        position: relative !important;
        display: block !important;
        width: 100% !important;
    }
    #mtb-inner form#search-form {
        all: revert !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        position: relative !important;
        margin: 0 !important;
    }
    #mtb-inner #tags-btn {
        display: none !important;
    }
    #mtb-inner #custom-placeholder {
        display: none !important;
    }
    #mtb-inner input#search-input {
        all: revert !important;
        width: 100% !important;
        background: #222 !important;
        color: #fff !important;
        -webkit-text-fill-color: #fff !important;
        border: 1px solid rgba(185, 11, 42, 0.3) !important;
        border-radius: 6px !important;
        padding: 8px 30px 8px 12px !important;
        font-size: 0.9em !important;
        font-family: Oswald, sans-serif !important;
        outline: none !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        height: auto !important;
        margin: 0 !important;
    }
    #mtb-inner .clear-search-btn {
        all: revert !important;
        position: absolute !important;
        right: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.5) !important;
        font-size: 0.8em !important;
        cursor: pointer !important;
    }
}

/* â•â• MTB FOLLOWUP: original #search-container always hidden on mobile now (its input lives in #mtb-wrap) â•â• */

@media (max-width: 1024px) {
    html body #search-container,
    html body .sticky-header #search-container,
    html body div.sticky-header div#search-container {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        pointer-events: none !important;
    }
}

/* â•â• hide captions on curated liquidation items â•â• */

.media-item[data-hide-caption="true"] .caption,
.media-item[data-hide-caption="true"] .meme-caption,
.media-item[data-hide-caption="true"] figcaption,
.media-item[data-hide-caption="true"] p {
    display: none !important;
}

/* â•â• topnav page title: clickable, same look as before â•â• */

a.topnav-page-title {
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer !important;
}

a.topnav-page-title:hover {
    opacity: 0.75 !important;
    transition: opacity 0.2s !important;
}

/* â•â• topnav page title: clickable, same look as before â•â• */

a.topnav-page-title {
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer !important;
}

a.topnav-page-title:hover {
    opacity: 0.75 !important;
    transition: opacity 0.2s !important;
}

/* â•â• topnav-center: allow clicks through to page title link â•â• */

.topnav-center {
    pointer-events: none !important;
}

.topnav-center a,
a.topnav-page-title {
    pointer-events: auto !important;
}

/* â•â• hide longs/shorts rekt buttons on all pages except index â•â• */

body:not(.page-bobo) .curated-liquidation-row,
body:not(.page-bobo) .liquid-longs,
body:not(.page-bobo) .liquid-shorts {
    display: none !important;
}

/* â•â• ULTRAWIDE: bigger memes, optimized columns â•â• */

/* 1440p ultrawide (2560px) â€” 7 columns, 320px images */

@media (min-width: 2560px) {
    #gallery {
        grid-template-columns: repeat(7, 1fr) !important;
    }
    #gallery img,
    #gallery video {
        height: 320px !important;
        max-width: 320px !important;
        width: 320px !important;
    }
}

/* Super ultrawide (3200px) â€” 8 columns, 360px images */

@media (min-width: 3200px) {
    #gallery {
        grid-template-columns: repeat(8, 1fr) !important;
    }
    #gallery img,
    #gallery video {
        height: 360px !important;
        max-width: 360px !important;
        width: 360px !important;
    }
}

/* 4K (3840px) â€” 10 columns, 400px images */

@media (min-width: 3840px) {
    #gallery {
        grid-template-columns: repeat(10, 1fr) !important;
    }
    #gallery img,
    #gallery video {
        height: 400px !important;
        max-width: 400px !important;
        width: 400px !important;
    }
}

/* â•â• feels modal: tabs â•â• */

.feels-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.feels-tab {
    flex: 1;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-family: Oswald, sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 10px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.feels-tab.active {
    background: #b90b2a;
    border-color: #b90b2a;
    color: #fff;
}

/* â•â• feels modal: tighter header when title hidden â•â• */

.feels-modal-header:has(.feels-modal-title[style*="none"]) {
    margin-bottom: 4px !important;
    padding-bottom: 0 !important;
}

.feels-tabs {
    margin-top: 4px !important;
}

/* â•â• feels modal: always hide title + divider, tabs handle context â•â• */

.feels-modal .feels-modal-title,
.feels-modal .modal-divider-feels {
    display: none !important;
}

/* â•â• search loading spinner â•â• */

.search-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.search-loading-overlay.active {
    display: flex;
}

.search-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(185, 11, 42, 0.2);
    border-top: 4px solid #b90b2a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.search-loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-family: Oswald, sans-serif;
    font-size: 0.95em;
    letter-spacing: 2px;
    text-transform: uppercase;
}

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

/* â•â• feels modal: smaller tag buttons to fit more â•â• */

.feels-grid-tags .feels-option {
    padding: 8px 6px !important;
    font-size: 0.78em !important;
    letter-spacing: 0.5px !important;
}

.feels-grid-tags {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
}

/* â•â• mnav: social links â•â• */

.mnav-socials {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mnav-social-link {
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.mnav-social-link:hover {
    color: #fff;
}

/* â•â• Space Grotesk: menus, modals, buttons â•â• */

.mnav-link,
.mnav-more-toggle,
.mnav-galleries-divider span,
.feels-modal-title,
.feels-option,
.feels-tab,
/* Primary action buttons â€” Space Grotesk Bold */

.button-footer>button,
.button-footer>a,
.mfd-tab,
.close-modal {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 700 !important;
}

/* Secondary interactive elements â€” Space Grotesk Regular */

.tag-option,
.more-sidebar-section-label,
.more-card-label,
.tracker-btn,
.last-updated-link,
#footer-search-input,
#search-input,
.search-loading-text,
.mfd-option,
.mnav-social-link {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 400 !important;
}

/* â•â• mobile dock: smaller button font â•â• */

@media (max-width: 1024px) {
    .button-footer>button,
    .button-footer>a {
        font-size: 9.9px !important;
    }
}

/* =============================================
   Desktop footer button font standardization
   ============================================= */

@media (min-width: 1025px) {
    #feels-btn::before {
        font-family: 'Space Grotesk', sans-serif !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px !important;
    }
    #latest-btn-mobile {
        font-family: 'Space Grotesk', sans-serif !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px !important;
    }
    #random-meme-btn-mobile {
        font-family: 'Space Grotesk', sans-serif !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px !important;
    }
}

/* â•â• Hide native search input clear button â•â• */

#footer-search-input::-webkit-search-cancel-button {
    display: none !important;
    -webkit-appearance: none !important;
}

#footer-search-input[type="search"]::-webkit-search-cancel-button {
    display: none !important;
}

/* â•â• Hide native search input clear button on all search inputs â•â• */

input[type="search"]::-webkit-search-cancel-button {
    display: none !important;
    -webkit-appearance: none !important;
}

/* â•â• desktop gallery: tighter gaps, 10% larger images â•â• */

@media (min-width: 1025px) and (max-width: 2559px) {
    #gallery {
        gap: 6px !important;
    }
    #gallery img,
    #gallery video {
        height: 188px !important;
        max-width: 188px !important;
        width: 188px !important;
    }
}

/* â•â• TABLET: bigger footer dock â•â• */

@media (min-width: 769px) and (max-width: 1024px) {
    .button-footer {
        padding: 10px 16px !important;
        gap: 8px !important;
        border-radius: 28px !important;
        width: 94% !important;
        max-width: 860px !important;
        bottom: 28px !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .button-footer>button,
    .button-footer>a {
        font-size: 16px !important;
        padding: 14px 20px !important;
        border-radius: 16px !important;
        min-width: 0 !important;
        flex: 1 1 0 !important;
        height: 54px !important;
    }
}

/* â•â• TABLET: nav modal cards larger â•â• */

@media (min-width: 769px) and (max-width: 1024px) {
    .mnav-modal-inner,
    .mnav-modal-content {
        width: 62vw !important;
        max-width: 62vw !important;
        padding: 24px !important;
    }
    .mnav-cards-grid {
        gap: 12px !important;
    }
    .mnav-card {
        aspect-ratio: 5/3 !important;
        border-radius: 12px !important;
    }
    .mnav-card-label {
        font-size: 1.1em !important;
        padding: 9px !important;
    }
    .mnav-link {
        font-size: 1.15em !important;
        padding: 15px !important;
    }
    .mnav-social-row a,
    .mnav-social-row svg {
        width: 30px !important;
        height: 30px !important;
    }
}

/* â•â• TABLET: gallery layout fix (769px-1024px) â•â• */

@media (min-width: 769px) and (max-width: 1024px) {
    #gallery {
        grid-template-columns: repeat(4, 1fr) !important;
        column-gap: 4px !important;
        row-gap: 4px !important;
        justify-items: stretch !important;
        padding: 4px !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    #gallery img,
    #gallery video {
        width: 100% !important;
        height: calc((100vw - 32px) / 4) !important;
        max-width: 100% !important;
        object-fit: cover !important;
    }
}

@media (max-width: 768px) {
    #gallery {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        padding: 4px !important;
    }
    #gallery img,
    #gallery video {
        width: 100% !important;
        height: calc((100vw - 32px) / 3) !important;
        max-width: 100% !important;
        object-fit: cover !important;
    }
}

/* â”€â”€ FINAL OVERRIDE: kill dead space above mobile nav links, guaranteed win via source order + !important â”€â”€ */

#mnav-modal .mnav-modal-header {
    margin-bottom: -8px !important;
    padding-bottom: 0 !important;
}

#mnav-modal .mnav-modal-content {
    gap: 8px !important;
}

/* â”€â”€ Remove the mobile nav close button entirely -- tap outside to close instead â”€â”€ */

#mnav-modal-close,
#mnav-modal .close-modal {
    display: none !important;
}