.meme-feed-page {
    max-width: 520px;
    margin: 0 auto;
    padding: 0.75rem 0.75rem 4rem;
    min-height: 70vh;
    color: #f1f5f9;
}

.meme-feed-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.meme-feed-back {
    color: var(--bs-body-color, #e2e8f0);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.85;
}

.meme-feed-back:hover {
    color: #34d399;
}

.meme-feed-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    color: #f8fafc;
}

.meme-feed-guest-hint {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: rgba(241, 245, 249, 0.95);
}

.meme-feed-link {
    color: #6ee7b7;
    font-weight: 600;
}

.meme-feed-link:hover {
    color: #a7f3d0;
}

.meme-feed-muted {
    color: rgba(226, 232, 240, 0.8) !important;
}

.meme-upload-panel .form-check-label,
.meme-upload-panel label {
    color: rgba(241, 245, 249, 0.95);
}

.meme-upload-panel a {
    color: #6ee7b7;
}

.meme-upload-panel {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
}

.meme-upload-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    color: inherit;
    font-weight: 600;
    padding: 0.25rem 0;
    cursor: pointer;
}

.meme-upload-toggle svg {
    transition: transform 0.2s;
}

.meme-upload-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.meme-feed-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.meme-slide {
    position: relative;
    border-radius: 16px;
    overflow: visible;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    scroll-margin-top: 1rem;
}

.meme-slide-img-wrap {
    position: relative;
    max-height: min(78vh, 720px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.meme-slide img {
    max-width: 100%;
    max-height: min(78vh, 720px);
    width: auto;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
    display: block;
}

.meme-slide-adult-blur .meme-slide-img-wrap img {
    filter: blur(22px);
    transform: scale(1.05);
}

.meme-slide-adult-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.meme-slide-meta {
    padding: 0.65rem 0.85rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 0;
}

.meme-slide-author {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #f8fafc;
}

.meme-slide-stats {
    color: rgba(226, 232, 240, 0.88);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.meme-slide-actions {
    padding: 0 0.85rem 0.85rem;
    position: relative;
    z-index: 4;
    border-radius: 0 0 16px 16px;
}

.meme-more-dd .dropdown-menu {
    z-index: 1080;
}

.meme-slide-actions-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.meme-slide-actions-spacer {
    flex: 1;
    min-width: 0;
}

.meme-vote-pair {
    display: inline-flex;
    align-items: stretch;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    overflow: hidden;
    background: rgba(30, 41, 59, 0.85);
}

.meme-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 42px;
    padding: 0;
    border: none;
    background: transparent;
    color: #e2e8f0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.meme-vote-btn:hover {
    background: rgba(51, 65, 85, 0.6);
    color: #fff;
}

.meme-vote-pair .meme-vote-btn + .meme-vote-btn {
    border-left: 1px solid rgba(148, 163, 184, 0.28);
}

.meme-vote-icon {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
}

.meme-vote-btn.active-like {
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
}

.meme-vote-btn.active-dislike {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
}

.meme-more-dd {
    flex-shrink: 0;
}

.meme-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(30, 41, 59, 0.85);
    color: #e2e8f0;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.meme-more-btn:hover,
.meme-more-btn:focus-visible {
    border-color: rgba(52, 211, 153, 0.55);
    color: #fff;
    background: rgba(51, 65, 85, 0.6);
    outline: none;
}

.meme-more-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.meme-more-menu .dropdown-item {
    font-size: 0.875rem;
}

.meme-more-menu .dropdown-item.fav-on {
    color: #fbbf24;
}

.meme-more-menu .dropdown-item:active {
    background-color: rgba(52, 211, 153, 0.25);
}

.meme-feed-loader,
.meme-feed-end {
    text-align: center;
    padding: 1.5rem;
    color: rgba(226, 232, 240, 0.55);
    font-size: 0.9rem;
}

.meme-feed-spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto;
    border: 3px solid rgba(52, 211, 153, 0.25);
    border-top-color: #34d399;
    border-radius: 50%;
    animation: meme-spin 0.7s linear infinite;
}

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

.badge-meme-18 {
    font-size: 0.65rem;
    vertical-align: middle;
    margin-left: 0.35rem;
}
