/* FarsTube Header Exact - based on the provided original HTML design */
.farstube-header-root {
    --bg-color: #f5f5f7;
    --surface-color: rgba(255, 255, 255, 0.75);
    --surface-solid: #ffffff;
    --surface-hover: rgba(0, 0, 0, 0.05);
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --primary: #ff3b30;
    --primary-glow: rgba(255, 59, 48, 0.5);
    --premium-gradient: linear-gradient(135deg, #f59e0b, #ef4444);
    --header-height: 80px;
    --radius-full: 9999px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --transition-apple: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
    text-align: right;
    color: var(--text-main);
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

html.dark .farstube-header-root,
html.farstube-dark .farstube-header-root {
    --bg-color: #000000;
    --surface-color: rgba(28, 28, 30, 0.8);
    --surface-solid: #1c1c1e;
    --surface-hover: rgba(255, 255, 255, 0.1);
    --text-main: #f5f5f7;
    --text-muted: #a1a1a6;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.6);
}

html.dark body,
html.farstube-dark body {
    background-color: #000000 !important;
    color: #f5f5f7;
}

html.dark .site,
html.dark .site-content,
html.dark .elementor,
html.dark .elementor-section,
html.dark .elementor-widget-container,
html.farstube-dark .site,
html.farstube-dark .site-content,
html.farstube-dark .elementor,
html.farstube-dark .elementor-section,
html.farstube-dark .elementor-widget-container {
    color: inherit;
}

body.farstube-lock-scroll {
    overflow: hidden !important;
    touch-action: none;
}

.farstube-header-root,
.farstube-header-root * {
    box-sizing: border-box;
}

.farstube-header-root a,
.farstube-header-root a:hover,
.farstube-header-root a:focus {
    text-decoration: none !important;
    color: inherit;
}

.farstube-header-root button,
.farstube-header-root input {
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    outline: none;
    font-family: inherit;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.farstube-header-root input {
    cursor: text;
    font-size: 20px !important;
}

.farstube-header-root .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 9990;
    background: var(--surface-color);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-apple);
}

body.admin-bar .farstube-header-root .header {
    top: 32px;
}

.farstube-header-root .header.scrolled {
    background: var(--surface-solid);
    box-shadow: var(--shadow-sm);
}

.farstube-header-root .header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.farstube-header-root .header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.farstube-header-root .hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    transition: var(--transition-apple);
    z-index: 10010;
    flex-shrink: 0;
}

.farstube-header-root .hamburger-btn:hover { background: var(--surface-hover); }

.farstube-header-root .hamburger-line {
    width: 22px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: var(--radius-full);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    margin-bottom: 6px;
}

.farstube-header-root .hamburger-line:last-child { margin-bottom: 0; }
.farstube-header-root .hamburger-btn.is-active .line-1 { transform: translateY(8px) rotate(45deg); }
.farstube-header-root .hamburger-btn.is-active .line-2 { opacity: 0; }
.farstube-header-root .hamburger-btn.is-active .line-3 { transform: translateY(-8px) rotate(-45deg); }

.farstube-header-root .brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    color: var(--text-main) !important;
}

.farstube-header-root .brand-icon {
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 24px;
    box-shadow: 0 8px 20px var(--primary-glow);
    transition: var(--transition-apple);
}

.farstube-header-root .brand-logo:hover .brand-icon { transform: scale(1.05); }
.farstube-header-root .brand-text-primary { color: var(--primary); }

.farstube-header-root .desktop-nav { display: flex; align-items: center; gap: 4px; }

.farstube-header-root .nav-link {
    padding: 10px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-apple);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: var(--text-main) !important;
}

.farstube-header-root .nav-link:hover { background: var(--surface-hover); color: var(--text-main) !important; }

.farstube-header-root .mega-menu-wrapper { position: relative; padding: 20px 0; }

.farstube-header-root .mega-menu-dropdown {
    position: absolute;
    top: 75px;
    right: 0;
    width: 650px;
    background: var(--surface-color);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.98);
    transition: var(--transition-apple);
    pointer-events: none;
    color: var(--text-main);
}

