/* Importing Google Font - Open Sans */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap");

* {

}

/* Color variables for light theme */
:root {
    --white-color: #fff;
    --black-color: #000;
    --light-white-color: #f0f0f0;
    --light-gray-color: #e5e5e5;
    --border-color: #ccc;
    --primary-color: #3b82f6;
    --secondary-color: #404040;
    --overlay-dark-color: rgba(0, 0, 0, 0.6);
    --muted-color: #6c757d;
    --tblr-secondary: #473764;
}

body {

}

/* Ajustes para quando não há sidebar */
body.no-sidebar .main-layout .sidebar {
    display: none;
}

body.no-sidebar .main-layout .content {
    margin-left: 0 !important;
    width: 100% !important;
}

body.no-sidebar .page-wrapper {
    margin-left: 0 !important;
}

header, .sidebar .nav-left, .category-list {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--white-color);
}

:where(.navbar, .sidebar) .nav-section {
    gap: 1rem;
}

:where(.navbar, .sidebar) :where(.nav-section, .nav-logo, .search-form) {
    display: flex;
    align-items: center;
}

:where(.navbar, .sidebar) :where(.logo-image, .user-image) {
    width: 10vh;
    cursor: pointer;
}

:where(.navbar, .sidebar) .nav-section .nav-button {
    border: none;
    height: 40px;
    width: 40px;
    cursor: pointer;
    background: none;
    border-radius: 50%;
}

:where(.navbar, .sidebar) .nav-section .nav-button:hover {
    background: var(--light-gray-color) !important;
}

:where(.navbar, .sidebar) .nav-button i {
    font-size: 1.5rem;
    display: flex;
    color: var(--black-color);
    align-items: center;
    justify-content: center;
}

:where(.navbar, .sidebar) .nav-logo {
    display: flex;
    gap: 0.5rem;
    text-decoration: none;
}

:where(.navbar, .sidebar) .nav-logo .logo-text {
    color: var(--black-color);
    font-size: 1.25rem;
}

.navbar .nav-center {
    gap: 0.5rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.navbar .search-form {
    flex: 1;
    height: 40px;
    max-width: 550px;
}

.navbar .search-form .search-input {
    width: 100%;
    height: 100%;
    font-size: 1rem;
    padding: 0 1rem;
    outline: none;
    color: var(--black-color);
    background: var(--white-color);
    border-radius: 3.1rem 0 0 3.1rem;
    border: 1px solid var(--border-color);
}

.navbar .search-form .search-input:focus {
    border-color: var(--primary-color);
}

.navbar .search-form .search-button {
    height: 40px;
    width: auto;
    padding: 0 1.25rem;
    border-radius: 0 3.1rem 3.1rem 0;
    border: 1px solid var(--border-color);
    border-left: 0;
}

.navbar .nav-center .mic-button {
    background: var(--light-white-color);
}

.navbar .nav-right .search-button {
    display: none;
}

.main-layout {
    display: flex;
    overflow-y: auto;
    scrollbar-color: #a6a6a6 transparent;
}

.main-layout .sidebar {
    width: 280px;
    overflow: hidden;
    padding: 0 0.7rem 0;
    background: var(--white-color);
}

.main-layout .sidebar .nav-left {
    display: none;
    padding: 0.5rem 0.3rem;
}

body.sidebar-hidden .main-layout .sidebar {
    width: 0;
    padding: 0;
}

.sidebar .links-container {
    padding: 1rem 0 2rem;
    overflow-y: auto;
    height: calc(100vh - 60px);
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.sidebar .links-container:hover {
    scrollbar-color: #a6a6a6 transparent;
}

.sidebar .link-section .link-item {
    display: flex;
    color: var(--black-color);
    white-space: nowrap;
    align-items: center;
    font-size: 0.938rem;
    padding: 0.37rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
}

.sidebar .link-section .link-item:hover {
    background: var(--light-gray-color);
}

.sidebar .link-section .link-item i {
    font-size: 1.4rem;
    margin-right: 0.625rem;
}

.sidebar .link-section .section-title {
    color: var(--black-color);
    font-weight: 600;
    font-size: 0.938rem;
    margin: 1rem 0 0.5rem 0.5rem;
}

.sidebar .link-section .sidebar-subgroup-header {
    font-size: 0.65rem;
    color: var(--tblr-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
    padding-top: 1rem;
    opacity: 0.85;
    text-transform: capitalize;
    margin: 0.5rem 0 0.25rem 0.75rem;
}

.sidebar .section-separator {
    height: 1px;
    margin: 0.64rem 0;
    background: var(--light-gray-color);
}

.main-layout .content-wrapper {
    padding: 0 1rem;
    overflow-x: hidden;
    width: 100%;
}

.content-wrapper .category-list {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    padding: 0.75rem 0 0.7rem;
    scrollbar-width: none;
}

.category-list .category-button {
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.94rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    color: var(--black-color);
    padding: 0.4rem 0.75rem;
    background: var(--light-gray-color);
}

.category-list .category-button.active {
    color: var(--white-color);
    background: var(--black-color);
    pointer-events: none;
}

.dark-mode .category-list .category-button.active {
    filter: brightness(120%);
}

.category-list .category-button:not(.active):hover {
    background: var(--border-color);
}

.content-wrapper .video-list {
    display: grid;
    gap: 1rem;
    padding: 1.25rem 0 4rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.video-list .video-card {
    text-decoration: none;
}

.video-list .video-card .thumbnail-container {
    position: relative;
}

.video-list .video-card .thumbnail {
    width: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    aspect-ratio: 16 / 9;
    background: var(--light-white-color);
}

.video-list .video-card .duration {
    position: absolute;
    right: 0.65rem;
    bottom: 0.8rem;
    color: #fff;
    font-size: 0.875rem;
    padding: 0 0.3rem;
    border-radius: 0.3rem;
    background: var(--overlay-dark-color);
}

.video-list .video-card .video-info {
    display: flex;
    gap: 0.7rem;
    padding: 0.7rem 0.5rem;
}

.video-list .video-card .icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.video-list .video-card .title {
    font-size: 1rem;
    color: var(--black-color);
    font-weight: 600;
    line-height: 1.375;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.video-list .video-card:hover .title {
    color: var(--primary-color);
}

.video-list .video-card p {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.video-list .video-card .channel-name {
    margin: 0.25rem 0 0.15rem;
}

/* Responsive media code for small devices */
@media (max-width: 768px) {
    .navbar .nav-center {
        display: none;
    }

    .navbar .nav-right .search-button {
        display: block;
    }

    .main-layout .screen-overlay {
        position: absolute;
        left: 0;
        top: 0;
        z-index: 15;
        width: 100%;
        height: 100vh;
        background: var(--overlay-dark-color);
        transition: 0.2s ease;
    }

    body.sidebar-hidden .main-layout .screen-overlay {
        opacity: 0;
        pointer-events: none;
    }

    .main-layout .sidebar {
        position: absolute;
        left: 0;
        top: 0;
        z-index: 20;
        height: 100vh;
        transition: 0.2s ease;
    }

    body.sidebar-hidden .main-layout .sidebar {
        left: -280px;
    }

    .main-layout .sidebar .nav-left {
        display: flex;
    }
}