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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    /* Prevent content amplification/zoom */
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* Hide controls class */
.controls-hidden .header {
    display: none;
}

.controls-hidden .hamburger {
    display: none;
}

.controls-hidden .navigation-vertical {
    display: none;
}

.controls-hidden .post-indicator {
    display: none;
}

.controls-hidden .mobile-panel {
    display: none;
}

.controls-hidden .panel-overlay {
    display: none;
}

.controls-hidden .post-info {
    display: none;
}

.controls-hidden .post {
    height: 100vh;
}

.controls-hidden .main-content {
    margin-top: 0;
}

.controls-hidden #hamburgerBtn {
    display: none !important;
}
.controls-hidden .toggle-info-btn {
    display: none !important;
}

.search-container {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
}

#searchInput {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

#searchInput:focus {
    border-color: #ff4500;
    background: rgba(255, 255, 255, 0.15);
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.sort-filter {
    background: #1a1a1a;
    color: white;
    border: 2px solid #333;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    min-width: 80px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sort-filter:hover {
    border-color: #555;
    transform: translateY(-1px);
}

.sort-filter:focus {
    outline: none;
    border-color: #ff4500;
}

.sort-filter option {
    background: #1a1a1a;
    color: white;
}

.nsfw-filter {
    background: #1a1a1a;
    color: white;
    border: 2px solid #333;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    min-width: 100px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nsfw-filter:hover {
    border-color: #555;
    transform: translateY(-1px);
}

.nsfw-filter:focus {
    outline: none;
    border-color: #ff4500;
}

.nsfw-filter option {
    background: #1a1a1a;
    color: white;
}

#searchBtn, .mode-btn, .refresh-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: #ff4500;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

#searchBtn:hover, .mode-btn:hover, .refresh-btn:hover {
    background: #ff5722;
    transform: translateY(-1px);
}

.controls {
    display: flex;
    gap: 10px;
}

.mode-btn.active {
    background: #4caf50;
}

.install-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: #4caf50;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.install-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    margin-top: 80px;
    height: calc(100vh - 80px);
    overflow: hidden;
}

.posts-container {
    height: 100%;
    position: relative;
    display: block;
    transition: transform 0.5s ease;
}

.post {
    height: calc(100vh - 80px);
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    background: #000;
    transition: transform 200ms ease-in-out;
}

.post.hidden {
    transform: translateY(100vh);
}

.post.hidden-above {
    transform: translateY(-100vh);
}

.post.visible {
    transform: translateY(0);
}

.post.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.post.fade-out {
    opacity: 0;
    transform: translateY(20px);
}


.post-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Video Styles */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container video {
    width: 100%;
    height: calc(100% - 40px);
    object-fit: contain;
    border-radius: 10px;
    background: #000;
    /* Prevent zoom on double-tap */
    touch-action: manipulation;
}

/* Oembed Styles */
.oembed-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.oembed-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    background: #000;
}

.iframe-touch-overlay {
    display: none;
}

@media (max-width: 768px) {
    .oembed-container iframe {
        pointer-events: none;
    }

    .iframe-touch-overlay {
        display: flex;
    }    
}

.iframe-touch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: transparent;
    pointer-events: auto;
}

.iframe-interaction-toggle {
    display: none;
}

@media (max-width: 768px) {
    .iframe-interaction-toggle {
        position: absolute;
        top: 80px;
        right: 70px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.7);
        border: 2px solid #fff;
        color: #fff;
        font-size: 12px;
        cursor: pointer;
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .iframe-interaction-toggle:hover {
        background: rgba(255, 69, 0, 0.8);
        transform: scale(1.1);
    }
}

/* Preview Styles */
.preview-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    /* Prevent zoom on double-tap */
    touch-action: manipulation;
}

/* Ensure videos play inline on mobile */
.video-container video::-webkit-media-controls {
    display: flex;
}

.video-container video::-webkit-media-controls-play-button {
    display: block;
}

/* Image Carousel */
.image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-track {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
    align-items: center;
    cursor: grab;
    width: 100%;
}

.image-track:active {
    cursor: grabbing;
}

.image-slide {
    width: 100vw;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.image-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* Gallery Counter Inline */
.gallery-counter-inline {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

/* Gallery Bullets */
.gallery-bullets {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
    pointer-events: auto;
}

/* Gallery Arrows */
.gallery-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: none; /* Hidden by default, shown only for galleries */
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 25;
}

.gallery-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-arrow:hover {
    background: rgba(255, 69, 0, 0.8);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.4);
}