.farstube-header-root .mega-menu-wrapper:hover .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.farstube-header-root .mega-menu-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-right: 8px;
}

.farstube-header-root .mega-menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.farstube-header-root .mega-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: var(--transition-apple);
    color: var(--text-main) !important;
}

.farstube-header-root .mega-menu-item:hover { background: var(--surface-hover); color: var(--text-main) !important; }

.farstube-header-root .mega-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: var(--transition-apple);
    flex-shrink: 0;
}

.farstube-header-root .mega-menu-item:hover .mega-icon-box { transform: scale(1.1); }
.farstube-header-root .mega-item-text { font-weight: 600; font-size: 14px; }
.farstube-header-root .color-blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.farstube-header-root .color-purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.farstube-header-root .color-green { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.farstube-header-root .color-orange { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.farstube-header-root .color-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.farstube-header-root .color-teal { background: rgba(20, 184, 166, 0.15); color: #14b8a6; }

.farstube-header-root .header-center {
    flex: 1;
    max-width: 600px;
    display: flex;
    justify-content: center;
    min-width: 200px;
    margin: 0 16px;
}

.farstube-header-root .search-trigger {
    width: 100%;
    height: 48px;
    background: var(--surface-hover);
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-full) !important;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    color: var(--text-muted) !important;
    transition: var(--transition-apple);
    cursor: text;
    overflow: hidden;
}

.farstube-header-root .search-trigger:hover {
    background: var(--surface-solid);
    box-shadow: var(--shadow-sm) !important;
    border-color: var(--text-muted) !important;
    color: var(--text-muted) !important;
}

.farstube-header-root .search-trigger-text {
    flex: 1;
    text-align: right;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.farstube-header-root .search-shortcut {
    background: var(--surface-hover);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: sans-serif;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.farstube-header-root .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.farstube-header-root .mobile-search-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: var(--transition-apple);
}

.farstube-header-root .mobile-search-btn:hover { background: var(--surface-hover); }

.farstube-header-root .premium-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--premium-gradient);
    color: white !important;
    padding: 0 20px;
    height: 44px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
    transition: var(--transition-apple);
    white-space: nowrap;
}

.farstube-header-root .premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 25px rgba(245, 158, 11, 0.4);
    color: white !important;
}

.farstube-header-root .action-btn,
.farstube-header-root .login-icon-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--surface-hover);
    transition: var(--transition-apple);
    overflow: hidden;
    flex-shrink: 0;
    color: var(--text-main) !important;
}

.farstube-header-root .action-btn:hover,
.farstube-header-root .login-icon-btn:hover { background: var(--border-color); color: var(--text-main) !important; }

.farstube-header-root .theme-icon { position: absolute; transition: var(--transition-apple); font-size: 22px; }
.farstube-header-root .icon-sun { transform: rotate(0) scale(1); }
.farstube-header-root .icon-moon { transform: rotate(90deg) scale(0); opacity: 0; }
html.dark .farstube-header-root .icon-sun,
html.farstube-dark .farstube-header-root .icon-sun { transform: rotate(-90deg) scale(0); opacity: 0; }
html.dark .farstube-header-root .icon-moon,
html.farstube-dark .farstube-header-root .icon-moon { transform: rotate(0) scale(1); opacity: 1; }

.farstube-header-root .notif-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: var(--radius-full);
    border: 2px solid var(--surface-solid);
    animation: farstube-pulse 2s infinite;
}

@keyframes farstube-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

.farstube-header-root .divider { width: 1px; height: 24px; background: var(--border-color); margin: 0 4px; }
.farstube-header-root .user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    padding-left: 12px;
    border-radius: var(--radius-full);
    background: var(--surface-hover);
    transition: var(--transition-apple);
}
.farstube-header-root .user-trigger:hover { background: var(--border-color); }
.farstube-header-root .user-avatar-circle { width: 36px; height: 36px; border-radius: var(--radius-full); background: white; object-fit: cover; border: 1px solid var(--border-color); }
.farstube-header-root .user-caret { font-size: 14px; color: var(--text-muted); }

