html, body {
    max-width: 100%;
    overflow-x: hidden;

}
body {
            font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
            margin: 0;
            padding: 0;
            line-height: 1.6;
            padding-bottom: 95px; /* Global Bottom Nav Space with extra scroll padding */
            background: #050505; /* Deep futuristic black */
            color: #e2e8f0;
            transition: background 0.3s, color 0.3s;
        }
        #stories-reel::-webkit-scrollbar { display: none; }
        .story-item { text-align: center; cursor: pointer; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; }
        .story-ring { width: 68px; height: 68px; border-radius: 50%; background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
        .story-item:hover .story-ring { transform: scale(1.05); }
        .story-item.viewed .story-ring { background: #555; }
        .story-item img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid #121212; }
        .story-item p { margin: 5px 0 0 0; font-size: 0.75rem; color: #ccc; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        body.light-mode .story-item p { color: #555; }
        body.light-mode .story-item.viewed .story-ring { background: #ccc; }
        body.light-mode .story-item img { border-color: #f4f7f6; }
        
        .story-ring-container { position: relative; display: inline-block; width: 68px; height: 68px; }
        .add-story-badge { position: absolute; bottom: 0px; right: 0px; background: #6366f1; color: white; border-radius: 50%; width: 22px; height: 22px; font-size: 18px; line-height: 22px; font-weight: bold; display: flex; align-items: center; justify-content: center; border: 2px solid #121212; z-index: 2; cursor: pointer; transition: transform 0.2s; box-sizing: border-box; padding-bottom: 2px; }
        .add-story-badge:hover { transform: scale(1.1); background: #4f46e5; }
        body.light-mode .add-story-badge { border-color: #f4f7f6; }
        .story-ring-empty { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
        .story-item:hover .story-ring-empty { transform: scale(1.05); }
        
        /* Add Story Badge Click Animation */
        @keyframes badge-click-anim {
            0% { transform: scale(1); }
            50% { transform: scale(1.5) rotate(90deg); background-color: #10b981; border-color: #10b981; }
            100% { transform: scale(0); opacity: 0; }
        }
        .add-story-badge.badge-clicked {
            animation: badge-click-anim 0.4s ease-in-out forwards;
            pointer-events: none;
        }

        /* Story Viewer Modal */
        #story-viewer-modal .close-lightbox { z-index: 15; }
        #story-viewer-content { position: relative; max-width: 450px; max-height: 95vh; max-height: 95dvh; width: 95%; background: #111; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 10px; box-sizing: border-box; }
        #story-viewer-content .story-header { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 8px; z-index: 10; background: rgba(0,0,0,0.5); padding: 5px 10px; border-radius: 15px; }
        #story-viewer-content .story-header img { width: 30px; height: 30px; border-radius: 50%; }
        #story-viewer-content .story-header strong { color: white; font-size: 0.9rem; }
        #story-viewer-content .story-text { color: white; font-size: 1.5rem; padding: 20px; text-align: center; word-wrap: break-word; }
        
        .story-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0,0,0,0.6);
            color: white;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            z-index: 25;
            width: 36px;
            height: 36px;
            border-radius: 50%;
        }
        .story-nav-btn:hover { background: rgba(0,0,0,0.9); }
        .story-nav-btn.prev { left: 10px; }
        .story-nav-btn.next { right: 10px; }
        .container {
            max-width: 1200px; /* Wider for a more modern, spacious feel */
            margin: 0 auto;    /* Center the container */
            padding: 20px 15px; /* Add some padding on all sides */
        }
        #view-home .container {
            padding-top: 96px; /* 20px original padding + 56px header + 20px margin */
        }
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            background: #0f0f0f; /* YouTube Dark Mode Background */
            border: none;
            margin-bottom: 20px;
            width: 100%;
            height: 56px;
            box-sizing: border-box;
        }
        #main-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 2500;
            margin-bottom: 0;
        }
        .header-left { display: flex; align-items: center; flex: 1; min-width: 120px; }
        .header-center { display: flex; align-items: center; justify-content: center; flex: 2; max-width: 600px; margin: 0 20px; }
        .header-right { display: flex; align-items: center; justify-content: flex-end; flex: 1; gap: 15px; min-width: 80px; }
        .mobile-only { display: none !important; }
        
        .btn {
            display: inline-block;
            padding: 8px 18px;
            font-size: 0.9rem;
            font-weight: bold;
            color: #fff;
            background: linear-gradient(135deg, #6366f1, #a855f7); /* Vibrant gradient */
            border: none;
            border-radius: 30px; /* Pill shape */
            text-decoration: none;
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
        }
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5);
        }

        .btn-read-more {
            display: inline-block;
            padding: 8px 16px;
            font-size: 0.9rem;
            font-weight: bold;
            color: #6366f1;
            background-color: transparent;
            border: 1px solid #6366f1;
            border-radius: 5px;
            text-decoration: none;
            margin-top: 15px;
            transition: background-color 0.2s ease, color 0.2s ease;
        }
        .btn-read-more:hover {
            background-color: #6366f1;
            color: #fff;
        }

        .btn-vertical {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 5px;
            font-size: 0.85rem;
            line-height: 1.2;
            vertical-align: middle;
            position: relative;
            z-index: 1;
            border: none !important;
            background: transparent !important;
            color: #fff;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .btn-vertical:hover {
            background: transparent !important;
            transform: scale(1.1);
            box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
        }
        .btn-vertical img {
            width: 82px;
            height: 82px;
            object-fit: contain;
        }

        .theme-btn {
            position: relative;
            z-index: 1;
            border: none !important;
            background: transparent !important;
            color: #fff !important;
            font-size: 1.2rem;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .theme-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
        }

        .btn-transparent {
            position: relative;
            z-index: 1;
            border: none !important;
            background: transparent !important;
            color: #fff !important;
            transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
        }
        .btn-vertical::before, .btn-transparent::before, .theme-btn::before {
            content: "";
            position: absolute;
            top: 0; right: 0; bottom: 0; left: 0;
            border-radius: 30px;
            padding: 1.5px;
        background: linear-gradient(45deg, #6366f1, #a855f7); /* Default border */
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            z-index: -1;
            pointer-events: none;
        }
        .btn-transparent:hover {
            transform: scale(1.1);
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
        }

    .menu-icon-btn {
        background: transparent;
        border: none;
        color: #fff;
        padding: 4px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        outline: none;
        transition: transform 0.2s;
    }
    .menu-icon-btn svg { width: 28px; height: 28px; } /* 3 लाइनों का साइज़ थोड़ा बड़ा किया गया है */
    .menu-icon-btn:hover { transform: scale(1.1); }

        .latest-news {
        background: transparent;
        border: none;
        padding: 0;
        margin-bottom: 20px;
        }

        .latest-news h2 {
            margin-top: 0;
        font-size: 1.2rem;
            color: #fff;
        }

        .latest-news ul {
            list-style: none;;
            padding: 0;
            margin: 0;
        }

        .latest-news li {
            padding: 8px 0;
        }

        .latest-news a {
            text-decoration: none;
            color: #fff;
            font-weight: 600;
        }

        .trending-carousel {
            display: flex;
            overflow-x: auto;
            gap: 15px;
            padding: 5px;
            scrollbar-width: none; /* Firefox */
        }
        .trending-carousel::-webkit-scrollbar {
            display: none; /* Chrome, Safari, Opera */
        }

        .news-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr); /* Max 3 columns for PC */
            gap: 20px 15px;
        }
        @media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } } /* 2 columns for medium screens */
        @media (max-width: 600px) {
            .news-grid { grid-template-columns: 1fr; } /* 1 column for phone screens */
        }

        @media (min-width: 769px) {
            .trending-carousel .yt-grid-item {
                flex-basis: 200px !important; /* Override inline style for PC */
            }
        }

        .news-card {
            background: transparent;
            border: none;
            border-radius: 0;
            overflow: visible;
            display: flex;
            flex-direction: column;
            height: 100%;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .news-card:hover {
            transform: scale(1.02);
            box-shadow: none;
        }

        .news-card img.card-img-top {
            width: 100%;
            height: auto;
            object-fit: cover;
        }

        .news-card-content {
            padding: 12px 0;
        }

        .news-card-content h2 {
            font-size: 1rem;
            margin-top: 0;
            margin-bottom: 10px;
        }
        .news-card-content h2 a {
            color: #fff;
            text-decoration: none;
            transition: color 0.2s ease;
        }
        .news-card-content h2 a:hover {
            color: #ddd;
            text-decoration: underline;
        }

        .article-meta {
            font-size: 0.85rem;
            color: #ddd;
            margin-bottom: 15px;
            display: block;
        }

        .news-card-content p {
            font-size: 1.05rem;
            color: #eee;
            margin-bottom: 1em;
        }

        .shayari-p {
            font-size: 1.1rem;
            line-height: 1.8;
            color: #fff;
            white-space: pre-wrap;
            font-style: italic;
            background: rgba(0, 0, 0, 0.1);
            padding: 15px;
            border-left: 4px solid #87ceeb;
            border-radius: 5px;
        }
        
        strong {
            color: #198754; /* A nice green for emphasis */
        }

        .highlight {
            background-color: #f8f9fa;
            padding: 15px;
            border-left: 4px solid #0d6efd;
            margin: 20px 0;
            font-style: italic;
            border-radius: 0 4px 4px 0;
        }
        .news-card-content .img-fluid {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            margin: 20px 0;
            display: block;
        }
        
        .blog-desc-text.expanded {
            -webkit-line-clamp: unset !important;
        }

        /* Grid View Styles for Videos and Flicks (from profile.html) */
        .yt-grid-item { cursor: pointer; text-align: left; display: flex; flex-direction: column; transition: transform 0.2s; }
        .yt-grid-item { cursor: pointer; text-align: left; display: flex; flex-direction: column; transition: transform 0.2s; min-width: 0; }
        .yt-grid-item:hover { transform: scale(1.02); }
        .video-thumbnail { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #222; border: 1px solid #444; }
        .flick-thumbnail { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: #222; border: 1px solid #444; }
        .yt-grid-item h4 { margin: 8px 0 4px 0; font-size: 0.95rem; color: #fff; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; line-height: 1.3; }
        .yt-grid-item p { margin: 0; font-size: 0.8rem; color: #aaa; }
        body.light-mode .yt-grid-item h4 { color: #333; }
        body.light-mode .yt-grid-item p { color: #666; }
        body.light-mode .video-thumbnail, body.light-mode .flick-thumbnail { border-color: #ddd; }

        /* Responsive Design for Mobile Devices */
        @media (max-width: 768px) {
            .news-card-content h2 {
                font-size: 1.5rem; /* Reduce article title size */
            }

        .latest-news { padding: 0; }
        .news-card-content { padding: 12px 0; }
        }

        .back-to-top-btn {
            position: fixed;
            bottom: 30px;
            right: 30px;
            display: none; /* Hidden by default */
            width: 50px;
            height: 50px;
            line-height: 50px;
            text-align: center;
            font-size: 24px;
            color: #fff;
            background-color: #0d6efd;
            border-radius: 50%;
            text-decoration: none;
            z-index: 1000;
            transition: opacity 0.3s ease-in-out;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        .back-to-top-btn:hover {
            background-color: #0b5ed7;
        }

        /* Watch SPA View Styles */
        .watch-container { display: flex; flex-wrap: wrap; padding: 20px; gap: 20px; max-width: 1400px; margin: auto; align-items: flex-start; }
        .watch-main-content { flex: 1 1 65%; max-width: 100%; }
        .watch-sidebar { flex: 1 1 30%; display: flex; flex-direction: column; gap: 15px; }
        .watch-video-container { width: 100%; background: #000; border-radius: 16px; overflow: hidden; position: relative; padding-bottom: 56.25%; box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(99, 102, 241, 0.1); border: 1px solid rgba(255,255,255,0.05); }
        .watch-video-container video, .watch-video-container iframe { position: absolute !important; top: 0; left: 0; width: 100% !important; height: 100% !important; outline: none; }
        .watch-info { padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
        .watch-title { font-size: 1.5rem; margin: 0 0 15px 0; font-weight: bold; color: #fff; }
        .watch-author-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-bottom: 15px; }
        .watch-author-info { display: flex; align-items: center; gap: 12px; }
        .watch-author-info img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 2px solid #87ceeb; cursor: pointer; }
        .watch-actions { display: flex; gap: 10px; }
        .watch-desc-box { background: rgba(20,20,20,0.6); padding: 15px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); font-size: 0.95rem; line-height: 1.5; color: #ddd; }
        .watch-suggestion-card { display: flex; gap: 10px; cursor: pointer; border-radius: 12px; padding: 8px; transition: all 0.2s; background: rgba(20,20,20,0.4); border: 1px solid rgba(255,255,255,0.02); }
        .watch-suggestion-card:hover { background: rgba(20,20,20,0.8); border-color: rgba(255,255,255,0.1); transform: translateX(4px); }
        .watch-suggestion-card img { width: 168px; height: 94px; border-radius: 8px; object-fit: cover; }
        .watch-suggestion-info h4 { margin: 0 0 5px 0; font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; color: #fff; }
        .watch-suggestion-info p { margin: 0; font-size: 0.85rem; color: #aaa; }
        
        .controls { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.9)); padding: 20px 15px 15px 15px; display: flex; flex-direction: column; gap: 10px; opacity: 0; pointer-events: none; z-index: 25; transition: opacity 0.3s ease; }
        .watch-video-container:hover .controls, .watch-video-container.paused .controls, .watch-video-container.show-controls .controls { opacity: 1; pointer-events: auto; }
        .progress-bar { width: 100%; -webkit-appearance: none; background: rgba(255, 255, 255, 0.2); height: 5px; border-radius: 5px; outline: none; cursor: pointer; transition: height 0.1s ease; }
        .progress-bar:hover { height: 7px; }
        .progress-bar::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #0d6efd; cursor: pointer; box-shadow: 0 0 5px rgba(0,0,0,0.5); }
        .control-buttons { display: flex; align-items: center; justify-content: space-between; }
        .left-controls, .right-controls { display: flex; align-items: center; gap: 15px; }
        .watch-video-container button { background: none; border: none; color: white; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; transition: transform 0.2s, color 0.2s; pointer-events: auto; z-index: 100; }
        .watch-video-container button:hover { transform: scale(1.1); color: #0d6efd; }
        .watch-video-container button i, .watch-video-container button svg { pointer-events: none; }
        .settings-wrapper { position: relative; }
        .settings-menu { position: absolute; bottom: 45px; right: -10px; background: rgba(20, 20, 20, 0.95); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 8px 0; display: none; width: 240px; box-shadow: 0 -5px 15px rgba(0,0,0,0.5); max-height: 250px; overflow-y: auto; z-index: 100; }
        .settings-menu.show { display: block; }
        .menu-panel { display: none; flex-direction: column; }
        .menu-panel.active { display: flex; animation: slideIn 0.2s ease; }
        .settings-item { padding: 8px 15px; font-size: 0.9rem; color: white; cursor: pointer; transition: background 0.2s; display: flex; justify-content: space-between; align-items: center; }
        .settings-item:hover { background: rgba(255,255,255,0.1); }
        .settings-item.active { color: #0d6efd; font-weight: bold; }
        .settings-header-back { padding: 10px 15px; font-size: 0.95rem; color: white; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 5px; cursor: pointer; display: flex; align-items: center; }
        .settings-header-back:hover { background: rgba(255,255,255,0.1); }
        .time-display { font-size: 0.9rem; user-select: none; font-weight: 600; color: #fff; }
        .volume-container { display: flex; align-items: center; gap: 8px; }
        .volume-slider { width: 80px; -webkit-appearance: none; background: rgba(255, 255, 255, 0.2); height: 4px; border-radius: 4px; outline: none; cursor: pointer; }
        .volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; cursor: pointer; }
        .yt-skip-anim { position: absolute; top: 0; bottom: 0; width: 40%; background: rgba(255, 255, 255, 0.15); color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; opacity: 0; z-index: 10; transition: opacity 0.3s ease-out; overflow: hidden; }
        .yt-skip-left { left: 0; border-top-right-radius: 50%; border-bottom-right-radius: 50%; }
        .yt-skip-right { right: 0; border-top-left-radius: 50%; border-bottom-left-radius: 50%; }
        .yt-skip-content { display: flex; flex-direction: column; align-items: center; gap: 5px; transform: scale(0.8); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        .yt-skip-anim.show { opacity: 1; }
        .yt-skip-anim.show .yt-skip-content { transform: scale(1); }
        .yt-skip-arrows i { width: 32px; height: 32px; }
        .yt-skip-text { font-size: 0.9rem; font-weight: bold; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

        @media screen and (min-width: 901px) {
            .watch-container.theater-mode { max-width: 100%; padding-top: 0; padding-left: 0; padding-right: 0; }
            .watch-container.theater-mode .watch-main-content { flex: 1 1 100%; max-width: 100%; }
            .watch-container.theater-mode .watch-video-container { border-radius: 0; height: 75vh; padding-bottom: 0; }
            .watch-container.theater-mode .watch-video-container video, .watch-container.theater-mode .watch-video-container iframe { position: relative; height: 100%; background: #000; }
            .watch-container.theater-mode .watch-info, .watch-container.theater-mode #watch-comments-section, .watch-container.theater-mode .watch-sidebar { max-width: 1400px; margin-left: auto; margin-right: auto; padding: 20px; box-sizing: border-box; }
            .watch-container.theater-mode .watch-sidebar { flex: 1 1 100%; padding-top: 0; }
            .watch-container.theater-mode .watch-sidebar #watch-suggestions { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
        }

        /* Miniplayer Mode */
        #view-watch.miniplayer-mode { display: block !important; position: fixed; bottom: 80px; right: 20px; width: 320px; height: auto; z-index: 3500; background: #000; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); overflow: hidden; animation: slideInMiniplayer 0.3s ease-out; touch-action: none; }
        @keyframes slideInMiniplayer { from { transform: translateY(100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        #view-watch.miniplayer-mode .watch-container { padding: 0; max-width: 100%; display: block; gap: 0; }
        #view-watch.miniplayer-mode .watch-main-content { width: 100%; flex: none; }
        #view-watch.miniplayer-mode .watch-sidebar, #view-watch.miniplayer-mode .watch-info, #view-watch.miniplayer-mode #watch-comments-section, #view-watch.miniplayer-mode .watch-comments-container, #view-watch.miniplayer-mode footer { display: none !important; }
        #view-watch.miniplayer-mode .watch-video-container { border-radius: 0; box-shadow: none; border: none; padding-bottom: 56.25%; }
        #view-watch.miniplayer-mode .controls { display: none !important; }
        .miniplayer-controls-overlay { display: none; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 90; background: transparent; transition: background 0.3s; pointer-events: none; }
        #view-watch.miniplayer-mode .miniplayer-controls-overlay { display: block; pointer-events: auto; cursor: pointer; }
        #view-watch.miniplayer-mode:hover .miniplayer-controls-overlay, #view-watch.miniplayer-mode.show-mini-controls .miniplayer-controls-overlay { background: rgba(0,0,0,0.4); }
        #view-watch.miniplayer-mode .miniplayer-expand-btn, #view-watch.miniplayer-mode .miniplayer-close-btn, #view-watch.miniplayer-mode .miniplayer-play-btn { display: flex; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.2s; }
        #view-watch.miniplayer-mode:hover .miniplayer-expand-btn, #view-watch.miniplayer-mode:hover .miniplayer-close-btn, #view-watch.miniplayer-mode:hover .miniplayer-play-btn, #view-watch.miniplayer-mode.show-mini-controls .miniplayer-expand-btn, #view-watch.miniplayer-mode.show-mini-controls .miniplayer-close-btn, #view-watch.miniplayer-mode.show-mini-controls .miniplayer-play-btn, #view-watch.miniplayer-mode .watch-video-container.paused .miniplayer-play-btn { opacity: 1; pointer-events: auto; }
        .miniplayer-expand-btn, .miniplayer-close-btn, .miniplayer-play-btn { display: none; position: absolute; background: rgba(0,0,0,0.6); color: white; border: none; border-radius: 50%; align-items: center; justify-content: center; cursor: pointer; z-index: 100; }
        .miniplayer-expand-btn:hover, .miniplayer-close-btn:hover { background: rgba(0,0,0,0.9); transform: scale(1.1); }
        .miniplayer-play-btn:hover { background: rgba(0,0,0,0.9); transform: translate(-50%, -50%) scale(1.1) !important; }
        .miniplayer-expand-btn { top: 8px; left: 8px; width: 30px; height: 30px; }
        .miniplayer-close-btn { top: 8px; right: 8px; width: 30px; height: 30px; }
        .miniplayer-play-btn { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; font-size: 1.5rem; }
        #view-watch.miniplayer-mode #miniplayer-progress-container { display: block !important; }

        @media (max-width: 768px) { #view-watch.miniplayer-mode { bottom: 70px; right: 10px; width: 250px; } }

        footer {
            text-align: center;
        padding: 20px 15px 110px 15px; /* Ensures clearance above bottom nav */
            margin-top: 40px;
        background: rgba(255, 255, 255, 0.03);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        color: #aaa;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        }

        footer p {
            margin: 0;
        }

        /* Carousel Styles for Multiple Images */
        .card-title-text {
            margin: 0 0 4px 0;
            font-size: 1rem;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            cursor: pointer;
            color: #fff;
        }
        .grid-title-text {
            margin: 8px 0 4px 0;
            font-size: 0.95rem;
            color: inherit;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
        }
        .card-media-container {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 9;
            background: #000;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            cursor: pointer;
        }
        .card-media-container img, .card-media-container video, .card-media-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            border: none;
        }
        .image-carousel {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            display: flex;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            gap: 10px;
            padding: 0 !important;
            -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        .image-carousel img {
            flex: 0 0 100%; /* Show one image at a time fully */
            scroll-snap-align: center;
            width: 100%;
            height: 100%;
            object-fit: cover;
            position: relative !important;
            border-radius: inherit;
        }
        /* Hide scrollbar for cleaner look */
        .image-carousel::-webkit-scrollbar { display: none; }
        .image-carousel { -ms-overflow-style: none; scrollbar-width: none; }

        /* Comment Actions */
        .comment-actions { display: flex; gap: 15px; margin-top: 8px; font-size: 0.85rem; color: #aaa; }
        .comment-action-btn { background: none; border: none; color: inherit; cursor: pointer; padding: 0; display: flex; align-items: center; gap: 5px; transition: color 0.2s; }
        .comment-action-btn:hover { color: #fff; }
        .replies-list { margin-left: 20px; margin-top: 10px; border-left: 2px solid rgba(255,255,255,0.1); padding-left: 10px; }
        .pinned-badge { background: #ffd700; color: #000; font-size: 0.6rem; padding: 2px 5px; border-radius: 4px; margin-left: 8px; font-weight: bold; vertical-align: middle; }

        .blog-action-btn {
            background: transparent;
            border: none;
            cursor: pointer;
            font-size: 1rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 8px;
            transition: transform 0.2s ease, background-color 0.2s ease;
            font-family: inherit;
        }
        .blog-action-btn:hover { background-color: rgba(255, 255, 255, 0.05); transform: scale(1.05); }

        .follow-btn { padding: 2px 8px; font-size: 0.7rem; border-radius: 10px; border: 1px solid #6366f1; background: transparent; color: #6366f1; cursor: pointer; margin-left: 10px; transition: all 0.2s; }
        .follow-btn.following { background: #6366f1; color: white; }

        /* Search & Notifications */
        .search-box { position: relative; }
        .search-wrapper { width: 100%; position: relative; display: flex; align-items: center; justify-content: center; }
        .search-input-container {
            display: flex; width: 100%; max-width: 600px; border: 1px solid #303030; border-radius: 40px; background: #121212; height: 40px; align-items: center; overflow: hidden;
        }
        .search-input-container:focus-within { border-color: #1c62b9; }
        .search-input-container input { flex: 1; padding: 0 20px; border: none; background: transparent; color: white; font-size: 1rem; outline: none; height: 100%; box-sizing: border-box; }
        .search-input-container .search-btn { width: 64px; height: 100%; padding: 0; background: #222222; border: none; border-left: 1px solid #303030; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; border-radius: 0 40px 40px 0; }
        .search-input-container .search-btn:hover { background: #303030; }
        .search-results { position: absolute; top: 100%; left: 0; width: 100%; background: #1e1e1e; border: 1px solid #444; border-radius: 8px; display: none; z-index: 1000; max-height: 300px; overflow-y: auto; }
        .search-result-item { padding: 10px; border-bottom: 1px solid #333; cursor: pointer; display: flex; align-items: center; gap: 10px; }
        .search-result-item:hover { background: #333; }
        
        .notif-box { position: relative; }
        .notif-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center;}
        .notif-badge { position: absolute; top: -5px; right: -5px; background: red; color: white; font-size: 0.7rem; padding: 2px 5px; border-radius: 50%; display: none; }
        .notif-dropdown { position: absolute; top: 100%; right: 0; width: 300px; background: #1e1e1e; border: 1px solid #444; border-radius: 8px; display: none; z-index: 1000; max-height: 400px; overflow-y: auto; }
        .notif-item { padding: 10px; border-bottom: 1px solid #333; font-size: 0.9rem; color: #ddd; }
        .notif-item strong { color: gold; }

        /* Mobile Nav Items visibility */
        .mobile-nav-items { display: none; }
        @media (max-width: 768px) {
            .nav-buttons { display: none !important; }
            .mobile-nav-items { display: block; }
        }

        /* Navigation Buttons Container */
        .nav-buttons { display: flex; flex-direction: row; align-items: center; gap: 10px; flex-shrink: 0; }
        .nav-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
 /* Search SPA View Styles */
        .results-section-users, .results-section-content { margin-top: 20px; }
        .search-full-item { display: flex; align-items: center; gap: 15px; padding: 15px; background: rgba(255,255,255,0.05); border-radius: 12px; margin-bottom: 10px; cursor: pointer; transition: background 0.2s, transform 0.2s; border: 1px solid rgba(255,255,255,0.05); }
        .search-full-item:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
        .search-full-item img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 1px solid #555; flex-shrink: 0; }
        .search-full-item .content-thumb { width: 90px; height: 50px; border-radius: 8px; object-fit: cover; border: none; }
        .search-full-item-info { flex: 1; min-width: 0; }
        .search-full-item-info h4 { margin: 0 0 5px 0; color: #fff; font-size: 1.1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .search-full-item-info p { margin: 0; color: #aaa; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        body.light-mode .search-full-item { background: #fff; border-color: #ddd; }
        body.light-mode .search-full-item:hover { background: #f0f0f0; }
        body.light-mode .search-full-item-info h4 { color: #333; }
        body.light-mode .search-full-item-info p { color: #666; }

        /* Enhanced Mobile Responsiveness */
        @media (max-width: 768px) {
            .container { padding: 0; }
            #view-home .container { padding-top: 56px; }
            
            .header { padding: 0 16px; background: #0f0f0f; margin: 0; width: 100%; height: 56px; box-sizing: border-box; }
            .mobile-only { display: flex !important; }
            .header-center { display: none; }
            .header-center.search-active {
                display: flex !important; position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; width: 100% !important; height: 100% !important;
                background: #0f0f0f !important; z-index: 2500 !important; padding: 0 12px 0 4px !important; align-items: center !important; gap: 0 !important; box-sizing: border-box !important;
            }
            .header-center.search-active #mobile-search-back { display: flex !important; align-items: center !important; justify-content: center !important; margin: 0 !important; padding: 8px !important; width: 40px !important; height: 40px !important; border-radius: 50% !important; flex-shrink: 0 !important; border: none !important; background: transparent !important; box-sizing: border-box !important; }
            .header-center.search-active #mobile-search-back svg { width: 24px !important; height: 24px !important; stroke: #fff !important; }
            .header-center.search-active .search-wrapper { display: block !important; flex: 1 1 auto !important; width: 100% !important; min-width: 0 !important; margin-left: 4px !important; }
            .header-center.search-active .search-box { display: block !important; width: 100% !important; min-width: 0 !important; margin: 0 !important; }
            .header-center.search-active .search-input-container { display: flex !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important; background: #121212 !important; border: 1px solid #303030 !important; border-radius: 20px !important; height: 36px !important; padding: 0 !important; }
            .header-center.search-active .search-input-container:focus-within { border-color: #1c62b9 !important; }
            .header-center.search-active .search-input-container input { flex: 1 1 auto !important; width: 100% !important; min-width: 0 !important; padding: 0 16px !important; font-size: 1rem !important; color: white !important; background: transparent !important; border: none !important; }
            .header-center.search-active .search-input-container .search-btn { display: flex !important; width: 50px !important; flex-shrink: 0 !important; border-radius: 0 20px 20px 0 !important; }
            .header-right { gap: 5px; }
            
            .nav-buttons { align-items: center; width: 100%; gap: 15px; }
            .nav-row { justify-content: center; width: 100%; gap: 8px; }
            .news-grid { gap: 20px 0; }
            
            .news-card-content { padding: 15px; }
            .news-card-content h2 { font-size: 1.4rem; }
        }

        /* Lightbox */
        .lightbox-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; height: 100dvh; overflow: hidden; background-color: rgba(0,0,0,0.9); align-items: center; justify-content: center; }
        .lightbox-content { display: block; max-width: 90vw; max-height: 85vh; object-fit: contain; transition: transform 0.3s ease; }
        .profile-lightbox { border-radius: 50%; width: 85vmin; height: 85vmin; max-width: 400px; max-height: 400px; object-fit: cover; }
        .close-lightbox { position: absolute; top: 20px; right: 30px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; z-index: 2001; }
        .close-lightbox:hover { color: #bbb; }

        /* Story Text Animations */
        @keyframes story-anim-bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-20px); }
        }
        @keyframes story-anim-pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        @keyframes story-anim-zoom {
            0% { transform: scale(0); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }
        @keyframes story-anim-slide {
            0% { transform: translateY(50px); opacity: 0; }
            100% { transform: translateY(0); opacity: 1; }
        }
        .story-anim-bounce { animation: story-anim-bounce 2s infinite; }
        .story-anim-pulse { animation: story-anim-pulse 2s infinite; }
        .story-anim-zoom { animation: story-anim-zoom 0.5s ease-out forwards; }
        .story-anim-slide { animation: story-anim-slide 0.5s ease-out forwards; }

        /* Media Transitions */
        @keyframes trans-fade { from { opacity: 0; } to { opacity: 1; } }
        @keyframes trans-slide-left { from { transform: translateX(100%); } to { transform: translateX(0); } }
        @keyframes trans-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
        @keyframes trans-zoom-in { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
        .trans-fade { animation: trans-fade 0.5s ease-out forwards; }
        .trans-slide-left { animation: trans-slide-left 0.5s ease-out forwards; }
        .trans-slide-up { animation: trans-slide-up 0.5s ease-out forwards; }
        .trans-zoom-in { animation: trans-zoom-in 0.5s ease-out forwards; }

        /* Carousel Arrows */
        .carousel-container { position: relative; }
        .carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.6); color: white; border: none; cursor: pointer; z-index: 5; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: background 0.3s; }
        .carousel-btn:hover { background: rgba(0,0,0,0.9); }
        .carousel-btn.prev { left: 10px; }
        .carousel-btn.next { right: 10px; }
        .verified-badge { color: #1da1f2; margin-left: 4px; font-size: 0.9em; vertical-align: middle; display: inline-block; }

        /* Light Mode Styles */
        body.light-mode {
            background: #f4f7f6;
            color: #ffffff;
            
        }
        body.light-mode .header h1, body.light-mode .header h1 a { color: #333 !important; }
        body.light-mode .latest-news { background: transparent; border: none; box-shadow: none; }
        body.light-mode .news-card.ad-card { background: rgba(0,0,0,0.03); border: 1px solid #000000; box-shadow: none; }
        body.light-mode .news-card { background: transparent; border: none; box-shadow: none; }
        body.light-mode .latest-news h2, body.light-mode #stories-reel-container h2 { color: #000000 !important; }
        body.light-mode #trending-section h2,
        body.light-mode #trending-grid h3 { color: #120a88 !important; }
        body.light-mode .latest-news a { color: #0d6efd; }
        body.light-mode .news-card-content h2 a { color: #333; }
        body.light-mode .news-card-info h3 { color: #333 !important; }
        body.light-mode .blog-desc-container { background: rgba(0,0,0,0.03) !important; }
        body.light-mode .blog-desc-text { color: #555 !important; }
        body.light-mode .news-card-content p { color: #555; }
        body.light-mode .article-meta { color: #666; }
        body.light-mode .blog-action-btn:hover { background-color: rgba(0, 0, 0, 0.05); }
        body.light-mode .shayari-p { color: #444; background: #f8f9fa; }
        body.light-mode footer { background: rgba(0,0,0,0.03); color: #666; border-top-color: #ddd; }
        body.light-mode .comment-actions { color: #666; }
        body.light-mode .comment-action-btn:hover { color: #000; }
        body.light-mode .search-input-container { background: #fff; border-color: #ccc; }
        body.light-mode .search-input-container input { color: #333; }
        body.light-mode .search-input-container .search-btn { background: #f8f9fa; border-left-color: #ccc; color: #333; }
        body.light-mode .header { background: #fff; }
        body.light-mode .header-center.search-active { background: #fff !important; }
        body.light-mode .header-center.search-active #mobile-search-back svg { stroke: #0f0f0f !important; }
        body.light-mode .header-center.search-active .search-input-container { background: #b13e3e !important; border-color: #f0f0f0 !important; }
        body.light-mode .header-center.search-active .search-input-container input { color: #0f0f0f !important; }
        body.light-mode .header-center.search-active .search-input-container .search-btn { background: #e0e0e0 !important; border-left-color: #ccc !important; color: #333 !important; }
        body.light-mode .search-results,
        body.light-mode .notif-dropdown,
        body.light-mode .btn-vertical { color: #333; }
        body.light-mode .theme-btn { color: #333 !important; }
        body.light-mode .btn-transparent { color: #333 !important; }
    body.light-mode .btn-transparent::before, body.light-mode .btn-vertical::before, body.light-mode .theme-btn::before { background: linear-gradient(45deg, #0d6efd, #a855f7); }
    body.light-mode .btn-transparent:hover, body.light-mode .btn-vertical:hover, body.light-mode .theme-btn:hover { box-shadow: 0 4px 20px rgba(13, 110, 253, 0.3); }
    body.light-mode .bottom-nav .add-btn-inner { background: linear-gradient(135deg, #0d6efd, #a855f7); box-shadow: 0 4px 10px rgba(13, 110, 253, 0.4); }
        body.light-mode .header-icon-btn svg { stroke: #0f0f0f !important; }
    body.light-mode .menu-icon-btn { color: #333; }
    body.light-mode .header-text-btn {
        background: linear-gradient(45deg, #0d6efd, #a855f7);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
    body.light-mode .header-text-btn svg { stroke: url(#icon-gradient-light) !important; }

    /* Universal Light Mode Fixes for inline white text */
    body.light-mode [style*="color: #fff"], 
    body.light-mode [style*="color: white"],
    body.light-mode [style*="color:#fff"], 
    body.light-mode [style*="color:white"],
    body.light-mode [style*="color: #FFF"],
    body.light-mode [style*="color: #ffffff"],
    body.light-mode [style*="color:#ffffff"],
    body.light-mode [style*="color: #eee"],
    body.light-mode [style*="color:#eee"],
    body.light-mode [style*="color: #ddd"],
    body.light-mode [style*="color:#ddd"],
    body.light-mode [style*="rgb(255, 255, 255)"],
    body.light-mode [style*="rgb(238, 238, 238)"],
    body.light-mode [style*="rgb(221, 221, 221)"] {
        color: #333 !important;
    }

    /* Explicit Class Overrides for texts */
    body.light-mode .card-title-text, body.light-mode .grid-title-text,
    body.light-mode .news-card-content p, body.light-mode .blog-desc-text,
    body.light-mode .comment-text, body.light-mode .comment-author,
    body.light-mode .news-card-info h3, body.light-mode .card-comments-box h3,
    body.light-mode .poll-container h4 { color: #333 !important; }
    
    body.light-mode #watch-show-more-btn { color: #0d6efd !important; }

    body.light-mode .comment-date, body.light-mode .article-meta { color: #666 !important; }

    /* EXCEPTIONS where text MUST remain white in light mode */
    body.light-mode .btn,
    body.light-mode .btn[style*="color"],
    body.light-mode .add-story-badge,
    body.light-mode .video-thumbnail + div, 
    body.light-mode .flick-thumbnail + div,
    body.light-mode .flick-grid-stats,
    body.light-mode .flick-grid-duration,
    body.light-mode .flick-grid-actions button,
    body.light-mode .watch-video-container [style*="color"],
    body.light-mode .video-container [style*="color"],
    body.light-mode .flick-item .overlay [style*="color"],
    body.light-mode .toast,
    body.light-mode .toast [style*="color"],
    body.light-mode .flick-item .sidebar [style*="color"],
    body.light-mode #flicks-heart-anim,
    body.light-mode .bottom-nav .add-btn-inner,
    body.light-mode .bottom-nav .add-btn-inner [style*="color"] {
        color: #fff !important;
    }
    
    /* Specific tweaks for Search, Notifications, Modals */
    body.light-mode .search-results,
    body.light-mode .notif-dropdown,
    body.light-mode .theme-dropdown,
    body.light-mode #user-list-modal > div,
    body.light-mode #password-modal > div,
    body.light-mode #cropper-modal > div {
        background: #ffffff !important;
        border-color: #dddddd !important;
        color: #333333 !important;
    }
    body.light-mode .theme-option { border-color: #eeeeee !important; color: #333333 !important; }
    body.light-mode .theme-option:hover { background: rgba(0,0,0,0.05) !important; }
    body.light-mode .search-result-item { border-bottom-color: #eeeeee !important; }
    body.light-mode .search-result-item:hover { background: #f0f0f0 !important; }
    body.light-mode .notif-item { border-bottom-color: #eeeeee !important; color: #333333 !important; }
    body.light-mode .notif-item strong { color: #0d6efd !important; }

        /* Theme Dropdown Styles */
    .theme-dropdown-container { position: relative; display: inline-block; }
        .theme-dropdown { position: absolute; bottom: 100%; right: 0; background: rgba(20, 20, 20, 0.9); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 10px; display: none; flex-direction: column; gap: 8px; z-index: 1000; min-width: 220px; box-shadow: 0 -10px 30px rgba(0,0,0,0.5); margin-bottom: 5px; }        
        .theme-dropdown.show { display: flex; animation: slideUp 0.2s ease; }
        .theme-dropdown::-webkit-scrollbar { width: 4px; }
        .theme-dropdown::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }
    .theme-option { padding: 10px 15px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); cursor: pointer; font-weight: bold; text-align: left; display: flex; align-items: center; justify-content: flex-start; gap: 12px; transition: transform 0.2s, box-shadow 0.2s; font-family: inherit; font-size: 0.9rem; width: 100%; box-sizing: border-box; white-space: nowrap; }
        .theme-option:hover { transform: scale(1.05); }
        .theme-option.active { border: 2px solid #f59e0b; box-shadow: 0 0 12px rgba(245, 158, 11, 0.4); transform: scale(1.02); }

        /* 5 New Futuristic Themes */
        /* Cyberpunk Mode */
        body.cyberpunk-mode { background: radial-gradient(circle at top right, #3a0ca3, #050505); color: #ff007c; }
        body.cyberpunk-mode .latest-news h2 { color: #ff007c; border-bottom-color: rgba(255, 0, 124, 0.2); }
        body.cyberpunk-mode .news-card, body.cyberpunk-mode .latest-news { border-color: rgba(255, 0, 124, 0.2); }
        body.cyberpunk-mode .btn { background: linear-gradient(135deg, #f72585, #4361ee); box-shadow: 0 4px 15px rgba(247, 37, 133, 0.3); }
        body.cyberpunk-mode .btn-transparent::before, body.cyberpunk-mode .btn-vertical::before, body.cyberpunk-mode .theme-btn::before { background: linear-gradient(45deg, #f72585, #4361ee); }
        body.cyberpunk-mode .btn-transparent:hover, body.cyberpunk-mode .btn-vertical:hover, body.cyberpunk-mode .theme-btn:hover { box-shadow: 0 4px 20px rgba(247, 37, 133, 0.4); }
        body.cyberpunk-mode .category-chip.active, body.cyberpunk-mode .category-chip:hover, body.cyberpunk-mode .feed-btn.active, body.cyberpunk-mode .feed-btn:hover { background-color: #f72585 !important; color: white !important; border-color: #f72585 !important; }
        body.cyberpunk-mode .bottom-nav .add-btn-inner { background: linear-gradient(135deg, #f72585, #4361ee); box-shadow: 0 4px 10px rgba(247, 37, 133, 0.4); }
        /* Matrix Mode */
        body.matrix-mode { background: radial-gradient(circle at top, #003300, #050505); color: #00ff41; }
        body.matrix-mode .latest-news h2 { color: #00ff41; border-bottom-color: rgba(0, 255, 65, 0.2); }
        body.matrix-mode .news-card, body.matrix-mode .latest-news { border-color: rgba(0, 255, 65, 0.2); }
        body.matrix-mode .btn { background: linear-gradient(135deg, #00b4d8, #00ff41); box-shadow: 0 4px 15px rgba(0, 255, 65, 0.3); color: #000; }
        body.matrix-mode .btn-transparent::before, body.matrix-mode .btn-vertical::before, body.matrix-mode .theme-btn::before { background: linear-gradient(45deg, #00b4d8, #00ff41); }
        body.matrix-mode .btn-transparent:hover, body.matrix-mode .btn-vertical:hover, body.matrix-mode .theme-btn:hover { box-shadow: 0 4px 20px rgba(0, 255, 65, 0.4); }
        body.matrix-mode .category-chip.active, body.matrix-mode .category-chip:hover, body.matrix-mode .feed-btn.active, body.matrix-mode .feed-btn:hover { background-color: #00ff41 !important; color: black !important; border-color: #00ff41 !important; }
        body.matrix-mode .bottom-nav .add-btn-inner { background: linear-gradient(135deg, #00b4d8, #00ff41); box-shadow: 0 4px 10px rgba(0, 255, 65, 0.4); color: #000; }
        /* Ocean Mode */
        body.ocean-mode { background: radial-gradient(circle at top left, #0077b6, #050505); color: #90e0ef; }
        body.ocean-mode .latest-news h2 { color: #90e0ef; border-bottom-color: rgba(144, 224, 239, 0.2); }
        body.ocean-mode .btn { background: linear-gradient(135deg, #0077b6, #00b4d8); box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3); }
        body.ocean-mode .btn-transparent::before, body.ocean-mode .btn-vertical::before, body.ocean-mode .theme-btn::before { background: linear-gradient(45deg, #0077b6, #00b4d8); }
        body.ocean-mode .btn-transparent:hover, body.ocean-mode .btn-vertical:hover, body.ocean-mode .theme-btn:hover { box-shadow: 0 4px 20px rgba(0, 180, 216, 0.4); }
        body.ocean-mode .category-chip.active, body.ocean-mode .category-chip:hover, body.ocean-mode .feed-btn.active, body.ocean-mode .feed-btn:hover { background-color: #00b4d8 !important; color: black !important; border-color: #00b4d8 !important; }
        body.ocean-mode .bottom-nav .add-btn-inner { background: linear-gradient(135deg, #0077b6, #00b4d8); box-shadow: 0 4px 10px rgba(0, 119, 182, 0.4); }
        /* Dracula Mode */
        body.dracula-mode { background: #282a36; color: #f8f8f2; }
        body.dracula-mode .latest-news h2 { color: #ff79c6; border-bottom-color: rgba(255, 121, 198, 0.2); }
        body.dracula-mode .btn { background: linear-gradient(135deg, #bd93f9, #ff79c6); box-shadow: 0 4px 15px rgba(189, 147, 249, 0.3); }
        body.dracula-mode .btn-transparent::before, body.dracula-mode .btn-vertical::before, body.dracula-mode .theme-btn::before { background: linear-gradient(45deg, #bd93f9, #ff79c6); }
        body.dracula-mode .btn-transparent:hover, body.dracula-mode .btn-vertical:hover, body.dracula-mode .theme-btn:hover { box-shadow: 0 4px 20px rgba(189, 147, 249, 0.4); }
        body.dracula-mode .category-chip.active, body.dracula-mode .category-chip:hover, body.dracula-mode .feed-btn.active, body.dracula-mode .feed-btn:hover { background-color: #bd93f9 !important; color: black !important; border-color: #bd93f9 !important; }
        body.dracula-mode .bottom-nav .add-btn-inner { background: linear-gradient(135deg, #bd93f9, #ff79c6); box-shadow: 0 4px 10px rgba(189, 147, 249, 0.4); }
        /* Solar Mode */
        body.solar-mode { background: radial-gradient(circle at center, #370617, #03071e); color: #ffba08; }
        body.solar-mode .latest-news h2 { color: #ffba08; border-bottom-color: rgba(255, 186, 8, 0.2); }
        body.solar-mode .btn { background: linear-gradient(135deg, #dc2f02, #ffba08); box-shadow: 0 4px 15px rgba(220, 47, 2, 0.3); }
        body.solar-mode .btn-transparent::before, body.solar-mode .btn-vertical::before, body.solar-mode .theme-btn::before { background: linear-gradient(45deg, #dc2f02, #ffba08); }
        body.solar-mode .btn-transparent:hover, body.solar-mode .btn-vertical:hover, body.solar-mode .theme-btn:hover { box-shadow: 0 4px 20px rgba(255, 186, 8, 0.4); }
        body.solar-mode .category-chip.active, body.solar-mode .category-chip:hover, body.solar-mode .feed-btn.active, body.solar-mode .feed-btn:hover { background-color: #ffba08 !important; color: black !important; border-color: #ffba08 !important; }
        body.solar-mode .bottom-nav .add-btn-inner { background: linear-gradient(135deg, #dc2f02, #ffba08); box-shadow: 0 4px 10px rgba(220, 47, 2, 0.4); }
        
        /* Cookie Banner Light Mode */
        body.light-mode #cookie-consent-banner { background: rgba(255, 255, 255, 0.95) !important; border-top-color: #ddd !important; }
        body.light-mode #cookie-consent-banner p { color: #333 !important; }
        .feed-btn {
            background-color: #1a1a1a;
            color: white;
            border: 1px solid #333;
            padding: 8px 18px !important;
            border-radius: 20px !important;
            cursor: pointer;
            font-size: 14px !important;
            transition: 0.3s;
            flex-shrink: 0 !important; /* Isse buttons sikudte (squeeze) nahi hain */
            white-space: nowrap;
        }
        .feed-btn svg { width: 14px !important; height: 14px !important; margin-right: 4px; }
        .feed-btn.active, .feed-btn:hover {
        background-color: #6366f1 !important; /* Indigo default */
        color: white !important;
        border-color: #6366f1 !important;
            box-shadow: none;
            transform: none;
        }
        #feed-verified-btn {
            /* Color override hata diya hai taaki naya green theme kaam kare */
        }
        #feed-verified-btn.active {
        /* Now handled universally by .feed-btn.active */
        }
        body.light-mode .feed-btn {
            color: #555;
            border-color: #ccc;
            background-color: #f0f0f0;
        }
        body.light-mode #feed-verified-btn {
            /* Default light mode override */
        }
        #flicks-reel::-webkit-scrollbar { display: none; }
/* Container jo puri width lega */
.category-wrapper {
    width: 100%;
    margin-bottom: 15px;
}

/* Scrolling area */
.category-scroll {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap; /* Reverting for compatibility, as flex-wrap was not working as expected */
    gap: 10px;
    padding: 0 5px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iOS */
}

.category-scroll::-webkit-scrollbar {
    display: none; /* Scrollbar ko hide karega */
}

#stories-reel {
    box-sizing: border-box;
}
#trending-grid {
    box-sizing: border-box;
}
 #flicks-reel {
    box-sizing: border-box;
}

        .category-chip {
            background-color: #1a1a1a;
            color: white;
            border: 1px solid #333;
            padding: 8px 18px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
            transition: 0.3s;
            flex-shrink: 0; /* Isse buttons sikudte (squeeze) nahi hain */
            white-space: nowrap;
        }
        .category-chip:hover, .category-chip.active {
        background-color: #6366f1; /* Indigo default */
        color: white;
        border-color: #6366f1;
        }
        body.light-mode .category-chip { background: #f0f0f0; border-color: #ccc; color: #555; }
    body.light-mode .category-chip.active, body.light-mode .category-chip:hover { background: #0d6efd; color: white; border-color: #0d6efd; }

        /* Toast Notification */
        #toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
        .toast { background: #333; color: white; padding: 15px 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateX(100%); transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); min-width: 250px; max-width: 350px; }
        .toast.show { opacity: 1; transform: translateX(0); }
        .toast.success { border-left: 5px solid #10b981; }
        .toast.error { border-left: 5px solid #ef4444; }
        .toast.info { border-left: 5px solid #6366f1; }
        .toast-icon { font-size: 1.2rem; }
        body.light-mode .toast { background: #fff; color: #333; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

    /* Rotating Loader Animation */
    .fa-spin { animation: spin 1s linear infinite; }
    @keyframes spin { 100% { transform: rotate(360deg); } }

    /* Bottom Navigation Bar */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: none;
        z-index: 2500;
        justify-content: center;
        align-items: center;
        padding: 10px 0;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        gap: 10%; /* Space out icons on desktop */
    }

    .header-icon-btn {
        background: transparent;
        border: none;
            padding: 8px;
            border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        outline: none;
            transition: background 0.2s;
        position: relative;
    }
        .header-icon-btn svg { width: 24px; height: 24px; stroke: #fff !important; }
        .header-icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
    
    body.light-mode .bottom-nav { background: rgba(255, 255, 255, 0.95); border-top: none; }
    
    .bottom-nav .nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #888; font-size: 0.7rem; gap: 4px; transition: color 0.2s, transform 0.2s; width: 60px; }
    .bottom-nav .nav-item:hover, .bottom-nav .nav-item.active { color: #fff; transform: translateY(-2px); }
    body.light-mode .bottom-nav .nav-item:hover, body.light-mode .bottom-nav .nav-item.active { color: #0d6efd; }
    
    .bottom-nav .add-btn-inner {
        background: linear-gradient(135deg, #6366f1, #a855f7);
        border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
        color: white; box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
        margin-top: -20px; border: 4px solid #050505; transition: transform 0.2s;
    }
    body.light-mode .bottom-nav .add-btn-inner { border-color: #f4f7f6; }
    .bottom-nav .add-btn:hover .add-btn-inner { transform: scale(1.1); }

    @media (max-width: 768px) {
        .bottom-nav { justify-content: space-around; gap: 0; }
        .bottom-nav .nav-item { flex: 1; }
        
        /* Move back-to-top button slightly higher so it doesn't overlap the bottom nav */
        .back-to-top-btn { bottom: 85px; right: 15px; width: 40px; height: 40px; line-height: 40px; font-size: 18px; }
    }