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

        body {
            font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
            background-color: #f9f9f9;
            color: #0f0f0f;
            overflow-x: hidden;
        }

        .app {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        .header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 16px;
            height: 56px;
            background-color: white;
            border-bottom: 1px solid #e5e5e5;
            position: sticky;
            top: 0;
            z-index: 100;
            flex-shrink: 0;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .menu-icon {
            cursor: pointer;
            font-size: 24px;
        }

        .logo-icon {
            display: flex;
            align-items: center;
            gap: 4px;
            font-weight: 700;
            font-size: 20px;
            letter-spacing: -0.5px;
            cursor: pointer;
        }

        .logo-icon .yt-icon {
            color: #ff0000;
            font-size: 28px;
        }

        .logo-text {
            font-family: 'Roboto', sans-serif;
            font-weight: 700;
            font-size: 20px;
        }

        /* Desktop Search Bar with suggestions dropdown */
        .header-center {
            flex: 1;
            max-width: 600px;
            display: flex;
            align-items: center;
            margin: 0 20px;
            position: relative;
        }

        .search-box {
            display: flex;
            flex: 1;
            height: 40px;
        }

        .search-box input {
            flex: 1;
            padding: 0 12px;
            font-size: 16px;
            border: 1px solid #cccccc;
            border-right: none;
            border-radius: 40px 0 0 40px;
            outline: none;
            font-family: 'Roboto', sans-serif;
        }

        .search-box input:focus {
            border-color: #1c62b9;
        }

        .search-btn {
            width: 64px;
            background: #dcd8d880;
            border: 1px solid #cccccc;
            border-left: none;
            border-radius: 0 40px 40px 0;
            cursor: pointer;
            font-size: 18px;
            transition: background 0.1s;
        }

        .search-btn:hover {
            background: #e5e5e5;
        }

        .mic-btn {
            width: 40px;
            height: 40px;
            background: #f0f0f0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 12px;
            cursor: pointer;
            border: none;
            font-size: 18px;
            transition: background 0.2s;
        }

        .mic-btn.listening {
            background-color: #ff4444;
            color: white;
            animation: pulse 1.2s infinite;
        }

        @keyframes pulse {
            0% {
                transform: scale(1);
                opacity: 1;
            }

            50% {
                transform: scale(1.05);
                opacity: 0.8;
            }

            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        /* Search suggestions dropdown (desktop) */
        .search-suggestions-dropdown {
            position: absolute;
            top: 48px;
            left: 0;
            right: 60px;
            background: white;
            border-radius: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            z-index: 150;
            max-height: 400px;
            overflow-y: auto;
            display: none;
            border: 1px solid #e5e5e5;
        }

        .search-suggestions-dropdown.show {
            display: block;
        }

        .suggestion-item-dropdown {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            cursor: pointer;
            font-size: 14px;
            transition: background 0.1s;
            border-bottom: 1px solid #f0f0f0;
        }

        .suggestion-item-dropdown i {
            color: #606060;
            width: 20px;
            font-size: 14px;
        }

        .suggestion-item-dropdown:hover {
            background-color: #f2f2f2;
        }

        .suggestion-item-dropdown .suggestion-text {
            flex: 1;
            color: #0f0f0f;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .header-right i {
            font-size: 22px;
            cursor: pointer;
            color: #0f0f0f;
        }

        .search-trigger-icon {
            font-size: 22px;
            cursor: pointer;
        }

        .avatar {
            width: 32px;
            height: 32px;
            background-color: #4c6ef5;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 14px;
            cursor: pointer;
        }

        /* MAIN LAYOUT */
        .main-layout {
            display: flex;
            flex: 1;
            position: relative;
            padding-right: 0 !important;
            margin-right: 0 !important;
        }

        /* DESKTOP SIDEBAR */
        .desktop-sidebar {
            width: 240px;
            background-color: white;
            padding: 12px 0;
            overflow-y: auto;
            flex-shrink: 0;
            border-right: 1px solid #e5e5e5;
            white-space: nowrap;
            transition: width 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            position: sticky;
            top: 56px;
            height: calc(100vh - 56px);
        }

        .desktop-sidebar.collapsed {
            width: 72px;
        }

        .desktop-sidebar.collapsed .sidebar-item {
            justify-content: center;
            padding: 10px 0;
            gap: 0;
        }

        .desktop-sidebar.collapsed .sidebar-item span {
            display: none;
        }

        .desktop-sidebar.collapsed .sidebar-item i {
            margin: 0;
            font-size: 20px;
        }

        .desktop-sidebar.collapsed .sidebar-divider,
        .desktop-sidebar.collapsed .sidebar-title {
            display: none;
        }

        .desktop-sidebar .sidebar-item {
            display: flex;
            align-items: center;
            gap: 24px;
            padding: 10px 24px;
            font-size: 14px;
            font-weight: 400;
            cursor: pointer;
            color: #0f0f0f;
            transition: background 0.1s;
        }

        .desktop-sidebar .sidebar-item i {
            width: 22px;
            font-size: 18px;
            flex-shrink: 0;
        }

        .desktop-sidebar .sidebar-item:hover {
            background-color: #f2f2f2;
        }

        .desktop-sidebar .sidebar-item.active {
            background-color: #e5e5e5;
            font-weight: 500;
        }

        .desktop-sidebar .sidebar-divider {
            height: 1px;
            background-color: #e5e5e5;
            margin: 12px 0;
        }

        .desktop-sidebar .sidebar-title {
            padding: 8px 24px;
            font-size: 14px;
            font-weight: 500;
            color: #606060;
        }

        /* MAIN CONTENT */
        .content {
            flex: 1;
            width: 100%;
            overflow-x: hidden;
            overflow-y: auto;
            margin-top: 60px;
            padding-right: 0 !important;
            margin-right: 0 !important;
        }

        #dynamicContent {
            flex: 1;
            display: flex;
            width: 100%;
        }

        /* FIXED/STICKY CHIPS ROW (LIKE YOUTUBE) */
        .chips-row {
            position: fixed;
            top: 56px;
            left: 240px;
            right: 0;
            z-index: 50;
            background: #f9f9f9;
            display: flex;
            gap: 12px;
            overflow-x: auto;
            white-space: nowrap;
            padding: 10px 16px;
            scrollbar-width: none;
        }

        .chips-row::-webkit-scrollbar {
            display: none;
        }

        .chip {
            background-color: #f2f2f2;
            padding: 6px 14px;
            border-radius: 32px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.1s, transform 0.05s;
            flex-shrink: 0;
        }

        .chip.active {
            background-color: #0f0f0f;
            color: white;
        }

        .chip:hover {
            background-color: #e5e5e5;
        }

        .chip.active:hover {
            background-color: #2c2c2c;
        }

        /* VIDEO GRID - FIXED: no right space, exactly 3 cards per row */
        .video-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            width: 100%;
            margin-right: 0 !important;
        }

        .video-card {
            display: flex;
            flex-direction: column;
            cursor: pointer;
            transition: transform 0.1s ease;
            min-width: 0;
        }

        .thumbnail {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 9;
            border-radius: 12px;
            overflow: hidden;
            background-color: #e5e5e5;
        }

        .thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.2s;
        }

        .video-card:hover .thumbnail img {
            transform: scale(1.02);
        }

        .video-details {
            display: flex;
            margin-top: 12px;
            gap: 12px;
        }

        .channel-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background-color: #beadad;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
            text-transform: uppercase;
        }

        .video-info {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .title-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            overflow: visible;
            /* ✅ FIX */
            width: 100%;
        }

        .video-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
            position: relative;
        }

        .video-title {
            flex: 1;
            min-width: 0;
            overflow: hidden;
        }

        .video-grid {
            padding-right: 25px;
            /* 🔥 ADD (space for last card icons) */
        }

        .like-btn {
            flex-shrink: 0;
        }

        .video-title {
            font-weight: 500;
            font-size: 16px;
            line-height: 1.4;
            margin-bottom: 4px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            flex: 1;
        }

        .channel-name,
        .video-stats {
            font-size: 13px;
            color: #606060;
        }

        .video-actions {
            margin-top: 6px;
        }

        .like-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: #606060;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .like-btn i {
            font-size: 16px;
        }

        .like-btn.liked i {
            color: red;
        }

        /* MOBILE DRAWER */
        .drawer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 300;
            visibility: hidden;
            opacity: 0;
            transition: visibility 0.2s, opacity 0.2s;
        }

        .drawer-overlay.open {
            visibility: visible;
            opacity: 1;
        }

        .mobile-drawer {
            position: fixed;
            top: 0;
            left: -280px;
            width: 280px;
            height: 100%;
            background-color: white;
            z-index: 301;
            overflow-y: auto;
            transition: left 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
            padding: 12px 0;
        }

        .drawer-overlay.open .mobile-drawer {
            left: 0;
        }

        .mobile-drawer .sidebar-item {
            display: flex;
            align-items: center;
            gap: 24px;
            padding: 12px 24px;
            font-size: 16px;
            font-weight: 400;
            cursor: pointer;
            color: #0f0f0f;
        }

        .mobile-drawer .sidebar-item i {
            width: 24px;
            font-size: 20px;
        }

        .mobile-drawer .sidebar-item.active {
            background-color: #e5e5e5;
            font-weight: 500;
        }

        .mobile-drawer .sidebar-divider {
            height: 1px;
            background-color: #e5e5e5;
            margin: 12px 0;
        }

        .mobile-drawer .sidebar-title {
            padding: 8px 24px;
            font-size: 14px;
            font-weight: 500;
            color: #606060;
        }

        /* BOTTOM NAV (mobile) */
        .bottom-nav {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            background-color: white;
            border-top: 1px solid #e5e5e5;
            padding: 8px 16px;
            justify-content: space-around;
            z-index: 200;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            font-size: 10px;
            color: #606060;
            cursor: pointer;
            font-weight: 500;
        }

        .nav-item i {
            font-size: 20px;
        }

        .nav-item.active {
            color: #ff0000;
        }

        /* SEARCH OVERLAY (mobile only) */
        .search-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: white;
            z-index: 500;
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .search-overlay.open {
            transform: translateY(0);
        }

        .search-header {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            gap: 16px;
            border-bottom: 1px solid #e5e5e5;
            background-color: white;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .search-header .back-icon {
            font-size: 24px;
            cursor: pointer;
            background: none;
            border: none;
        }

        .search-input-wrapper {
            flex: 1;
            display: flex;
            align-items: center;
            background: #f0f0f0;
            border-radius: 40px;
            padding: 6px 12px;
            gap: 8px;
        }

        .search-input-wrapper i {
            color: #606060;
            font-size: 18px;
        }

        .search-input-wrapper input {
            flex: 1;
            border: none;
            background: transparent;
            font-size: 16px;
            outline: none;
            font-family: 'Roboto', sans-serif;
        }

        .search-input-wrapper .clear-search {
            cursor: pointer;
            font-size: 18px;
            color: #606060;
        }

        .voice-search-btn {
            background: #f0f0f0;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border: none;
            font-size: 18px;
        }

        .voice-search-btn.listening {
            background-color: #ff4444;
            color: white;
            animation: pulse 1s infinite;
        }

        .search-suggestions {
            padding: 16px;
            background: white;
        }

        .suggestion-item {
            padding: 12px 0;
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 16px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
        }

        .suggestion-item i {
            color: #606060;
            width: 24px;
        }

        /* ========== PROFESSIONAL POPUP STYLES ========== */
        #startTestPopup {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(8px);
            z-index: 9999;
            justify-content: center;
            align-items: center;
            font-family: 'Roboto', sans-serif;
        }

        .popup-container {
            background: #ffffff;
            width: 90%;
            max-width: 420px;
            border-radius: 32px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
            overflow: hidden;
            transform: scale(0.96);
            transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            animation: fadeSlideUp 0.25s ease-out forwards;
        }

        @keyframes fadeSlideUp {
            0% {
                opacity: 0;
                transform: translateY(20px) scale(0.96);
            }

            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .popup-header {
            background: linear-gradient(135deg, #0f172a, #1e293b);
            padding: 24px 24px 16px 24px;
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .popup-header h3 {
            font-size: 1.6rem;
            font-weight: 700;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 12px;
            letter-spacing: -0.3px;
        }

        .popup-header h3 i {
            font-size: 1.8rem;
            color: #ff6b6b;
        }

        .popup-close {
            background: rgba(255, 255, 255, 0.15);
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            color: white;
            font-size: 1.2rem;
        }

        .popup-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .popup-body {
            padding: 28px 24px 20px 24px;
            text-align: center;
        }

        .popup-icon {
            background: #fef2f2;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px auto;
        }

        .popup-icon i {
            font-size: 34px;
            color: #ff4d4d;
        }

        .popup-body p {
            font-size: 1rem;
            color: #334155;
            line-height: 1.5;
            margin-bottom: 8px;
        }

        .popup-body .test-warning {
            font-size: 0.85rem;
            color: #64748b;
            background: #f8fafc;
            padding: 12px;
            border-radius: 20px;
            margin-top: 20px;
            display: inline-block;
            width: 100%;
        }

        .popup-footer {
            display: flex;
            gap: 12px;
            padding: 8px 24px 28px 24px;
            background: #ffffff;
        }

        .btn-cancel-popup,
        .btn-start-popup {
            flex: 1;
            padding: 12px 0;
            border-radius: 60px;
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            font-family: 'Roboto', sans-serif;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-cancel-popup {
            background: #f1f5f9;
            color: #1e293b;
        }

        .btn-cancel-popup:hover {
            background: #e2e8f0;
            transform: translateY(-2px);
        }

        .btn-start-popup {
            background: linear-gradient(95deg, #0f172a, #1e293b);
            color: white;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .btn-start-popup:hover {
            background: linear-gradient(95deg, #1e293b, #0f172a);
            transform: translateY(-2px);
            box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.2);
        }

        .btn-start-popup i {
            transition: transform 0.2s;
        }

        .btn-start-popup:hover i {
            transform: translateX(4px);
        }

        /* ========== IMPROVED PROFILE SIDEBAR ========== */
        .profile-sidebar {
            position: fixed;
            top: 0;
            right: -360px;
            width: 360px;
            max-width: 90%;
            height: 100%;
            background: #fff;
            z-index: 1000;
            box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
            transition: right 0.3s ease;
            overflow-y: auto;
            font-family: 'Roboto', sans-serif;
        }

        .profile-sidebar.open {
            right: 0;
        }

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

        .profile-overlay.show {
            display: block;
        }

        .profile-sidebar .profile-header {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 24px 20px;
            border-bottom: 1px solid #e5e5e5;
            background: #fff;
        }

        .profile-sidebar .profile-avatar-large {
            width: 56px;
            height: 56px;
            background-color: #4c6ef5;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            font-weight: bold;
            color: white;
        }

        .profile-sidebar .profile-info h3 {
            font-size: 18px;
            font-weight: 500;
            margin-bottom: 4px;
        }

        .profile-sidebar .profile-info p {
            font-size: 14px;
            color: #606060;
        }

        .profile-menu-item {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 12px 20px;
            font-size: 14px;
            cursor: pointer;
            transition: background 0.1s;
            color: #0f0f0f;
        }

        .profile-menu-item i {
            width: 24px;
            font-size: 18px;
            color: #606060;
        }

        .profile-menu-item:hover {
            background-color: #f2f2f2;
        }

        .profile-divider {
            height: 1px;
            background-color: #e5e5e5;
            margin: 8px 0;
        }

        .profile-label {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .profile-label span:first-child {
            font-weight: 400;
        }

        .profile-label span:last-child {
            color: #0f0f0f;
            font-weight: 500;
        }

        .close-sidebar-icon {
            position: absolute;
            top: 16px;
            right: 16px;
            font-size: 20px;
            cursor: pointer;
            color: #606060;
            background: #f0f0f0;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .close-sidebar-icon:hover {
            background: #e5e5e5;
        }

        .create-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            font-size: 16px;
        }

        /* ========== RESPONSIVE BREAKPOINTS ========== */
        @media (max-width: 768px) {
            .desktop-sidebar {
                display: none;
            }

            .bottom-nav {
                display: flex;
            }

            .content {
                padding: 0 12px 20px 12px;
                margin-top: 56px;
            }

            .video-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .header-center {
                display: none;
            }

            .search-trigger-icon {
                display: inline-block;
            }

            .chips-row {
                top: 56px;
                left: 0;
                background-color: #f9f9f9;
                padding: 8px 12px;
                gap: 8px;
            }

            .chip {
                font-size: 12px;
                padding: 5px 12px;
            }

            .create-btn span {
                display: none;
            }

            .profile-sidebar {
                width: 100%;
                right: -100%;
            }

            .drawer-overlay,
            .mobile-drawer {
                display: block;
            }
        }

        @media (min-width: 769px) {

            .drawer-overlay,
            .mobile-drawer {
                display: none;
            }

            .bottom-nav {
                display: none;
            }

            .header-center {
                display: flex;
            }

            .search-trigger-icon {
                display: none;
            }
        }

        @media (min-width: 769px) and (max-width: 1024px) {
            .video-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (min-width: 1025px) {
            .video-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        #themeOptions .profile-menu-item {
            font-size: 14px;
            background: #f5f5f5;
            margin: 3px 0;
            border-radius: 6px;
        }

        body.dark-mode #themeOptions .profile-menu-item {
            background: #1e293b;
            color: white;
        }

        /*==================================change moode for white to dark dark to white ==========*/
        /* 🔥 YOUTUBE STYLE DARK MODE */

        body.dark-mode .mobile-drawer {
            background-color: #202020;
        }

        body.dark-mode .like-btn {
            color: white !important;
        }

        body.dark-mode .header-right i {
            color: white !important;
        }

        body.dark-mode {
            background-color: #0f0f0f;
            color: #ffffff;
        }

        /* HEADER */
        body.dark-mode .header {
            background-color: #202020;
            border-bottom: 1px solid #303030;
        }

        /* SIDEBAR */
        body.dark-mode .desktop-sidebar {
            background-color: #202020;
            border-right: 1px solid #303030;
        }

        body.dark-mode .sidebar-item {
            color: #ffffff;
        }

        body.dark-mode .sidebar-item:hover {
            background-color: #303030;
        }

        body.dark-mode .sidebar-item.active {
            background-color: #3f3f3f;
        }

        /* CONTENT BACKGROUND */
        body.dark-mode .content {
            background-color: #0f0f0f;
        }

        /* 🔥 VIDEO CARDS (IMPORTANT) */
        body.dark-mode .video-card {
            background-color: #181818;
            border-radius: 12px;
            padding: 8px;
        }

        /* TEXT */
        body.dark-mode .video-title {
            color: #ffffff;
        }

        body.dark-mode .channel-name,
        body.dark-mode .video-stats {
            color: #aaaaaa;
        }

        /* SEARCH BAR */
        body.dark-mode .search-box input {
            background: #121212;
            color: white;
            border: 1px solid #303030;
        }

        body.dark-mode .search-btn {
            background: #303030;
            color: white;
        }

        /* CHIPS */
        body.dark-mode .chips-row {
            background: #0f0f0f;
        }

        body.dark-mode .chip {
            background-color: #272727;
            color: white;
        }

        body.dark-mode .chip.active {
            background-color: white;
            color: black;
        }

        /* PROFILE */
        body.dark-mode .profile-sidebar {
            background: #202020;
        }

        body.dark-mode .profile-menu-item {
            color: #ffffff;
        }

        body.dark-mode .profile-menu-item:hover {
            background-color: #303030;
        }

        .video-card {
            gap: 8px;
        }

        .video-card:hover {
            transform: scale(1.02);
        }

        /* 🔥 MIC BUTTON (VOICE INPUT) */
        body.dark-mode .mic-btn {
            background: #000000 !important;
            color: white !important;
        }

        body.dark-mode .search-overlay.open {
            background-color: #0f0f0f;
        }

        body.dark-mode .search-suggestions {
            background-color: #0f0f0f;
        }

        body.dark-mode .search-header {
            background-color: #0f0f0f;
        }

        body.dark-mode .profile-sidebar .profile-header {
            background-color: #202020;
        }

        body.dark-mode .bottom-nav {
            background: #202020;
        }

        body.dark-mode .profile-sidebar .profile-info p {
            color: #ffffffb8;
        }

        body.dark-mode .nav-item i {
            color: white !important;
        }

        body.dark-mode .nav-item {
            color: #dcd8d8;
        }

        body.dark-mode .mic-btn i {
            color: white !important;
        }

        body.dark-mode .profile-menu-item i {
            color: #ffffff;
        }

        /* 🔥 CREATE TEST ICON */
        body.dark-mode .create-btn i {
            color: white !important;
        }

        /* 🔥 CREATE TEXT */
        body.dark-mode .create-btn span {
            color: white !important;
        }

        /* 🔥 NOTIFICATION BELL */
        body.dark-mode #bellIcon {
            color: white !important;
        }

        /* 🔥 SEARCH ICON (extra clean look) */
        body.dark-mode .search-btn i {
            color: white !important;
        }

        .search-overlay {
            pointer-events: none;
        }

        .search-overlay.open {
            pointer-events: auto;
        }


        /*==========================: comment or follow button css===============================*/
        /* ===========================
   FOLLOW + COMMENT FIX CSS
=========================== */

        .video-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
            position: relative;
        }

        /* BUTTON STYLE */
        .like-btn,
        .menu-btn,
        .follow-btn {
            border: none;
            outline: none;
            cursor: pointer;
            transition: all .25s ease;
            font-family: 'Roboto', sans-serif;
        }

        /* ICON BUTTON */
        .like-btn {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f3f3f3;
            color: #111;
            position: relative;
            overflow: hidden;
        }

        /* HOVER */
        .like-btn:hover {
            background: #e8e8e8;
            transform: translateY(-2px);
        }

        .like-btn:active {
            transform: scale(.95);
        }

        /* LIKE ICON */
        .like-btn i {
            font-size: 15px;
        }

        .like-btn.liked {
            background: #ffe7e7;
        }

        .like-btn.liked i {
            color: red;
        }

        /* MENU */
        .menu-wrapper {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* DROPDOWN */
        .menu-dropdown {
            position: absolute;
            top: calc(100% + 6px);
            right: 0;

            min-width: 210px;

            background: #ffffff;
            border-radius: 18px;

            padding: 8px;

            display: none;

            z-index: 99999;

            border: 1px solid rgba(0, 0, 0, 0.06);

            box-shadow:
                0 12px 30px rgba(0, 0, 0, 0.14),
                0 4px 12px rgba(0, 0, 0, 0.08);

            animation: dropdownAnim .18s ease;
        }

        /* OPEN */
        .menu-wrapper.active .menu-dropdown {
            display: block;
        }

        /* ANIMATION */
        @keyframes dropdownAnim {
            from {
                opacity: 0;
                transform: translateY(-8px) scale(.96);
            }

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

        /* FOLLOW BUTTON */
        .follow-btn {
            width: 100%;
            padding: 13px 14px;

            border-radius: 14px;

            background: #f5f5f5;
            color: #111;

            font-size: 14px;
            font-weight: 600;

            display: flex;
            align-items: center;
            gap: 12px;

            margin-bottom: 6px;
        }

        /* FOLLOW HOVER */
        .follow-btn:hover {
            background: #ededed;
            transform: translateX(3px);
        }

        /* COMMENT BUTTON */
        .menu-dropdown div {
            width: 100%;

            padding: 13px 14px;

            border-radius: 14px;

            display: flex;
            align-items: center;
            gap: 12px;

            font-size: 14px;
            font-weight: 500;

            cursor: pointer;

            transition: all .22s ease;
        }

        /* COMMENT HOVER */
        .menu-dropdown div:hover {
            background: #f3f3f3;
            transform: translateX(3px);
        }

        /* SAFE HOVER GAP */
        .menu-wrapper::after {
            content: '';
            position: absolute;
            top: 100%;
            right: 0;
            width: 100%;
            height: 12px;
            background: transparent;
        }

        /* VIDEO CARD */
        .video-card {
            transition:
                transform .2s ease,
                box-shadow .2s ease;
        }

        /* CARD HOVER */
        .video-card:hover {
            transform: translateY(-3px);
        }

        /* MENU OPEN */
        .video-card:has(.menu-wrapper.active) {
            transform: none !important;
        }

        /* DARK MODE */
        body.dark-mode .like-btn {
            background: #2a2a2a;
            color: white;
        }

        body.dark-mode .like-btn:hover {
            background: #383838;
        }

        body.dark-mode .menu-dropdown {
            background: #202020;
            border: 1px solid #303030;
        }

        body.dark-mode .follow-btn {
            background: #2b2b2b;
            color: white;
        }

        body.dark-mode .follow-btn:hover {
            background: #3a3a3a;
        }

        body.dark-mode .menu-dropdown div {
            color: white;
        }

        body.dark-mode .menu-dropdown div:hover {
            background: #343434;
        }

        /* MOBILE */
        @media(max-width:768px) {

            .video-actions {
                gap: 6px;
            }

            .like-btn {
                width: 34px;
                height: 34px;
            }

            .menu-dropdown {
                min-width: 180px;
                right: -5px;
            }

            .follow-btn,
            .menu-dropdown div {
                padding: 12px;
                font-size: 13px;
            }
        }











        .voice-popup {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            z-index: 9999;
        }

        .voice-popup.active {
            display: flex;
        }

        .voice-circle {
            width: 120px;
            height: 120px;
            background: red;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: pulse 1.2s infinite;
        }

        .voice-circle i {
            color: white;
            font-size: 40px;
        }

        .voice-popup p {
            color: white;
            margin-top: 15px;
            font-size: 18px;
        }

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

            50% {
                transform: scale(1.1);
            }

            100% {
                transform: scale(1);
            }
        }

        .history-popup {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.45);
            display: none;
            align-items: flex-end;
            justify-content: center;
            z-index: 99999;
            animation: fadePopup 0.2s ease;
        }

        @keyframes fadePopup {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .popup-box {
            width: 100%;
            background: #fff;
            border-radius: 22px 22px 0 0;
            padding: 10px 0;
            animation: slideUp 0.25s ease;
        }

        @keyframes slideUp {
            from {
                transform: translateY(100%);
            }

            to {
                transform: translateY(0);
            }
        }

        .popup-box button {
            width: 100%;
            padding: 18px 22px;
            border: none;
            background: none;
            font-size: 16px;
            text-align: left;
            cursor: pointer;
            color: #111;
            font-weight: 400;
        }

        .popup-box button:hover {
            background: #f5f5f5;
        }

        .popup-box button:first-child {
            color: #d93025;
            font-weight: 500;
        }

        /* 🔥 YOUTUBE STYLE HISTORY POPUP FIX */

        .popup-box {
            max-width: 500px;
            margin: 0 auto;
            border-radius: 20px 20px 0 0;
            overflow: hidden;
        }

        .popup-box button {
            transition: background 0.2s ease;
        }

        .popup-box button:last-child {
            border-top: 1px solid #f0f0f0;
        }

        /* DARK MODE SUPPORT */
        body.dark-mode .history-popup {
            background: rgba(0, 0, 0, 0.7);
        }

        body.dark-mode .popup-box {
            background: #202020;
        }

        body.dark-mode .popup-box button {
            color: white;
        }

        body.dark-mode .popup-box button:hover {
            background: #303030;
        }

        body.dark-mode .popup-box button:last-child {
            border-top: 1px solid #303030;
        }

        /* =========================
   POPUP DARK MODE FIX
========================= */

        body.dark-mode #startTestPopup {
            background-color: rgba(0, 0, 0, 0.85);
        }

        body.dark-mode .popup-container {
            background: #202020;
            color: white;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
        }

        body.dark-mode .popup-header {
            background: linear-gradient(135deg, #000000, #111827);
            border-bottom: 1px solid #303030;
        }

        body.dark-mode .popup-header h3 {
            color: white;
        }

        body.dark-mode .popup-body {
            background: #202020;
        }

        body.dark-mode .popup-body p {
            color: #e5e5e5;
        }

        body.dark-mode .popup-icon {
            background: #2b2b2b;
        }

        body.dark-mode .popup-icon i {
            color: #ff4d4d;
        }

        body.dark-mode .test-warning {
            background: #2b2b2b;
            color: #cbd5e1;
            border: 1px solid #3a3a3a;
        }

        body.dark-mode .popup-footer {
            background: #202020;
        }

        body.dark-mode .btn-cancel-popup {
            background: #2b2b2b;
            color: white;
        }

        body.dark-mode .btn-cancel-popup:hover {
            background: #3a3a3a;
        }

        body.dark-mode .btn-start-popup {
            background: linear-gradient(95deg, #2563eb, #1d4ed8);
            color: white;
        }

        body.dark-mode .btn-start-popup:hover {
            background: linear-gradient(95deg, #1d4ed8, #2563eb);
        }

        body.dark-mode .popup-close {
            background: rgba(255, 255, 255, 0.08);
            color: white;
        }

        body.dark-mode .popup-close:hover {
            background: rgba(255, 255, 255, 0.18);
        }

        .thumbnail-placeholder {
            width: 100%;
            height: 260px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 20px;
            color: #fff;
            font-size: 28px;
            font-weight: 700;
            line-height: 1.4;
            text-transform: capitalize;
        }

        .thumbnail img {
            width: 100%;
            height: 260px;
            object-fit: cover;
            border-radius: 12px;
        }

        .follow-inline-btn {
            margin-left: 10px;
            padding: 4px 12px;
            border: none;
            border-radius: 20px;
            background: #2563eb;
            color: #fff;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
        }

        .follow-inline-btn:hover {
            background: #1d4ed8;
        }

        body.dark-mode .follow-inline-btn {
            background: #3b82f6;
        }

        .like-wrapper{
    display:flex;
    align-items:center;
    gap:6px;
}

.like-wrapper .like-count{
    font-size:14px;
    font-weight:600;
    color:#555;
    min-width:20px;
}

.like-wrapper .like-btn{
    width:38px;
    height:38px;
    border-radius:50%;
}

body.dark-mode .like-wrapper .like-count{
    color:#fff;
}