.farstube-header-root .dropdown-container { position: relative; }
.farstube-header-root .dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    background: var(--surface-color);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transform-origin: top left;
    transition: var(--transition-apple);
    z-index: 100;
    color: var(--text-main);
}
.farstube-header-root .dropdown-menu.is-active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.farstube-header-root .user-dropdown { width: 280px; padding: 12px; }
.farstube-header-root .user-dropdown-header { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border-color); margin-bottom: 8px; }
.farstube-header-root .user-dropdown-avatar { width: 48px; height: 48px; }
.farstube-header-root .user-dropdown-name { font-weight: 700; font-size: 15px; }
.farstube-header-root .user-dropdown-email { font-size: 12px; color: var(--text-muted); }
.farstube-header-root .dropdown-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; transition: var(--transition-apple); color: var(--text-main) !important; }
.farstube-header-root .dropdown-item:hover { background: var(--surface-hover); color: var(--text-main) !important; }
.farstube-header-root .dropdown-item-icon { width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--surface-hover); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.farstube-header-root .dropdown-divider { height: 1px; background: var(--border-color); margin: 8px 0; }
.farstube-header-root .dropdown-item.logout { color: var(--primary) !important; }
.farstube-header-root .dropdown-item.logout .dropdown-item-icon { background: rgba(255, 59, 48, 0.1); }
.farstube-header-root .dropdown-item.logout:hover { background: rgba(255, 59, 48, 0.1); color: var(--primary) !important; }

.farstube-header-root .notif-dropdown { width: 340px; padding: 16px; }
.farstube-header-root .notif-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 0 4px; }
.farstube-header-root .notif-title { font-weight: 700; font-size: 16px; }
.farstube-header-root .notif-read-all { font-size: 13px; color: var(--primary); cursor: pointer; }
.farstube-header-root .notif-list { display: flex; flex-direction: column; gap: 8px; max-height: 350px; overflow-y: auto; }
.farstube-header-root .notif-item { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-md); transition: var(--transition-apple); position: relative; overflow: hidden; color: var(--text-main) !important; }
.farstube-header-root .notif-item:hover { background: var(--surface-hover); color: var(--text-main) !important; }
.farstube-header-root .notif-item::before { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); transform: scaleY(0); transition: var(--transition-apple); transform-origin: center; border-radius: 4px 0 0 4px; }
.farstube-header-root .notif-item:hover::before { transform: scaleY(0.7); }
.farstube-header-root .notif-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; object-fit: cover; background: white; }
.farstube-header-root .notif-text { font-size: 13px; font-weight: 600; line-height: 1.5; }
.farstube-header-root .notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: block; }
.farstube-header-root .notif-empty { text-align: center; color: var(--text-muted); padding: 18px 8px; font-size: 13px; }

.farstube-header-root .mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: var(--surface-solid);
    z-index: 9980;
    padding: 100px 24px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-main);
}

