/* Reset e configurações básicas */
/* * { */
/*     margin: 0; */
/*     padding: 0; */
/*     box-sizing: border-box; */
/* } */

/* body { */
/*     font-family: 'Roboto', Arial, sans-serif; */
/*     background-color: #0f0f0f; */
/*     color: #ffffff; */
/*     overflow-x: hidden; */
/* } */

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: #212121;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    border-bottom: 1px solid #303030;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.menu-toggle:hover {
    background-color: #303030;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
}

.logo i {
    color: #ff0000;
    font-size: 24px;
}

.header-center {
    flex: 1;
    max-width: 640px;
    margin: 0 40px;
}

.search-container {
    display: flex;
    height: 40px;
}

.search-input {
    flex: 1;
    background-color: #121212;
    border: 1px solid #303030;
    border-right: none;
    padding: 0 16px;
    color: #ffffff;
    font-size: 16px;
    border-radius: 20px 0 0 20px;
}

.search-input:focus {
    outline: none;
    border-color: #1976d2;
}

.search-btn {
    width: 64px;
    background-color: #303030;
    border: 1px solid #303030;
    border-left: none;
    color: #ffffff;
    cursor: pointer;
    border-radius: 0 20px 20px 0;
    transition: background-color 0.2s ease;
}

.search-btn:hover {
    background-color: #404040;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.header-btn:hover {
    background-color: #303030;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
}

/* Main Container */
.main-container {
    display: flex;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 56px;
    width: 240px;
    height: calc(100vh - 56px);
    background-color: #212121;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s ease;
    z-index: 999;
}

.sidebar.collapsed {
    width: 72px;
}

.sidebar-content {
    padding: 12px 0;
}

/* Menu Sections */
.menu-section {
    margin-bottom: 8px;
}

.section-title {
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #aaaaaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar.collapsed .section-title {
    display: none;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
    min-height: 40px;
}

.sidebar.collapsed .menu-item {
    padding: 16px 24px;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.menu-item:hover {
    background-color: #303030;
}

.menu-item.active {
    background-color: #303030;
}

.menu-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    margin-right: 24px;
    color: #ffffff;
}

.sidebar.collapsed .menu-item i {
    margin-right: 0;
    font-size: 18px;
}

.menu-text {
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .menu-text {
    font-size: 10px;
    text-align: center;
    opacity: 1;
    margin-top: 4px;
}

.channel-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 24px;
    font-size: 16px;
}

.sidebar.collapsed .channel-avatar {
    margin-right: 0;
    width: 20px;
    height: 20px;
    font-size: 14px;
}

/* Menu Divider */
.menu-divider {
    height: 1px;
    background-color: #303030;
    margin: 12px 0;
}

.sidebar.collapsed .menu-divider {
    margin: 8px 12px;
}

/* Scrollbar customization */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #212121;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #505050;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 24px;
    transition: margin-left 0.3s ease;
    background-color: #0f0f0f;
}

.sidebar.collapsed + .main-content {
    margin-left: 72px;
}

.content-header {
    margin-bottom: 32px;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 8px;
}

.content-header p {
    color: #aaaaaa;
    font-size: 16px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.video-card {
    background-color: #212121;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.video-thumbnail {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-thumbnail i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease;
}

.video-card:hover .video-thumbnail i {
    transform: scale(1.1);
}

.video-info {
    padding: 16px;
}

.video-info h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-channel {
    color: #aaaaaa;
    font-size: 14px;
    margin-bottom: 4px;
}

.video-stats {
    color: #aaaaaa;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-center {
        max-width: 400px;
        margin: 0 20px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .header-center {
        display: none;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 0;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .main-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 12px;
    }
    
    .logo span {
        display: none;
    }
    
    .header-right {
        gap: 4px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 12px;
    }
}

/* Animações adicionais */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card {
    animation: fadeIn 0.5s ease forwards;
}

.video-card:nth-child(1) { animation-delay: 0.1s; }
.video-card:nth-child(2) { animation-delay: 0.2s; }
.video-card:nth-child(3) { animation-delay: 0.3s; }
.video-card:nth-child(4) { animation-delay: 0.4s; }
.video-card:nth-child(5) { animation-delay: 0.5s; }
.video-card:nth-child(6) { animation-delay: 0.6s; }

/* Tooltip para sidebar colapsada */
.sidebar.collapsed .menu-item {
    position: relative;
}

.sidebar.collapsed .menu-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 72px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #303030;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

@keyframes tooltipFadeIn {
    to {
        opacity: 1;
    }
}

