* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #0f0f0f;
    color: #fff;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Common Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    position: sticky;
    top: 0;
    background-color: #0f0f0f;
    z-index: 100;
}

/* Desktop Header Styles */
.desktop-header {
    padding: 0 16px;
    border-bottom: 1px solid #303030;
}

.desktop-header .left-section {
    display: flex;
    align-items: center;
}

.desktop-header .menu-icon {
    background: transparent;
    border: none;
    color: white;
    margin-right: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.desktop-header .logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    color: white;
    text-decoration: none;
}

.desktop-header .middle-section {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
}

.desktop-header .search-bar {
    flex: 1;
    height: 40px;
    display: flex;
    border-radius: 31px;
    overflow: hidden;
}

.desktop-header .search-input {
    flex: 1;
    border: 1px solid #303030;
    border-right: none;
    padding: 10px 15px;
    font-size: 16px;
    background-color: #121212;
    color: white;
}

.desktop-header .search-button {
    width: 64px;
    border: 1px solid #303030;
    background-color: #323232;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.desktop-header .microphone-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #181818;
    color: white;
    margin-left: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.desktop-header .right-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.desktop-header .icon-button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.desktop-header .login-button {
    background-color: transparent;
    border: 1px solid #3ea6ff;
    color: #3ea6ff;
    padding: 5px 10px;
    border-radius: 50px;
    font-weight: 500;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.desktop-header .login-button i {
    margin-right: 8px;
}
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff0000;
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}
/* Mobile Header Styles */
.mobile-header {
    padding: 0 16px;
}

.mobile-header .left-section {
    display: flex;
    align-items: center;
}

.mobile-header .menu-icon {
    background: transparent;
    border: none;
    color: white;
    margin-right: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.mobile-header .logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    color: #fff;
    text-decoration: none;
}

.mobile-header .logo-text {
    margin-left: 8px;
}

.mobile-header .right-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-header .icon-button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mobile-header .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff0000;
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

/* Dropdown Menu Styling */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #272727;
    border-radius: 8px;
    width: 280px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 110;
    margin-top: 8px;
}