body.admin-bar .farstube-header-root .mobile-menu { padding-top: 132px; }
.farstube-header-root .mobile-menu.is-active { transform: translateX(0); }
.farstube-header-root .mobile-top-actions { display: flex; align-items: center; gap: 10px; }
.farstube-header-root .mobile-top-actions .mobile-premium-btn { flex: 1; }
.farstube-header-root .mobile-login-icon-btn { width: 54px; height: 54px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--surface-hover); color: var(--text-main) !important; }
.farstube-header-root .mobile-login-icon-btn:hover { background: var(--border-color); color: var(--text-main) !important; }
.farstube-header-root .mobile-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.farstube-header-root .mobile-nav-link { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--radius-md); font-size: 16px; font-weight: 700; transition: var(--transition-apple); color: var(--text-main) !important; }
.farstube-header-root .mobile-nav-link:hover { background: var(--surface-hover); color: var(--text-main) !important; }
.farstube-header-root .mobile-nav-icon { font-size: 24px; color: var(--text-muted); }
.farstube-header-root .mobile-nav-link.active .mobile-nav-icon { color: var(--primary); }
.farstube-header-root .mobile-premium-btn { display: flex; justify-content: center; align-items: center; gap: 12px; background: var(--premium-gradient); color: white !important; padding: 16px; border-radius: var(--radius-md); font-weight: 700; font-size: 16px; box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2); }
.farstube-header-root .mobile-premium-btn:hover { color: white !important; }
.farstube-header-root .mobile-theme-toggle { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; padding: 16px; border-radius: var(--radius-md); background: var(--surface-hover); }
.farstube-header-root .toggle-switch { width: 50px; height: 28px; background: var(--border-color); border-radius: var(--radius-full); position: relative; transition: var(--transition-apple); }
.farstube-header-root .toggle-switch::after { content: ''; position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; background: white; border-radius: var(--radius-full); transition: var(--transition-apple); }
html.dark .farstube-header-root .toggle-switch,
html.farstube-dark .farstube-header-root .toggle-switch { background: var(--primary); }
html.dark .farstube-header-root .toggle-switch::after,
html.farstube-dark .farstube-header-root .toggle-switch::after { transform: translateX(-22px); }

.farstube-header-root .search-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}
.farstube-header-root .search-modal.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.farstube-header-root .search-modal-content { width: 90%; max-width: 700px; background: var(--surface-solid); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: 0 25px 50px rgba(0,0,0,0.25); overflow: hidden; transform: scale(0.9) translateY(-20px); opacity: 0; transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1); color: var(--text-main); }
.farstube-header-root .search-modal.is-active .search-modal-content { transform: scale(1) translateY(0); opacity: 1; }
.farstube-header-root .search-input-wrapper { display: flex; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--border-color); }
.farstube-header-root .search-input-icon { font-size: 24px; color: var(--text-muted); }
.farstube-header-root .search-input { flex: 1; border: none !important; background: transparent !important; font-size: 20px !important; font-weight: 600; color: var(--text-main) !important; outline: none !important; box-shadow: none !important; border-radius: 0 !important; min-height: 42px; padding: 0 !important; }
.farstube-header-root .search-input::-webkit-search-decoration,
.farstube-header-root .search-input::-webkit-search-cancel-button { display: none; }
.farstube-header-root .search-input::placeholder { color: var(--text-muted); opacity: 1; }
.farstube-header-root .search-close-btn { width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--surface-hover); display: flex; align-items: center; justify-content: center; font-size: 18px; transition: var(--transition-apple); flex-shrink: 0; }
.farstube-header-root .search-close-btn:hover { background: rgba(255, 59, 48, 0.1); color: var(--primary); }
.farstube-header-root .search-suggestions { padding: 24px; background: var(--bg-color); }
.farstube-header-root .suggestion-title { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 16px; }
.farstube-header-root .suggestion-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.farstube-header-root .chip { padding: 8px 16px; background: var(--surface-solid); border: 1px solid var(--border-color); border-radius: var(--radius-full); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition-apple); color: var(--text-main) !important; }
.farstube-header-root .chip:hover { border-color: var(--primary); color: var(--primary) !important; box-shadow: var(--shadow-sm); }
.farstube-header-root .channel-suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.farstube-header-root .channel-card { display: flex; align-items: center; gap: 16px; padding: 12px; background: var(--surface-solid); border: 1px solid var(--border-color); border-radius: var(--radius-md); transition: var(--transition-apple); cursor: pointer; color: var(--text-main) !important; }
.farstube-header-root .channel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--text-muted); color: var(--text-main) !important; }
.farstube-header-root .channel-avatar { width: 48px; height: 48px; border-radius: var(--radius-full); object-fit: cover; background: white; flex-shrink: 0; }
.farstube-header-root .channel-info h5 { font-size: 14px; font-weight: 700; margin: 0 0 4px; color: var(--text-main); }
.farstube-header-root .channel-info span { font-size: 12px; color: var(--text-muted); }
.farstube-header-root .live-search-results { display: flex; flex-direction: column; gap: 10px; }
.farstube-header-root .live-search-status { padding: 16px; text-align: center; color: var(--text-muted); font-size: 13px; }
.farstube-header-root .live-result-item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius-md); background: var(--surface-solid); border: 1px solid var(--border-color); transition: var(--transition-apple); color: var(--text-main) !important; }
.farstube-header-root .live-result-item:hover { transform: translateY(-2px); border-color: var(--text-muted); box-shadow: var(--shadow-sm); color: var(--text-main) !important; }
.farstube-header-root .live-result-thumb { width: 50px; height: 50px; border-radius: 14px; object-fit: cover; background: var(--surface-hover); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 22px; flex-shrink: 0; }
.farstube-header-root .live-result-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text-main); }
.farstube-header-root .live-result-type { font-size: 11px; color: var(--text-muted); }
.farstube-header-root .scroll-glow { position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--primary); box-shadow: 0 0 15px var(--primary-glow); opacity: 0; transition: opacity 0.5s ease; pointer-events: none; }

