:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --top-navbar-height: 56px;
    --streamer-avatar-size: 70px;
}

body {
    overflow-x: hidden;
    padding-top: var(--top-navbar-height);
    background-color: #0f0f13;
    color: #e0e0e0;
}

/* Sidebar styles */
#sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - 56px);
    position: fixed;
    left: 0;
    top: 56px;
    z-index: 1030;
    background: #16213e;
    color: white;
    transition: all 0.3s ease;
    /*padding-top: var(--top-navbar-height);*/
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

#sidebar.collapsed .sidebar-logo img:not(.collapsed-logo),
#sidebar.collapsed .nav-link-text,
#sidebar.collapsed .user-info,
#sidebar.collapsed .social-links-title,
#sidebar.collapsed .submenu,
#sidebar.collapsed .nav-description {
    display: none !important;
}

#sidebar.collapsed .sidebar-logo img.collapsed-logo {
    display: block !important;
    width: auto;
    height: 45px;
    margin: 0 auto;
}

#sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 8px 0px;
}

#sidebar.collapsed .bi-chevron-down {
    display: none;
}

.close-sidebar {
    display: none;
}

.top-sidebar {}
.sidebar-navigation {
    padding: 10px 10px;
}

.sidebar-logo {
    padding: 25px 40px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}
#sidebar.collapsed .sidebar-logo {
    padding: 5px 5px;
    background: #16213e;
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
    transition: all 0.3s;
}

.sidebar-logo img.collapsed-logo {
    display: none;
}

.sidebar-nav {
    padding: 0;
    list-style: none;
}

.sidebar-nav .nav-item {
    position: relative;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    margin-bottom: 3px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    /*border-left: 3px solid transparent;*/
}

.sidebar-nav .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #4cc9f0;
}

.sidebar-nav .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #4cc9f0;
}

.sidebar-nav .nav-link .bi {
    margin-right: 10px;
    font-size: 1.2rem;
    min-width: 20px;
    text-align: center;
}
#sidebar.collapsed .sidebar-nav .nav-link .bi {
    margin-right: 0px;
}

.sidebar-nav .submenu {
    padding-left: 22px;
    list-style: none;
    display: none;
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-nav .submenu .nav-link {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.sidebar-nav .submenu.show {
    display: block;
}

.nav-description {
    display: flex
;
    flex-direction: column;
}
.nav-description .min-text {
    font-size: 10px;
}

.sidebar-footer {
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 15px;
    /*background: rgba(0, 0, 0, 0.2);*/
    /*border-top: 1px solid rgba(255, 255, 255, 0.1);*/
}

.user-info {
    margin-bottom: 15px;
    font-size: 0.9rem;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s;
    margin: 0 3px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
}

/* Top navbar styles */
.top-navbar {
    height: var(--top-navbar-height);
    position: fixed;
    top: 0;
    right: 0;
    /*left: var(--sidebar-width);*/
    left: 0;
    z-index: 1020;
    background: #16213e;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-navbar.full-width {
    /*left: var(--sidebar-collapsed-width);*/
    left: 0;
}

.top-navbar .navbar-brand {

}

.sidebar-close-block {
    display: flex;
    padding: 10px 10px 0px;
    justify-content: space-between;
    align-items: center;
    align-content: center;
    flex-direction: row;
}
.sidebar-close-title {
    font-size: 16px;
    transition: opacity, width 0.3s ease;
    opacity: 1;
    overflow: hidden;
    white-space: nowrap;
    padding-left: 5px;
}
.collapsed .sidebar-close-title {
    display: none;
    opacity: 0;
    width: 0;
}
.sidebar-close-button {
    background: none;
    color: #fff;
    border: none;
    font-size: 1.2rem;
    border-radius: 4px;
    padding: 2px 8px 0px;
    width: auto;
}
.sidebar-close-button:hover {
    background: rgba(255, 255, 255, 0.05);
}
.sidebar-close-button i.bi-sidebar-left-button {
    font-size: 1.5rem;
}

.sidebar-close-button i.bi-sidebar-left-button::before {
    content: "\F113";
    transition: all 0.2s;
}

.collapsed .sidebar-close-button {
    width: 100%;
    padding: 4px 0px;
}

.collapsed .sidebar-close-button i.bi-sidebar-left-button::before {
    /*content: "\F114";*/
    transform: rotate(180deg);
}

.collapsed .sidebar-navigation {
    padding: 3px 10px 10px;
}

.navbar-brand-logo {
    padding: 0;
}

.top-navbar .navbar-toggler {
    color: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
}

.top-navbar .navbar-toggler:hover {
    color: white;
}
.top-navbar .nav-item {
    display: flex;
    justify-content: center;
    align-items: center;
}
.top-navbar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.top-navbar .nav-link:hover {
    color: white;
}

.top-navbar .login-link {
    background-color: #ff003c;
    border-radius: 5px;
    padding: 0.3rem 1rem;
}
.top-navbar .login-link:hover {
    background-color: #b11a1b;
}

.top-navbar .dropdown-menu {
    margin-top: 8px;
    border-radius: 0 0 5px 5px;
    background-color: #16213e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    position: absolute;
}

.top-navbar button:focus:not(:focus-visible) {
    box-shadow: 0 0 0 0.0rem;
}

button .bi-sidebar-nav-icon::before {
    content: "\f45f";
}
button:hover .bi-sidebar-nav-icon::before {
    content: "\F113";
}
.top-navbar.full-width button:hover .bi-sidebar-nav-icon::before {
    content: "\F114";
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.top-navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
}

.top-navbar .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.search-form {
    position: relative;
    margin: 0 15px;
    max-width: 300px;
}

.search-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 100%;
    padding-left: 35px;
    transition: all 0.3s;
}

.search-form .form-control:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 0.25rem rgba(76, 201, 240, 0.25);
}

