* {
    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: #c4c4c4;
    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: 8px;
    flex-shrink: 0;   /* 🔥 VERY IMPORTANT */
}
.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 {
    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 .mic-btn i {
    color: white !important;
}

/* 🔥 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===============================*/
.menu-wrapper {
    position: relative;
}

.menu-dropdown {
    position: absolute;
    right: 0;
    top: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    display: none;
    min-width: 120px;
    z-index: 100;
}

.menu-dropdown div {
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
}

.menu-dropdown div:hover {
    background: #f2f2f2;
}

.menu-wrapper.active .menu-dropdown {
    display: block;
}
/* 🔥 FIX ALIGNMENT */
.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 🔥 RIGHT SIDE BUTTON GROUP */
.video-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 🔥 MENU IMPROVE */
.menu-dropdown {
    top: 35px;
    right: 0;
    padding: 6px 0;
    border-radius: 10px;
}

/* 🔥 SMOOTH LOOK */
.menu-dropdown div {
    padding: 10px 14px;
    font-size: 13px;
}

/* 🔥 HOVER EFFECT */
.menu-dropdown div:hover {
    background: #f0f0f0;
}

/* 🔥 ICON BUTTON SIZE FIX */
.like-btn {
    padding: 4px;
}
.menu-wrapper {
    position: relative;
}

.menu-dropdown {
    position: absolute;
    top: 100%;      /* button ke bilkul niche */
    right: 0;
    margin-top: 0;  /* ❌ gap remove */
    z-index: 9999;
}
.menu-wrapper {
    position: relative;
    padding-bottom: 8px;   /* 🔥 invisible hover bridge */
}
.menu-dropdown {
    pointer-events: auto;
}
/* Video card hover scale tabhi apply hoga jab menu band ho */
.video-card {
    transition: transform 0.1s ease;
}
.video-card:hover {
    transform: scale(1.02);
}
/* Jab kisi bhi card ka menu open ho, to us card ki scaling band kar do */
.video-card.menu-open,
.video-card:has(.menu-wrapper.active) {
    transform: none !important;
}

/* Menu wrapper – safe hover zone */
.menu-wrapper {
    position: relative;
}

/* Dropdown ko button ke bilkul neeche, thoda sa gap dekar lekin bridge banakar */
.menu-dropdown {
    position: absolute;
    top: calc(100% + 4px);   /* 4px ka chhota gap, par bridge banayenge */
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 150px;
    z-index: 9999;
    display: none;
}

/* 🔥 IMPORTANT: Invisible hover bridge (button se dropdown tak) */
.menu-wrapper::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;          /* bridge height */
    background: transparent;
    pointer-events: auto;
    z-index: 9998;
}

/* Jab menu active ho to dropdown dikhao */
.menu-wrapper.active .menu-dropdown {
    display: block;
    animation: fadeIn 0.1s ease;
}

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

/* Dropdown items style */
.menu-dropdown div {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.menu-dropdown div:hover {
    background: #f2f2f2;
}











.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); }
}