@media (max-width: 1150px) {
    .farstube-header-root .desktop-nav { display: none; }
    .farstube-header-root .hamburger-btn { display: flex; }
}

@media (max-width: 900px) {
    .farstube-header-root .header-center { display: none; }
    .farstube-header-root .mobile-search-btn { display: flex; }
    .farstube-header-root .premium-btn span { display: none; }
    .farstube-header-root .premium-btn { padding: 0; width: 44px; justify-content: center; }
}

@media (max-width: 782px) {
    body.admin-bar .farstube-header-root .header { top: 46px; }
    body.admin-bar .farstube-header-root .mobile-menu { padding-top: 146px; }
}

@media (max-width: 600px) {
    .farstube-header-root .premium-btn { display: none; }
    .farstube-header-root .divider { display: none; }
    .farstube-header-root .user-trigger { padding: 4px; }
    .farstube-header-root .user-caret { display: none; }
    .farstube-header-root .header-right { gap: 12px; }
    .farstube-header-root .brand-text-primary,
    .farstube-header-root .brand-logo span:not(.brand-icon) { display: none; }
    .farstube-header-root .header-container { padding: 0 16px; }
    .farstube-header-root .header-left { gap: 8px; }
    .farstube-header-root .search-modal { padding-top: 6vh; }
    .farstube-header-root .search-input-wrapper { padding: 12px 14px; gap: 10px; }
    .farstube-header-root .search-input { font-size: 16px !important; }
    .farstube-header-root .search-suggestions { padding: 18px; }
    .farstube-header-root .channel-suggestions { grid-template-columns: 1fr; }
}


/* ===== FarsTube v2.3 exact mobile drawer fixes ===== */
.farstube-header-root .mobile-menu {
    left: auto !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    max-height: none !important;
    transform: translate3d(100%, 0, 0) !important;
    transition-property: transform !important;
    transition-duration: 0.5s !important;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
    opacity: 1 !important;
    visibility: visible !important;
    will-change: transform;
    overflow-x: hidden !important;
}
.farstube-header-root .mobile-menu.is-active {
    transform: translate3d(0, 0, 0) !important;
}
.farstube-header-root .mobile-search-btn,
.farstube-header-root .mobile-search-btn:hover,
.farstube-header-root .mobile-search-btn:focus,
.farstube-header-root .mobile-search-btn:active {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--text-main) !important;
}
.farstube-header-root .mobile-search-btn i { pointer-events: none; }
.farstube-header-root .channel-avatar-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 24px;
}
@media (max-width: 600px) {
    .farstube-header-root .mobile-menu {
        padding: 100px 24px 40px !important;
    }
    body.admin-bar .farstube-header-root .mobile-menu {
        padding-top: 146px !important;
    }
}