.search-form .bi-search {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
}

.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
}

.user-dropdown .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.btn-auth {
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
    margin-left: 5px;
}

/* Main content styles */
.main-content {
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    padding: 0px;
    min-height: calc(100vh - var(--top-navbar-height));
}

.main-content.full-width {
    margin-left: var(--sidebar-collapsed-width);
}

.content-include {
    background: #000;
    height: calc(100vh - var(--top-navbar-height));
    position: relative;
}

.content-include-loader {
    width: 100%;
    height: 100%;
    position: absolute;
    background: #16213e;
    justify-content: center;
    align-items: center;
    display: none;
    z-index: 3;
}

.loader-active {
    display: flex;
}

.content-include-loader .loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-block;
    border-top: 4px solid #FFF;
    border-right: 4px solid transparent;
    box-sizing: border-box;
    animation: loader-rotation 1s linear infinite;
}
.content-include-loader .loader::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border-left: 4px solid #FF3D00;
    border-bottom: 4px solid transparent;
    animation: loader-rotation 0.5s linear infinite reverse;
}
@keyframes loader-rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.content-load-scroll {
    height: calc(100vh - var(--top-navbar-height) - 100px);
    overflow-y: scroll;
}

.content-load-footer {
    height: 100px;
    background: #16213e;
}
.broadcast-info {}

.broadcast-vitv {
    height: 100%;
}
.broadcast-video {
    height: 100%;
    display: flex
;
    justify-content: center;
    align-items: center;
    align-content: center;

}
.broadcast-video video {
    height: 100%;
    width: 100%;
}

.navbar-nav .top-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
}