.gallery-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.gallery-arrow:disabled:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    z-index: 30;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.gallery-bullet.active {
    background: #ff4500;
    transform: scale(1.3);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.gallery-bullet:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Post Info */
.post-info {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    padding-right: 60px;
    border-radius: 10px;
    transition: all 0.3s ease;
    z-index: 10;
    width: calc(100% - 80px);
}

.post-info.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.toggle-info-btn {
    position: absolute;
    top: 30px;
    right: 70px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 69, 0, 0.8);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 20;
}

.toggle-info-btn:hover {
    background: rgba(255, 69, 0, 1);
    transform: scale(1.1);
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.post-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #ff4500;
    text-decoration: underline;
}

.post-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    padding-right: 60px;
}
.post-meta span {
    margin-right: 10px;
}

/* Navigation */
.navigation-arrows {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 100;
}

/* Navegação vertical para posts */
.navigation-vertical {
    position: fixed;
    bottom: 150px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    z-index: 100;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 69, 0, 0.8);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Specific styles for up/down buttons */
.navigation-vertical .nav-btn {
    width: 45px;
    height: 45px;
    font-size: 20px;
    background: rgba(255, 69, 0, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.navigation-vertical .nav-btn:hover {
    background: rgba(255, 69, 0, 1);
    transform: scale(1.05);
}

.navigation-vertical .nav-btn:disabled {
    background: rgba(255, 69, 0, 0.3);
    transform: none;
}

/* Share button styling to match nav buttons */
.navigation-vertical .share.nav-btn {
    background: rgba(0, 121, 211, 0.9); /* Reddit link blue */
}
.navigation-vertical .share.nav-btn:hover {
    background: rgba(0, 121, 211, 1);
}

/* Post Indicator */
.post-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 100;
}

/* Loading */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

/* Loading overlay to block interactions */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
    pointer-events: all;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ff4500;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Touch/Swipe indicators */
.swipe-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 200;
}

.swipe-indicator.show {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        display: none;
    }
    .hamburger{
        display: inline-flex !important;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1300;
    }
    .search-container {
        display: none; /* hidden on mobile in header, available in panel */
    }
    .controls {
        display: none;
    }
    .main-content {
        margin-top: 0;
        height: 100vh;
    }
    .post {
        height: 100vh;
    }
    .navigation-arrows {
        padding: 0 10px;
    }
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .gallery-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .gallery-arrows {
        padding: 0 10px;
    }
}

/* Hamburger button */
.hamburger{
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid #333;
    background: rgba(0,0,0,0.6);
    display: none; /* hidden by default (desktop) */
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.hamburger svg { color: #fff; }

/* Slide-in panel */
.mobile-panel{
    position: fixed;
    top:0;
    left:0; /* flush to left edge to avoid any gap */
    width: 80vw;
    max-width: 360px;
    height:100vh;
    background:#0f0f0f;
    box-shadow: 2px 0 14px rgba(0,0,0,.45);
    transform: translateX(-100%); /* fully off-screen when closed */
    transition: transform .35s ease;
    z-index: 1200;
    padding: 60px 16px 16px; /* top padding to separate from menu icon */
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}
.mobile-panel.open{ transform: translateX(0); }
.mobile-panel .panel-section{ display:flex; flex-direction: column; gap:8px; background: rgba(255,255,255,0.04); padding:12px; border-radius:10px; border:1px solid #222; }
.mobile-panel .panel-section.row{ flex-direction: row; gap:10px; }
.mobile-panel .panel-content{ overflow-y:auto; }

/* Better looking form controls inside panel */
.mobile-panel input[type="text"],
.mobile-panel select,
.mobile-panel button{
    width: 100%;
}
.mobile-panel input[type="text"],
.mobile-panel select{
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #333;
    padding: 10px 12px;
    border-radius: 10px;
}
.mobile-panel input[type="text"]::placeholder{ color: #888; }
.mobile-panel button{
    background: #ff4500;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
}
.mobile-panel button:hover{ filter: brightness(1.05); }

.panel-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 1100;
}
.panel-overlay.show{
    opacity: 1;
    pointer-events: all;
}

/* Ensure the hamburger stays above and panel doesn't shift page */
.app-container { position: relative; }

/* Hide scrollbar */
::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Subreddit autocomplete styling - Dark Theme */
.subreddit-autocomplete-container {
    position: relative;
    flex: 1;
    width: 200px;
    max-width: 200px;
}

.subreddit-input {
    width: 200px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.subreddit-input:focus {
    border-color: #ff4500;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.2);
}

.clear-subreddit-btn {
    position: absolute;
    right: 8px;
    top: 20px;
    transform: translateY(-50%);
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.clear-subreddit-btn:hover {
    background: #ff6666;
}

/* Add padding to subreddit input when clear button is visible */
.subreddit-autocomplete-container.has-clear-button .subreddit-input {
    padding-right: 35px;
}

.subreddit-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.subreddit-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 8px;
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.subreddit-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-item:hover {
    background: rgba(255, 69, 0, 0.1);
    border-left: 3px solid #ff4500;
    padding-left: 12px;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item.no-results {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    cursor: default;
    padding: 16px 15px;
    text-align: center;
}

.subreddit-name {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.subreddit-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.nsfw-indicator {
    background: #ff4500;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loading-indicator {
    padding: 12px 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 69, 0, 0.3);
    border-top: 2px solid #ff4500;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Custom scrollbar for dark theme dropdown */
.subreddit-dropdown::-webkit-scrollbar {
    width: 8px !important;
    display: block !important;
}

.subreddit-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 4px;
    display: block !important;
}

.subreddit-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 69, 0, 0.6) !important;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block !important;
}

.subreddit-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 69, 0, 0.8) !important;
}

.subreddit-dropdown::-webkit-scrollbar-thumb:active {
    background: rgba(255, 69, 0, 1) !important;
}

/* GIF Container Styles */
.gif-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.gif-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    transition: opacity 0.3s ease;
}

.gif-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    background: #000;
}