.dropdown-menu.show {
    display: block;
    animation: dropdownFade 0.2s ease;
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-header h3 {
    font-size: 16px;
    font-weight: 500;
}

.dropdown-header .view-all {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-body {
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #333;
}

.dropdown-item i {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.dropdown-divider {
    height: 1px;
    background-color: #3a3a3a;
    margin: 4px 0;
}

/* User Dropdown Specific Styling */
.user-header {
    padding: 16px;
}

.user-info {
    text-align: center;
}

.user-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.user-email {
    font-size: 12px;
    color: #aaa;
}

/* Notification Styling */
.notification-dropdown {
    position: relative;
}

.notification-item {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid #3a3a3a;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #333;
}

.notification-item.unread {
    background-color: rgba(255, 0, 0, 0.05);
}

.notification-icon {
    background-color: rgba(255, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.notification-icon i {
    color: var(--primary-color);
}

.notification-content {
    flex: 1;
}

.notification-text {
    margin-bottom: 4px;
}

.notification-time {
    font-size: 12px;
    color: #aaa;
}

/* Empty notification state */
.empty-notification {
    padding: 20px;
    text-align: center;
    color: #aaa;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 80;
}

/* Mobile Notification Overlay */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0f0f0f;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.notification-overlay.active {
    transform: translateY(0);
}

.notification-header {
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #303030;
}

.notification-header h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
}

.view-all-button {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
}

/* Search suggestions */
.search-suggestions {
    padding: 16px;
}

.suggestions-list {
    list-style: none;
}

.suggestions-list li {
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.suggestions-list a {
    color: #fff;
    text-decoration: none;
}

.suggestions-list a:hover {
    color: var(--primary-color);
}

.no-results {
    text-align: center;
    color: #aaa;
    padding: 10px 0;
}

/* Animation for dropdowns */
@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cart Badge Styling */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary-color);
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

/* Show/Hide based on screen size */
@media (max-width: 768px) {
    .desktop-header {
        display: none;
    }
    
    .mobile-header {
        display: flex;
    }
}

@media (min-width: 769px) {
    .desktop-header {
        display: flex;
    }
    
    .mobile-header {
        display: none;
    }
    
    .categories-tabs {
        display: none;
    }
}

/* Categories/Tabs - Redesigned to match YouTube tabs */
.categories-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 8px;
    background-color: #0f0f0f;
    border-bottom: 1px solid #303030;
    gap: 8px;
    position: sticky;
    top: 56px;
    z-index: 90;
}

.tab {
    background-color: #272727;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.tab:first-child {
    padding: 8px;
}

.tab.active {
    background-color: #fff;
    color: #0f0f0f;
}

.tab-icon {
    width: 16px;
    height: 16px;
}

/* Container and layout */
.container {
    display: flex;
    /*height: calc(100vh - 56px - 44px); /* Header height + Tabs height */
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: #0f0f0f;
    padding: 12px 0;
    overflow-y: auto;
    position: fixed;
    /*top: 100px; /* Header height + Tabs height */
    height: calc(100vh - 56px);
    left: 0;
    z-index: 90;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-240px);
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
}

.sidebar-item:hover {
    background-color: #272727;
}

.sidebar-item svg {
    margin-right: 24px;
}

.sidebar-divider {
    height: 1px;
    background-color: #303030;
    margin: 12px 0;
}

.signin-promo {
    padding: 16px 32px;
    border-bottom: 1px solid #303030;
}

.signin-button {
    background-color: transparent;
    border: 1px solid #3ea6ff;
    color: #3ea6ff;
    padding: 5px 10px;
    border-radius:50px;
    font-weight: 500;
    margin-top: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.signin-button svg {
    margin-right: 8px;
}

/* Main Content */
.main {
    flex: 1;
    padding: 16px 16px 0;
    overflow-y: auto;
    margin-left: 240px;
    transition: margin-left 0.3s ease;
    width: calc(100% - 240px);
}

.main.expanded {
    margin-left: 0;
    width: 100%;
}

.categories {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 24px;
}

.category {
    background-color: #272727;
    color: #fff;
    padding: 8px 12px;
    margin-right: 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.category.active {
    background-color: #fff;
    color: #0f0f0f;
}

.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.script-card {
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.script-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.thumbnail-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    background-color: #222;
    border-radius: 10px;
    overflow: hidden;
}

.thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-script {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #ff0000;
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
}
.price-free {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #FFEB3B;
    color: black;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
}
.script-info {
    display: flex;
    margin-top: 12px;
}

.script-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 12px;
    background-color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    overflow: hidden;
}

.script-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.script-details {
    flex: 1;
}

.script-title {
    font-weight: 500;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.script-creator {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 4px;
}

.script-stats {
    color: #aaa;
    font-size: 14px;
}

.section-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-title svg {
    margin-right: 10px;
    color: #ff0000;
}

.price-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff0000;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
}

.shorts-section {
    margin-bottom: 40px;
}

.shorts-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
}

.short-card {
    min-width: 180px;
    width: 180px;
}

.short-thumbnail {
    width: 100%;
    height: 320px;
    border-radius: 10px;
    background-color: #222;
    overflow: hidden;
    position: relative;
}

.short-info {
    margin-top: 10px;
}

.short-title {
    font-weight: 500;
    font-size: 14px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.short-views {
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

.feather {
    vertical-align: middle;
}

/* Mobile search overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0f0f0f;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.search-overlay.active {
    transform: translateY(0);
}

.search-header {
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #303030;
    gap: 16px;
}

.back-button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}

.search-input-container {
    flex: 1;
}

.search-overlay-input {
    width: 90%;
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.search-button-overlay {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}
.search-form{
    width: 100%;
}
/* Mobile Navigation Bar - Redesigned to match YouTube mobile */
.mobile-nav {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #0f0f0f;
    border-top: 1px solid #303030;
    height: 56px;
    z-index: 100;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 10px;
    flex: 1;
}

.mobile-nav-item.active {
    color: #fff;
}

.mobile-nav-item svg {
    margin-bottom: 4px;
}

.add-button {
    transform: translateY(-14px);
}

.add-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.add-circle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    border-radius: 50%;
    z-index: -1;
}

/* Media queries for mobile */
@media (max-width: 768px) {
    body {
        padding-bottom: 56px;
    }
    
    .sidebar {
        transform: translateX(-240px);
        width: 240px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main {
        margin-left: 0;
        width: 100%;
        padding: 16px 16px 0;
    }
    
    .scripts-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    
    .middle-section {
        display: none;
    }
    
    .short-card {
        min-width: 140px;
        width: 140px;
    }
    
    .short-thumbnail {
        height: 250px;
    }
    
    /* Status bar */
    .status-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 16px 0;
        font-size: 12px;
        color: #fff;
    }
    
    .time {
        font-weight: bold;
    }
    
    .indicators {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .battery {
        display: flex;
        align-items: center;
    }
    
    .battery-icon {
        width: 20px;
        height: 10px;
        border: 1px solid #fff;
        border-radius: 2px;
        position: relative;
        margin-right: 4px;
    }
    
    .battery-icon::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        right: 5px;
        bottom: 2px;
        background-color: #fff;
    }
    
    /* Hide desktop elements on mobile */
    .login-button {
        display: none;
    }
}

/* Tablet and larger phones */
@media (min-width: 600px) and (max-width: 1024px) {
    .mobile-nav {
        display: none;
    }
    
    .scripts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .mobile-nav {
        display: none;
    }
    
    .categories-tabs {
        display: none;
    }
    
    .categories {
        display: flex;
    }
}

/* User Avatar Styling */
.user-dropdown {
    position: relative;
}

.user-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    background-color: #1976D2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 16px;
}