/* =====================================================
   FarsTube v3.1 - Header stacking guard
   Keeps the fixed header above Elementor sections/widgets while scrolling.
   ===================================================== */
:root {
    --farstube-header-stack: 2147483000;
    --farstube-header-overlay-stack: 2147483010;
}

/* Lift the Elementor wrapper that contains the header, not just the fixed header itself. */
.elementor-widget-farstube_header_exact,
.elementor-element.elementor-widget-farstube_header_exact,
.elementor-widget-container:has(.farstube-header-root),
.elementor-element:has(.farstube-header-root),
.elementor-section:has(.farstube-header-root),
.elementor-container:has(.farstube-header-root),
.e-con:has(.farstube-header-root) {
    position: relative !important;
    z-index: var(--farstube-header-stack) !important;
    isolation: isolate;
}

.farstube-header-root {
    position: relative !important;
    z-index: var(--farstube-header-stack) !important;
    isolation: isolate;
}

.farstube-header-root .header {
    z-index: var(--farstube-header-stack) !important;
    transform: translateZ(0);
    will-change: transform;
}

/* Header popups must still stay above the header itself. */
.farstube-header-root .search-modal,
.farstube-header-root .mobile-menu,
.farstube-header-root .dropdown-menu,
.farstube-header-root .mega-menu-dropdown {
    z-index: var(--farstube-header-overlay-stack) !important;
}

/* Keep regular page sections below the fixed header unless the site owner intentionally sets a higher layer. */
.farstube-global-bg-system,
.ft-hero-root,
.farstube-creators-stories-root,
.farstube-footer-root {
    z-index: 1;
}

/* =====================================================
   FarsTube v3.2 - Real fixed header portal/layer fix
   ===================================================== */
:root {
    --farstube-header-stack: 2147483000;
    --farstube-header-overlay-stack: 2147483010;
}
body > .farstube-header-root,
.farstube-header-root[data-ft-header] {
    position: relative !important;
    z-index: var(--farstube-header-stack) !important;
    pointer-events: none;
    isolation: auto !important;
}
body > .farstube-header-root .header,
.farstube-header-root[data-ft-header] .header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: var(--farstube-header-stack) !important;
    pointer-events: auto !important;
    transform: none !important;
    isolation: isolate;
}
body.admin-bar > .farstube-header-root .header,
body.admin-bar .farstube-header-root[data-ft-header] .header { top: 32px !important; }
@media (max-width: 782px) {
    body.admin-bar > .farstube-header-root .header,
    body.admin-bar .farstube-header-root[data-ft-header] .header { top: 46px !important; }
}
body > .farstube-header-root .search-modal,
body > .farstube-header-root .mobile-menu,
body > .farstube-header-root .dropdown-menu,
body > .farstube-header-root .mega-menu-dropdown,
.farstube-header-root[data-ft-header] .search-modal,
.farstube-header-root[data-ft-header] .mobile-menu,
.farstube-header-root[data-ft-header] .dropdown-menu,
.farstube-header-root[data-ft-header] .mega-menu-dropdown {
    z-index: var(--farstube-header-overlay-stack) !important;
    pointer-events: auto;
}
.farstube-header-portal-placeholder { display: none !important; }