.gif-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 69, 0, 0.9);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.gif-indicator.paused {
    background: rgba(0, 0, 0, 0.8);
    color: #ff4500;
    border-color: #ff4500;
}

.gif-indicator.loaded {
    background: rgba(255, 69, 0, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.gif-container:hover .gif-indicator {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.3);
}

.gif-container:hover .gif-image {
    opacity: 0.95;
}

/* Gallery GIF Indicator */
.gif-slide {
    position: relative;
}

.gallery-gif-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 69, 0, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    pointer-events: none;
    transition: all 0.3s ease;
}

.gallery-gif-indicator.loaded {
    background: rgba(255, 69, 0, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.gallery-gif-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    background: #000;
}

/* NSFW Age Verification Modal */
.nsfw-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nsfw-modal.show {
    opacity: 1;
    visibility: visible;
}

.nsfw-modal-content {
    background: #1a1a1a;
    border: 2px solid #ff4500;
    border-radius: 20px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 69, 0, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.nsfw-modal.show .nsfw-modal-content {
    transform: scale(1) translateY(0);
}

.nsfw-modal-header {
    background: linear-gradient(135deg, #ff4500, #ff5722);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nsfw-modal-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nsfw-modal-body {
    padding: 30px 20px;
    text-align: center;
}

.nsfw-modal-description {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.nsfw-modal-warning {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.nsfw-modal-footer {
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nsfw-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nsfw-modal-btn-no {
    background: #666;
    color: #fff;
    border: 2px solid #666;
}

.nsfw-modal-btn-no:hover {
    background: #777;
    border-color: #777;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nsfw-modal-btn-yes {
    background: #ff4500;
    color: #fff;
    border: 2px solid #ff4500;
}

.nsfw-modal-btn-yes:hover {
    background: #ff5722;
    border-color: #ff5722;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.4);
}

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

/* Mobile responsive for NSFW modal */
@media (max-width: 768px) {
    .nsfw-modal-content {
        width: 95%;
        max-width: 350px;
    }
    
    .nsfw-modal-header {
        padding: 15px;
    }
    
    .nsfw-modal-title {
        font-size: 18px;
    }
    
    .nsfw-modal-body {
        padding: 25px 15px;
    }
    
    .nsfw-modal-description {
        font-size: 16px;
    }
    
    .nsfw-modal-warning {
        font-size: 13px;
    }
    
    .nsfw-modal-footer {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .nsfw-modal-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Mobile subreddit autocomplete styling - Dark Theme */
@media (max-width: 768px) {
    .subreddit-autocomplete-container {
        width: 100%;
        max-width: none;
        margin-bottom: 10px;
    }
    
    .subreddit-input {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    .subreddit-input:focus {
        background: rgba(0, 0, 0, 0.6);
        border-color: #ff4500;
    }
    
    .subreddit-dropdown {
        position: relative;
        width: 100%;
        margin-top: 8px;
        background: rgba(15, 15, 15, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.modal-message {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.modal-button {
    background: #0079d3;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-button:hover {
    background: #005ba1;
}

.modal-button:active {
    transform: translateY(1px);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

.modal-button-cancel {
    background: #666;
    color: white;
}

.modal-button-cancel:hover {
    background: #555;
}

.modal-button-confirm {
    background: #0079d3;
    color: white;
}

.modal-button-confirm:hover {
    background: #005ba1;
}