/* Stream player styles */
.stream-container {
    position: relative;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.stream-player {
    width: 100%;
    background: #000;
    aspect-ratio: 16/9;
}

.stream-chat {
    position: absolute;
    right: 0;
    top: 0;
    width: 300px;
    height: 100%;
    background: #1a1a2e;
    color: white;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.stream-chat.collapsed {
    transform: translateX(100%);
}

.chat-header {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    scrollbar-width: thin;
    scrollbar-color: #4cc9f0 #1a1a2e;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #4cc9f0;
    border-radius: 3px;
}

.chat-message {
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 0.9rem;
}

.chat-message .user {
    font-weight: bold;
    color: #4cc9f0;
}

.chat-input {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    border-radius: 20px;
    padding: 8px 15px;
}

/* Stream info styles */
.stream-info {
    display: flex;
    background: #16213e;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    align-items: center;
}

.streamer-avatar {
    width: var(--streamer-avatar-size);
    height: var(--streamer-avatar-size);
    border-radius: 50%;
    margin-right: 20px;
    position: relative;
    flex-shrink: 0;
    /*overflow: hidden;*/
    border: 3px solid #fff;
}

.streamer-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.streamer-avatar .live-badge {
    position: absolute;
    bottom: -10px;
    right: 3px;
    background: red;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: bold;
    text-transform: uppercase;
    animation: pulse 1.5s infinite;
    white-space: nowrap;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.streamer-info {
    flex-grow: 1;
    min-width: 0;
}

.streamer-name {
    font-weight: bold;
    font-size: 14px;
    line-height: 14px;
    margin-bottom: 5px;
    color: white;
}

.stream-description {
    margin-bottom: 4px;
    /*cursor: pointer;*/
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s;
    padding: 3px 0;
}

/*.stream-description:hover {*/
/*    color: white;*/
/*    text-decoration: underline;*/
/*}*/

.stream-game {
    display: flex;
    align-items: center;
    color: #f5023c;
    font-size: 0.8rem;
    font-weight: 600;
}

.stream-game .bi {
    margin-right: 5px;
    color: #f5023c;
}

.stream-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    margin-left: 15px;
    justify-content: flex-end;
}

.stream-link {
    display: flex;
    align-items: center;
    margin-right: 5px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    background: rgba(76, 201, 240, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.stream-link:hover {
    background: rgba(76, 201, 240, 0.2);
    color: #a5aab7;
}

.stream-link .bi {
    margin-right: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-share {
    background: #f6013d;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-share:hover {
    background: #ba002e;
    transform: translateY(-2px);
}

/* Modal styles */
.modal-content {
    background: #1a1a2e;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-close {
    filter: invert(1);
}


.custom-nav-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    padding: 10px 0;
    background-color: #16213e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 99;
    left: 0;
    top: 0px;
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
}
.custom-nav-fixed {
    position: fixed;
    top: var(--top-navbar-height);
}

.main-content.full-width .custom-nav-container {
    margin-left: var(--sidebar-collapsed-width);
}

.custom-nav-scroller {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.custom-nav-scroller::-webkit-scrollbar {
    display: none;
}

.custom-nav-menu {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-nav-item {
    flex: 0 0 auto;
    margin: 0 10px;
}

.custom-nav-link {
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    color: #d4d4db;
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.custom-nav-link.active {
    background-color: #0046ff;
    color: white;
}

.scroll-gradient {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-gradient-left {
    left: 0;
}

.scroll-gradient-right {
    right: 0;
}

.scroll-gradient-left.pulse {
    background: linear-gradient(90deg, rgba(43, 66, 128, 1) 0%, rgba(248, 249, 250, 0) 100%);
}

.scroll-gradient-right.pulse {
    /*background: linear-gradient(270deg, rgba(248, 249, 250, 0.9) 0%, rgba(248, 249, 250, 0) 100%);*/
    background: linear-gradient(270deg, rgba(43, 66, 128, 1) 0%, rgba(248, 249, 250, 0) 100%);
}

.scroll-gradient.pulse {
    animation: pulse-custom-nav 2s infinite;
}

@keyframes pulse-custom-nav {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Responsive styles */
@media (max-width: 992px) {
    #sidebar {
        transform: translateX(-100%);
        width: 280px;
        overflow-y: visible;
    }

    #sidebar.show {
        /*transform: translateX(0);*/
    }

    #sidebar.mobile-show {
        transform: translateX(0);
    }

    #sidebar.mobile-show .close-sidebar {
        position: absolute;
        width: 300%;
        left: 100%;
        height: 100vh;
        background: rgb(0 0 0 / 50%);
        display: block;
    }

    #sidebar.mobile-show .close-sidebar #sidebarMobileClose {
        color: rgba(255, 255, 255, 0.8);
        border: none;
        font-size: 1.5rem;
        padding: 16px;
    }

    .top-navbar {
        left: 0;
    }

    .top-navbar .navbar-brand {
        display: block;
        margin-right: 15px;
    }

    .top-navbar .navbar-brand img {
        height: 30px;
    }

    .main-content {
        margin-left: 0;
    }

    .custom-nav-container {
        margin-left: 0;
    }

    .stream-chat {
        position: static;
        width: 100%;
        height: 300px;
        margin-top: 15px;
    }

    .search-form {
        margin: 10px 0;
        max-width: 100%;
    }

    .navbar-collapse {
        display: flex;
        flex-basis: auto;
        flex-grow: 1;
        align-items: center;
        flex-direction: row;
    }
    .navbar-nav {
        flex-direction: row;
    }

    .mobile-menu {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .stream-info {
        /*flex-direction: column;*/
        /*text-align: center;*/
    }

    .streamer-info {
        padding-left: 20px;
    }

    .stream-description {
        display: none;
    }

    .streamer-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .stream-actions {
        align-items: center;
        margin-top: 15px;
        margin-left: 0;
        width: 100%;
        display: none;
    }

    .stream-link {
        margin-bottom: 15px;
    }

    .top-navbar .nav-item {
        margin-bottom: 0px;
    }

    .top-navbar .dropdown-menu {
        position: static !important;
        transform: none !important;
    }

    .top-navbar .dropdown-profile {
        position: absolute !important;
    }

    .custom-nav-container {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 576px) {
    .btn-auth {
        padding: 0.2rem 0.5rem;
        font-size: 0.8rem;
    }

    .user-dropdown .user-avatar {
        width: 28px;
        height: 28px;
    }

    .user-dropdown .dropdown-toggle span {
        display: none;
    }

    .streamer-avatar {
        width: 70px;
        height: 70px;
    }
}