/* ===== v5.0 mobile drawer header/close ===== */
.farstube-header-root .mobile-menu{
    padding-top: 24px !important;
    background: var(--surface-solid) !important;
}
body.admin-bar .farstube-header-root .mobile-menu{ padding-top: 56px !important; }
.farstube-header-root .mobile-drawer-head{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:14px !important;
    padding: 0 0 22px !important;
    margin-bottom: 12px !important;
    border-bottom:1px solid var(--border-color) !important;
}
.farstube-header-root .mobile-drawer-brand{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    color:var(--text-main) !important;
    text-decoration:none !important;
    font-weight:950 !important;
    font-size:22px !important;
}
.farstube-header-root .mobile-drawer-brand:hover,
.farstube-header-root .mobile-drawer-brand:focus,
.farstube-header-root .mobile-drawer-brand:active{ color:var(--text-main) !important; background:transparent !important; box-shadow:none !important; }
.farstube-header-root .mobile-drawer-brand-icon{
    width:46px !important;height:46px !important;border-radius:16px !important;
    display:flex !important;align-items:center !important;justify-content:center !important;
    background:var(--primary) !important;color:#fff !important;box-shadow:0 10px 22px var(--primary-glow) !important;
}
.farstube-header-root .mobile-drawer-brand-icon i{font-size:25px !important;color:#fff !important;}
.farstube-header-root .mobile-drawer-close{
    width:46px !important;height:46px !important;border:0 !important;border-radius:50% !important;
    display:flex !important;align-items:center !important;justify-content:center !important;
    background:var(--surface-hover) !important;color:var(--text-main) !important;font-size:25px !important;
    box-shadow:none !important;outline:0 !important;padding:0 !important;
}
.farstube-header-root .mobile-drawer-close:hover,
.farstube-header-root .mobile-drawer-close:focus,
.farstube-header-root .mobile-drawer-close:active{
    background:rgba(255,59,48,.10) !important;color:var(--primary) !important;box-shadow:none !important;outline:0 !important;
}


/* ===== v5.4 logged-in mobile drawer shortcuts ===== */
.farstube-header-root .mobile-account-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 18px;}
.farstube-header-root .mobile-account-shortcuts a{display:flex;align-items:center;gap:8px;justify-content:flex-start;background:rgba(15,23,42,.04);border:1px solid rgba(15,23,42,.06);border-radius:18px;padding:12px 13px;color:var(--text-main)!important;font-weight:850;text-decoration:none!important;}
.farstube-header-root .mobile-account-shortcuts a:hover,.farstube-header-root .mobile-account-shortcuts a:focus,.farstube-header-root .mobile-account-shortcuts a:active{background:rgba(255,59,48,.10)!important;color:#ff3b30!important;box-shadow:none!important;outline:0!important;}
.farstube-header-root .mobile-account-shortcuts i{font-size:19px;color:inherit!important;}
html.dark .farstube-header-root .mobile-account-shortcuts a,html.farstube-dark .farstube-header-root .mobile-account-shortcuts a{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.08);}


/* ===== v5.8 mobile notifications: centered frosted popup ===== */
@media (max-width: 768px) {
  .farstube-header-root .notif-dropdown,
  body > .farstube-header-root .notif-dropdown,
  .farstube-header-root[data-ft-header] .notif-dropdown {
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 86px) !important;
    left: 50% !important;
    right: auto !important;
    width: min(370px, calc(100vw - 28px)) !important;
    max-height: calc(100dvh - 118px) !important;
    overflow: hidden !important;
    padding: 16px !important;
    border-radius: 28px !important;
    background: rgba(255,255,255,.88) !important;
    border: 1px solid rgba(15,23,42,.10) !important;
    box-shadow: 0 28px 70px rgba(15,23,42,.22), inset 0 1px 0 rgba(255,255,255,.70) !important;
    backdrop-filter: blur(34px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(34px) saturate(160%) !important;
    transform: translate(-50%, 14px) scale(.96) !important;
    transform-origin: top center !important;
    z-index: 2147483020 !important;
  }
  html.dark .farstube-header-root .notif-dropdown,
  html.farstube-dark .farstube-header-root .notif-dropdown {
    background: rgba(14,14,17,.88) !important;
    border-color: rgba(255,255,255,.12) !important;
    box-shadow: 0 28px 80px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.08) !important;
  }
  .farstube-header-root .notif-dropdown.is-active,
  body > .farstube-header-root .notif-dropdown.is-active,
  .farstube-header-root[data-ft-header] .notif-dropdown.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, 0) scale(1) !important;
  }
  .farstube-header-root .notif-list { max-height: calc(100dvh - 220px) !important; }
}
